Start here and select target platform.
Select data type that will be utilized to store state of CGP node. Floating point data types (float, double) are suitable for symbolic regression, integer data types (int, long) are suitable for evolutionary design of digital circuits. You can also declare your own structure.
Now you need to define the list of predefined primitive functions. Each CGP node can implement one of these functions.
Each function should calculate the state of a node placed at position given by index out. The function is described using common C language. Indices in1, in2, etc. specify the indices of CGP nodes connected to first, second, etc. node's input.
Example (addition with saturation):
int tmp = nodeoutput[in1] + nodeoutput[in2]; nodeoutput[out] = (tmp > 255) ? 255 : tmp
We have declared one function. Let us generate the CGP compiler.
Please retype the security code and press the button "Generate code".