Happy-Algorithms-League / hal-cgp

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

Evaluate objective in C #366

Open HenrikMettler opened 2 years ago

HenrikMettler commented 2 years ago

For some applications, one might want to evaluate fitness in C. Here CartesianGraph is extended with a function to_c which writes the computational graph into a C-module. An example is provided which performs L2 regression on a simple target function. Note: Due to a late api change (writing files instead of returning strings) the test is currently not working - I left it as commented out code since large junks of it should be reusable with reading from generated files