The GP.Lab Genetic Programming Kernel (continued)

This second post on our custom Genetic Programming implementation covers selection and genetic operators implemented by the kernel.

Selection Strategies The GP kernel implements a generational algorithm and currently supports the three most popular selection modes for selecting parents to produce offspring for the next generation:

Tournament Selection, i.e. for a tournament size T randomly pick T programs from the parent population and return the winner of the tournament - the program with the best fitness.
The selection method of choice in the GA community as it allows to fine-tune the selection pressure via the tournament size parameter to avoid premature loss of diversity (i.e. fittest programs dominating the population with their copies).

Roulette Wheel, a flavor of Fitness Proportionate Selection where the chance of an individual to become a parent is proportional to its fitness, i.e. parents with the highest absolute fitness in the population have a higher chance of producing offs…

The GP.Lab Genetic Programming Kernel

GP.Lab uses a proprietary Genetic Programming implementation written in C++. The representation of individuals is accomplished in a rather 'verbal' way with dedicated program and node classes.

Though systems like TinyGP demonstrate that it's perfectly feasible to implement tree-based GP systems with minimal amounts of code as well as minimal memory footprint at runtime using flattened (linear) representation for trees we prefer the OO approach: Common techniques for object-oriented code allow us to structure the kernel in a way that's easy to understand and to extend (e.g. to adapt to specific problems).

The GP kernel implements the basic mechanics of the Genetic Programming system, i.e. representation of individual programs, algorithms for initialization and selection as well as the genetic operators.

At this point the three standard initialization mechanisms for new programs are supported:
GrowFull and Ramped Half&Half. It's probably worth noting that the sy…

About GP.Lab

Hi there and welcome to the GP.Lab blog.

So what's "GP.Lab"? It's a Genetic Programming Workbench and a work in progress. Besides being a fun, non-profit software research project its main goal is to investigate machine learning (Genetic Programming in particular) and its applications to automatically solve a range of problems.

GP.Lab implements a modular architecture: Individual tasks or problems are essentially plug-ins to the core app containing everything related to the specific problem to be solved such as
Specific operators  (Robot steering commands, access to data sources)A visualization appropriate for the taskAdditional logic required to evaluate programs (e.g. a simulation environment) The core app implements basic functionality such as the core GP kernel algorithm, methods for managing the GP population, as well as a bunch of statistical tools to provide insight into the simulated evolutionary process.

Initial Set of Tasks At this point GP.Lab includes imp…