Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > GeneticAlgorithm > RSGenerics.GeneticProgramming > Classes > TRSCustomGeneticProgramming<T> > Methods

TRSCustomGeneticProgramming<T>.EvaluateFitness(TRSIndividual,Boolean) Method

Scroll Prev Top Next More

Returns a fitness estimation of the passed in RSGeneticBase.TRSIndividual . It uses your    OnEvaluateFitness event handler to return the value.

Defining your fitness function is a highly important part of defining a genetic algorithm or genetic program. The fitness function returns a floating point value that specifies the correctness of the individual solution. The fitness function needs to be able to allow the genetic component to decide which solution is better than another. The genetic component will seek to either maximize the solution (e.g., keep evolving for individuals whose fitness are greater than other individuals in the population) or to minimize the solution (e.g., find the individuals whose fitness are less than other individuals). Note you can specify which direction to evolve towards with the    FitnessMethod property.

The overloaded    EvaluateFitness method evaluates the fitness for every individual of the Population (and calculates the    MaxFitness,    MinFitness, and    AvgFitness).
 

Namespace: RSGenerics.GeneticProgramming

Parameters

Item

Type: TRSIndividual

Weighted

Type: Boolean

Return Value

Type: TGAFitness

Overrides

TRSCustomGeneticComponent.EvaluateFitness(TRSIndividual,Boolean)
 

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb