Once again, we start by changing back to the original settings of the program before we make new modifications:
- We will first modify the tournamentSize parameter of the tournament selection algorithm to 2 (instead of the original value of 3):
toolbox.register("select", tools.selTournament, tournsize=2)
This does not seem to have a noticeable effect on the algorithm's behavior:
- What if we increase the tournament size to a very large value, say 100? Let's see:
toolbox.register("select", tools.selTournament ...