Happy-Algorithms-League / hal-cgp

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

Hurdles relative to champion fitness #371

Open jakobj opened 2 years ago

jakobj commented 2 years ago

Currently, it's only possible to define hurdles like "only the best 50% of the population passes". However, it may also be useful to be able to define hurdles like "only individuals with at least 50% of the fitness of the best individual pass".

As an example, let's consider the following fitness values for the first of two objectives across a population of four individuals: [3, 1, 1, 0]. Using the former hurdle, the first two individuals would be evaluated on the second hurdle (best 50%). Using the latter hurdle, only the first individual would be evaluated on the second hurdle (fitness must be > 1.5, 50% of the best).

The hurdle code should be adapted to support this use case.