Happy-Algorithms-League / hal-cgp

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

`permissible_values` is a mixture of scalars and arrays #388

Closed jakobj closed 6 months ago

jakobj commented 6 months ago

permissible_values in Genome should be a list of arrays (https://github.com/Happy-Algorithms-League/hal-cgp/blob/master/cgp/genome.py#L107). However, it seems to be a list of scalars and arrays (e.g.,https://github.com/Happy-Algorithms-League/hal-cgp/blob/master/cgp/genome.py#L189 vs https://github.com/Happy-Algorithms-League/hal-cgp/blob/master/cgp/genome.py#L198).

This causes problems at other points in the code (e.g., Genome.mutate) and should be fixed. Ugh, if only we had strict typing. ;)