我在理解算法方面遇到了问题。以下是网上最流行的算法。
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
^^^这段内容让我感到困惑。在个体所处的群体中,“概率总和”和“概率”是什么意思?这些像是个体一开始就拥有的价值观吗?