Genetic Programming Population.
PropertiesCopyright © 1999 by Adi Andrei aandrei@writeme.com
Index of the best individual in the population. To get the body of this individual:
var MyBody:string; begin MyBody := Gp.Ind[BestIndex].Body; .... end;
Percent of individuals to perform crossover on when creating a new population/generation. Default is 50.
Keep the best individual in the next generation. Default is True.
Fitness Stop Condition. Default is 90.
No of generations to run when using Execute method. Default is 50.
No of individuals. Default is 100.
Maximum length for an individual. Default is 1024.
Used with OnIndEval event. Default is 0.
Probability of functions in generation zero. Default is 50.
Max length of an individual in gen zero, as percent of IndLength. Default is 50.
Add function to the function set. ( function name ; no of parameters)
Add a terminal to the terminal symbols set.
Constructor.
Destructor.
Evaluate Population.
Automatically run the following sequence :
Running:=true; Gen:=0; GenZero; Result:=GoOn;
Run Generation Zero.
Returns the number of functions in the function set.
Returns the number of terminals in the terminal set.
Automatically run the remaining generations until reaching the end or until the FitStop condition is satisfied.
Initialize population. Clears the terminal / function set. Clears all individuals.
Run (evolve) the next generation.
Stop running started by Execute method.
Occurs after evaluating one individual.
Occurs before evaluating one individual.
Minimum specified fitness reached.
Custom individual evaluation function to be designed by the user. In the body of the event handling function, set the Instantfitness property.
ex:
procedure TForm1.GPIndEval(Sender: TObject; Body: String); Begin Gp.InstantFitness:= user_eval(Body); End;
where: - Body is the body of the individual (s-expression) to evaluate. - InstantFitness is the fitness that will be associated to that individual. - Gp is an instance of the GPopulation component, used for the example. - user_eval(Body) is the fitness function writen by the user
Function set.
Generation running. Initial value is 0.
Original population.
Is the 'execute' method running ? Initial value is False.
Terminal symbols set.