我在理解算法时遇到问题。这是网上看到的最受欢迎的
for all members of population
sum += fitness of this individual
end for
for all members of population
probability = sum of probabilities + (fitness / sum)
sum of probabilities += probability
end for
loop until new population is full
do this twice
number = Random between 0 and 1
for all members of population
if number > probability but less than next probability
then you have been selected
end for
end
create offspring
end loop
for all members of population
probability = sum of probabilities + (fitness / sum)
sum of probabilities += probability
end for
^^^这篇文章特别让我困惑。在人口中的个人的背景下,“概率之和”甚至“概率”是什么?这些是个人一开始就有的价值观吗?