Genetic Programming

Genetic Programming: The Process

Genetic programming typically starts with a population of randomly generated computer programs composed of the available programmatic ingredients. Genetic programming iteratively transforms a population of computer programs into a new generation of the population by applying analogs of naturally occurring genetic operations. These operations are applied to individual(s) selected from the population. The individuals are probabilistically selected to participate in the genetic operations based on their fitness (as measured by the fitness measure provided by the human user in the third preparatory step). The iterative transformation of the population is executed inside the main generational loop of the run of genetic programming.

The executional steps of genetic programming are as follows:

  1. Randomly create an initial population (generation 0) of individual computer programs composed of the available functions and terminals.
  2. Iteratively perform the following sub-steps (called a generation) on the population until the termination criterion is satisfied:
    1. Execute each program in the population and ascertain its fitness (explicitly or implicitly) using the problem’s fitness measure.
    2. Select one or two individual program(s) from the population with a probability based on fitness (with reselection allowed) to participate in the genetic operations detailed below.
    3. Create new individual program(s) for the population by applying the following genetic operations with specified probabilities:
      1. Reproduction: Copy the selected individual program to the new population.
      2. Crossover: Create new offspring program(s) for the new population by recombining randomly chosen parts from two selected programs.
      3. Mutation: Create one new offspring program for the new population by randomly mutating a randomly chosen part of one selected program.
      4. Architecture-altering operations: Choose an architecture-altering operation from the available repertoire of such operations and create one new offspring program for the new population by applying the chosen architecture-altering operation to one selected program.
  3. After the termination criterion is satisfied, the single best program in the population produced during the run (the best-so-far individual) is harvested and designated as the result of the run. If the run is successful, the result may be a solution (or approximate solution) to the problem.

The above is summarised in terms of a flowchart
© www.genetic-programming.com