Happy-Algorithms-League / hal-cgp

Cartesian genetic programming (CGP) in pure Python.
GNU General Public License v3.0
28 stars 10 forks source link

Add test for sorting of individuals, fix bug in sorting #344

Closed jakobj closed 2 years ago

jakobj commented 2 years ago

As the title says. Introducing this test unearthed a bug in the sorting of individuals in the case of multiple objectives (used with hurdles) which this PR also fixes: individuals should be sorted according to their fitness values, starting from the last objective, whereas previously they were sorted starting from the first objective. Behind this underlies the assumption that later objectives (in terms of hurdles) are more informative about the quality of an individual.

closes #342

jakobj commented 2 years ago

thanks for the comments! addressed them, pls have another look