Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

XRDS: Hello World (September 2010)

The code for the article Hands-On Introduction to Genetic Programming (XRDS, September 2010)

| More

Basic setup (as appears in the article):

  1. Download and install OpenBeagle from here
  2. Download the source files from here (note: this is a zip archive)
  3. Unpack the archive into a new folder.
  4. Compile the file main.cpp with your favorite C++ compiler.
    • Make sure that the compilation and linking flags are properly set for OpenBeagle.

Advanced setup

  • Gnuplot
  • Perl
  • The following Perl modules: XML::XPath, GraphViz::XML, Getopt::Long


  1. Run the script run.sh from the downloaded archive.
  2. The following files will be produced:
  • tree.ps - the visual representation of the genotype of the best individual
  • graph.eps - the plot of the best individual alongside the initial data