January 2020
Intermediate to advanced
346 pages
9h 8m
English
Let's go back to the original settings once more, in preparation for our last experiment, as we will now try replacing the tournament selection algorithm with roulette wheel selection, which was described in Chapter 2, Understanding the Key Components of Genetic Algorithms. This is done as follows:
toolbox.register("select", tools.selRoulette)
This change seems to have an adverse effect on the algorithm's results. As the following plot shows, there are numerous points in time where the best solution is forgotten as a result of the selection, and the max fitness value decreases, at least temporarily, although the average fitness value keeps increasing. This is because the roulette selection algorithm selects individuals ...
Read now
Unlock full access