next up previous
Next: Implementation in C Up: Theory Previous: Genetic programming operators

Assigning a fitness value

Now that we are basically left with two operators to implement, how do we select the individuals for crossover and reproduction? We have said nothing so far as to indicate how this done. Fortunately, genetic algorithms show us the way: fitness. We must determine how good the individuals are at solving the given problem. And as with genetic algorithms, the crossover and reproduction operations are separate from the actual evaluation of the fitness, making the genetic programming operators problem-independent.

The measurement of fitness is a rather nebulous subject. Since, it is highly problem-dependent, we consider massaging the results to make fitness evaluation much easier, through a process known as scaling. Simply put, scaling standardizes the measurement of how fit a particular individual is with repsect to the rest of the population. Based on the fitness value, we go about this selection for survival in one of two ways:

The fitness function is determined subjectively. For example, we could include the depth of the tree as a potential quality we wish to control, and therefore we could develop a fitness function which takes this into account.