EvolutionRun(popsize,
root_node,
mindepth,
maxdepth,
buildmethod,
max_nb_runs,
fitness_criterion,
crossover_prob,
mutation_prob,
size,
prob_selection,
dbname,
verbose)
| source code
|
Function: EvolutionRun
The highest level function of the package. It starts an evolutionary
run with given parameters,and gives indications of what is found after
each generation.
- Parameters:
popsize - size of the population root_node: specify the root node and its
arity (nb of children). e.g. (0,2,'root')
mindepth - min tree depth (at the moment only 2 working)
maxdepth - max depth of trees in new generation (should be >=3)
buildmethod - which Koza method is used to build the trees (either
'AddHalfNode' or 'AddFullNode' or 'AddGrowNodeMin' respectively
for Ramped Half-n-Half, Full, or Half)
max_nb_runs - the search will gon on until a maximum number of generations is
reached
fitness_criterion - the search will stop if the fitness found is <= to the ideal
fitness
crossover_prob - probability of crossover (will determine what proportion of the
population will be replaced by crossover-generated offsprings)
mutation_prob - probability of crossover (will determine what proportion of the
population will be replaced by mutation-generated offsprings)
dbname - path to database e.g.
r'D:d_work\pythongp\pySTGP_0.51\src\pop_db'
verbose - print the best tree of each generation
|