Update parent_selection_methods.py
This commit is contained in:
@ -151,7 +151,7 @@ class Parent_Selection:
|
|||||||
# The worst chromosome has a weight of 1,
|
# The worst chromosome has a weight of 1,
|
||||||
# the next worst chromosome has a weight of 2,
|
# the next worst chromosome has a weight of 2,
|
||||||
# etc.
|
# 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
|
average_weight = (len(ga.population)+1) // 2
|
||||||
inflation = (1-ga.selection_probability) * average_weight
|
inflation = (1-ga.selection_probability) * average_weight
|
||||||
|
|||||||
Reference in New Issue
Block a user