Fixed stochastic_arithmetic inflation
This commit is contained in:
@ -153,8 +153,8 @@ class Parent_Selection:
|
|||||||
# etc.
|
# etc.
|
||||||
# with an inflation of (1-selection probability) * sum of weights
|
# with an inflation of (1-selection probability) * sum of weights
|
||||||
|
|
||||||
sum_of_weights = round(len(ga.population) * (len(ga.population)+1) / 2)
|
average_weight = (len(ga.population)+1) // 2
|
||||||
inflation = (1-ga.selection_probability) * sum_of_weights
|
inflation = (1-ga.selection_probability) * average_weight
|
||||||
|
|
||||||
weights = [
|
weights = [
|
||||||
i + inflation
|
i + inflation
|
||||||
|
|||||||
Reference in New Issue
Block a user