是否可以使用健身价值来评估人口中的每个人,而不会发现以下假代码的概率:
For all members of population
sum += fitness ( member)
End for
Loop until new population is full
Do this twice
Number = Random between 0 and sum
Currentfitness = 0.0
For each member in population
Currentfitness += fitness (member)
if Number > Currentfitness then select member
End for
End
Create offspring
End loop
代码的下一部分是做什么的?
Do this twice
我真的搞不懂轮轮轮轮轮如何选择双亲。有什么可以帮忙的吗?