Fitness Cases Are input-output pairs describing the output a program should produce given the...

11
Genetic Programm ing Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually a function of the output produced by the individual and the target value for each fitness case. The success of the GP system is to some extent dependant on the choice of fitness cases.

Transcript of Fitness Cases Are input-output pairs describing the output a program should produce given the...

Page 1: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingFitness Cases

Are input-output pairs describing the output a program should produce given the particular input value.

The fitness of an individual is usually a function of the output produced by the individual and the target value for each fitness case.

The success of the GP system is to some extent dependant on the choice of fitness cases.

Page 2: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingExample of Fitness Cases

Inputs: x Target Value 1 0 2 3 3 8 4 15 5 24

Page 3: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingFitness Functions

Fitness functions calculate fitness measures. Fitness measures are used by selection

methods to choose parents. Commonly used fitness functions:

How well the individual solves the problem. A minimization of the size of the programs induced. A minimization of the run time of the programs. A minimization of the cost of solving the problem.

Multi-objective fitness functions.

Page 4: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingMeasures of Fitness

Raw Fitness Standardized Fitness Adjusted Fitness Normalized Fitness Hits Ratio

Calculated whenusing the fitnessproportionate selection method

Page 5: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingRaw Fitness

Indicates how promising an individual is . Depending on the problem a better raw fitness

may be a smaller value, e.g. the fitness error or a bigger value, e.g. the amount of found eaten by the artificial ant in the artificial ant problem.

A commonly used raw fitness function is the error function:

r i t s i j C jj

N

( , ) | ( , ) ( ) |

1

Page 6: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingStandardized Fitness

Standardized fitness s(i,t) describes the raw fitness so that a lower numerical value is always better.

The best value of the standardized fitness is zero. In problems where a smaller fitness value means a

better fitness the standardized fitness and the raw fitness are equal, i.e. s(i,t) = r(i,t).

In problems where the a larger value is a better fitness the standardized fitness is calculated by subtracting the raw fitness from the maximum raw fitness value that can be attained.

Page 7: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingAdjusted Fitness

The range of the adjusted fitness is zero to one.

The adjusted fitness is higher for fitter individuals of the population.

The adjusted fitness is calculated by incrementing the standardized fitness by one and taking the inverse of the incremented value.

Page 8: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingNormalized Fitness

The normalized fitness of an individual is the individuals adjusted fitness divided by the sum of the adjusted fitness for all elements of the population.

The normalized fitness lies between zero and one.

It is larger for fitter individuals in the population. The sum of the normalized fitness values for

each individual in the population is one.

Page 9: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingHits Ratio

Is the number of fitness cases for which the value produced by an individual is the same or within a specified bound of the target value for each fitness case.

Is used to determine whether a solution has been found.

Page 10: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingExample

Individual:

Bound: 0.01Fitness cases:Input Target Value Produced Error

By Individual1 0 1 12 3 4 13 8 9 14 15 16 15 24 25 1

*

x x

Raw Fitness: 5

Standardized Fitness: 5

Adjusted Fitness: 0.17

Hits Ratio: 0

Page 11: Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.

Genetic ProgrammingAspects to Vary

Fitness cases Fitness function GP parameters:

Bound