StefanoSteadyStateGA. More...

Inheritance diagram for StefanoSteadyStateGA:

List of all members.

Public Member Functions

 StefanoSteadyStateGA ()
 Constructor.
virtual ~StefanoSteadyStateGA ()
 Destructor.
virtual void configure (ConfigurationParameters &params, QString prefix)
 Configure the object using the ConfigurationParameters specified.
virtual QVector< Evaluation * > evaluationPool ()
 Return the Evaluation Pool containing the Evaluations used.
virtual EvaluationevaluationPrototype ()
 Returns the Evaluation object used as prototype to eventually generate other evaluators.
virtual void finalize ()
 Finalize the Genetic Algorithm Process.
virtual void gaStep ()
 Execute a single minor step and return.
virtual void initialize ()
 Initializes the Genetic Algorithm Process and sets current generation to zero.
Mutationmutation ()
 Return the Mutation operator.
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
void setEvaluation (Evaluation *fitfunc)
 Set the fitness function to use.
void setMutation (Mutation *mutation)
 Set the Mutation operator to use.
virtual void skipEvaluation ()
 Skip the evaluation phase and put the algorithm in the state just after the evaluation.

Static Public Member Functions

static void describe (QString)
 Describe the parameters and subgroups necessary to configure it.

Protected Types

enum  GAPhases {
  initParent, evalParent, initOffspring, evalOffspring,
  compareOffspring, nextGeneration, endEvolution
}
 

used to manage GA cycle

More...

Protected Attributes

QVector< double > cumulatedFitness
 The cumulated value of fitness so far (i.e.
unsigned int curGenotype
 the current genotype
GAPhases curPhase
 current Phase
Evaluationfitfunc
 fitness function
bool isFinalized
 True if StefanoSteadyStateGA is finalized.
bool isInitialized
 True if StefanoSteadyStateGA is initialized.
Mutationmuta
 mutation operator
QVector< unsigned int > numEvaluations
 The number of times each genotype has been evaluated.
Genotypeoffspring
 The offspring of the current genotype.

Detailed Description

StefanoSteadyStateGA.

Description
ADD DESCRIPTION HERE
Warnings

Definition at line 41 of file stefanosteadystatega.h.


Member Enumeration Documentation

enum GAPhases [protected]

used to manage GA cycle

Definition at line 99 of file stefanosteadystatega.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 32 of file stefanosteadystatega.cpp.

~StefanoSteadyStateGA ( ) [virtual]

Destructor.

Definition at line 46 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::fitfunc, and StefanoSteadyStateGA::muta.


Member Function Documentation

void configure ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Configure the object using the ConfigurationParameters specified.

Parameters:
paramsthe object with configuration parameters
prefixthe group in which parameters are expected to be (this is terminated by a separator character). We expect to receive as prefix the groupwhich contains all GA parameters

Implements ParameterSettableWithConfigureFunction.

Definition at line 51 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::fitfunc, GeneticAlgo::genome(), ConfigurationParameters::getObjectFromGroup(), ConfigurationParameters::getValue(), GeneticAlgo::numGenerations(), StefanoSteadyStateGA::setEvaluation(), Evaluation::setGenome(), GeneticAlgo::setGenome(), StefanoSteadyStateGA::setMutation(), GeneticAlgo::setNumGenerations(), and Logger::warning().

QVector< Evaluation * > evaluationPool ( ) [virtual]

Return the Evaluation Pool containing the Evaluations used.

Implements GeneticAlgo.

Definition at line 92 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::fitfunc.

Evaluation * evaluationPrototype ( ) [virtual]

Returns the Evaluation object used as prototype to eventually generate other evaluators.

This object could be or could be not used to compute the fitness of genotypes (depending on the specific genetic algorithm)

Implements GeneticAlgo.

Definition at line 87 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::fitfunc.

Mutation * mutation ( )

Return the Mutation operator.

Definition at line 104 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::muta.

Referenced by StefanoSteadyStateGA::save(), and StefanoSteadyStateGA::setMutation().

void save ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Save the actual status of parameters into the ConfigurationParameters object passed.

Parameters:
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Implements ParameterSettable.

Definition at line 62 of file stefanosteadystatega.cpp.

References ConfigurationParameters::createParameter(), ConfigurationParameters::createSubGroup(), StefanoSteadyStateGA::fitfunc, GeneticAlgo::genome(), StefanoSteadyStateGA::mutation(), GeneticAlgo::numGenerations(), Genome::save(), Mutation::save(), and ParameterSettable::save().

void setEvaluation ( Evaluation fitfunc)

Set the fitness function to use.

Definition at line 82 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::fitfunc, and Evaluation::setGA().

Referenced by StefanoSteadyStateGA::configure().

void setMutation ( Mutation mutation)
void skipEvaluation ( ) [virtual]

Skip the evaluation phase and put the algorithm in the state just after the evaluation.

This can be used after restarting an interrupted evolution to prevent re-evaluation of the genome that was loaded from file.

Implements GeneticAlgo.

Definition at line 229 of file stefanosteadystatega.cpp.

References StefanoSteadyStateGA::curPhase, and GeneticAlgo::evaluationDone.


Member Data Documentation

QVector<double> cumulatedFitness [protected]

The cumulated value of fitness so far (i.e.

the sum of all fitness values obtained in subsequent evaluations of the same genotype)

Definition at line 112 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().

unsigned int curGenotype [protected]

the current genotype

Definition at line 103 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().

bool isFinalized [protected]

True if StefanoSteadyStateGA is finalized.

Definition at line 107 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::finalize(), and StefanoSteadyStateGA::initialize().

bool isInitialized [protected]

True if StefanoSteadyStateGA is initialized.

Definition at line 105 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::finalize(), and StefanoSteadyStateGA::initialize().

QVector<unsigned int> numEvaluations [protected]

The number of times each genotype has been evaluated.

Definition at line 109 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().

Genotype* offspring [protected]

The offspring of the current genotype.

Definition at line 114 of file stefanosteadystatega.h.

Referenced by StefanoSteadyStateGA::finalize(), StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().


The documentation for this class was generated from the following files: