File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
# Maximum size of the population. Bigger could be faster but is more memory expensive.
13
13
N_POPULATION = 200
14
14
# Number of elements selected in every generation for evolution. The selection takes
15
- # place from the best to the worst of that generation. Must be smaller than N_POPULATION.
15
+ # place from best to worst of that generation. Must be smaller than N_POPULATION.
16
16
N_SELECTED = 50
17
- # Probability that an element of a generation can mutate, changing one of its genes. This
18
- # guarantees that all genes will be used during evolution.
17
+ # Probability that an element of a generation can mutate, changing one of its genes.
18
+ # This guarantees that all genes will be used during evolution.
19
19
MUTATION_PROBABILITY = 0.4
20
20
# Just a seed to improve randomness required by the algorithm.
21
21
random .seed (random .randint (0 , 1000 ))
You can’t perform that action at this time.
0 commit comments