Page 166 - 49A Field Guide to Genetic Programming
P. 166
152 B TinyGP
4. The system is steady state. A “generation” is considered concluded
when POPSIZE (see below) crossover/mutation events have been per-
formed.
5. Selection is performed using tournament selection.
6. Negative tournaments are used for the selection of the individuals to
be replaced at each steady-state-GP iteration.
7. Subtree crossover is used. The selection of crossover points is uniform,
so every node is chosen equally likely.
8. Point mutation is used. That is, points (nodes) in the tree are ran-
domly chosen. If a point is a terminal, then it is replaced by another
randomly chosen terminal. If it is a function, then it is replaced by
another randomly chosen function with the same number of inputs.
9. The following parameters are implemented as static class variables:
• The maximum length any GP program can take: MAX LEN.
• The size of the population: POPSIZE.
• The maximum depth initial programs can have: DEPTH. Note 0
represents the depth of programs containing just one terminal.
• The maximum number of generations allowed for a run:
GENERATIONS.
• The probability of creating new individuals via
crossover: CROSSOVER PROB. The mutation probability is
1 - CROSSOVER PROB.
• The mutation probability (per node) when point mutation is cho-
sen as the variation operator: PMUT PER NODE.
• The tournament size: TSIZE.
10. The parameters and the random seed are printed when each run starts.
11. The fitness function is minus the sum of the absolute differences be-
tween the actual program output and the desired output for each fit-
ness case. TinyGP maximises it.
12. The grow initialisation method is used to create the initial population.
13. At each generation the following statistics are calculated and printed:
• The generation number.
• The average fitness of the individuals in the population.
• The fitness of the best individual in the population.