我在理解算法時遇到了問題。這裏是最流行的在線看到的遺傳算法輪盤選擇
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
^^^這件作品特別讓我困惑。在一個人羣中,什麼是「概率總和」,甚至是「概率」?這些就像個人在開始時的價值觀?
那麼爲什麼算法將概率之和加到(健身/總和)爲每個成員的人口得到概率...概率應該是(健身/總和)儀式? – user1013905