Happy-Algorithms-League / hal-cgp

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

Compare set expression for output to target expression #359

Open HenrikMettler opened 2 years ago

HenrikMettler commented 2 years ago

When using genome.set_expression_for_output one usually has a target expression that the output node should compile to. Since mistakes in setting the dna can happen easily (eg. by changing the order of primitives) - a built-in check can be useful. This PR implements the comparison using sympy.parse_expr and a compilation to sympy of the genome.

jakobj commented 2 years ago

ping @HenrikMettler

mschmidt87 commented 1 year ago

Did @HenrikMettler resolve all your comments, @jakobj ? Could you give this another check?

jakobj commented 1 year ago

i think i don't have any more pressing comments, besides squashing commits please and fixing tests :)

mschmidt87 commented 1 year ago

@HenrikMettler could you fix the tests, rebase on master and squash the commits?