This Processing-built applet demonstrates the Psh library being used to run genetic programming on a simple symbolic regression problem. Psh is the Java implementation of the Push programming language, which is designed specifically for evolutionary computation.
This applet evolves solutions to y = x^2 - 7. Simply load the page and watch it go! The buttons can be used to restart the genetic programming run and to pause and play the run. The best solution found so far is printed at the bottom. The charts give data on the best program values and best program historical fitnesses, respectively.
First, you must have a copy of Processing. You will then need to install the libraries for Psh and gwoptics, the library used to generate the charts. These libraries must be downloaded and unzipped in the Processing libraries directory, as described on the Processing wiki. The Psh library can be downloaded directly from here The gwoptics library can be found here.
Finally, you must download the source code. While you may download the code directly from the links under the applet, the source relies on extra files in the data directory that is not available there. Instead, it is recommended to download and unzip the entire Processing project from here, which can be placed directly in your Processing sketchbook.
Now you are ready to run the source code in Processing. Open up Processing, and VisualSymbolicRegression should be an option as a project to open. Open it up, and it should be able to run! If not, make sure you have followed the steps above, and try again.
Note that you can select a different configuration file in the setup() function in order to customize the symbolic regression run. The configuration files must be located in the data directory.
This material is based upon work supported by the National Science Foundation under Grant No. 1017817. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of the National Science Foundation.