The solution implements a good Genetic Algorithm with both a classical population and a island model. The first one follows the literature given by the course, quickly returning its results. Personally I would have used a OFFSPRING_SIZE larger than the POPULATION_SIZE and bigger numbers in general for the two variables (to get closer to the solution while losing a bit of speed). The island model manages to get slightly better results (with POPULATION_SIZE=200 and OFFSPRING_SIZE=300 it sometimes can complete problems with size 1). The extinction every 50 generations is a nice addition to escape from a plateau of fitness values. One thing that I noticed is that when migrations or extinctions happen the niches should get ordered before extracting the best individual of the current generation (this error is noticeable as a drop in the fitness graphs).
In conclusion this is a very nice implementation, it just needs a bit of tuning.
The solution implements a good Genetic Algorithm with both a classical population and a island model. The first one follows the literature given by the course, quickly returning its results. Personally I would have used a OFFSPRING_SIZE larger than the POPULATION_SIZE and bigger numbers in general for the two variables (to get closer to the solution while losing a bit of speed). The island model manages to get slightly better results (with POPULATION_SIZE=200 and OFFSPRING_SIZE=300 it sometimes can complete problems with size 1). The extinction every 50 generations is a nice addition to escape from a plateau of fitness values. One thing that I noticed is that when migrations or extinctions happen the niches should get ordered before extracting the best individual of the current generation (this error is noticeable as a drop in the fitness graphs). In conclusion this is a very nice implementation, it just needs a bit of tuning.