Update parent_selection_methods.py

This commit is contained in:
SimpleArt
2020-12-13 12:11:42 -05:00
committed by GitHub
parent 403219a7ba
commit eaf22c07d2

View File

@ -151,7 +151,7 @@ class Parent_Selection:
# The worst chromosome has a weight of 1,
# the next worst chromosome has a weight of 2,
# etc.
# with an inflation of (1-selection probability) * sum of weights
# with an inflation of (1-selection probability) * average weight
average_weight = (len(ga.population)+1) // 2
inflation = (1-ga.selection_probability) * average_weight