Evaluation Process Interface. More...
![Inheritance graph](classfarsa_1_1Evaluation__inherit__graph.png)
Public Member Functions | |
Evaluation () | |
Default Constructor. | |
virtual | ~Evaluation () |
Destructor. | |
virtual Evaluation * | clone () const =0 |
Create an exact copy of Evaluation. | |
virtual void | endGeneration (int generation) |
Called at the end of each generation. | |
void | evaluate () |
It evaluate the Genotype in a single-shot calling as many times as necessary evaluateStep. | |
void | evaluateStep () |
Execute a single minor step and return. | |
void | finalize () |
Finalize the Evaluation Process. | |
GeneticAlgo * | GA () |
Return the GeneticAlgo used. | |
const GeneticAlgo * | GA () const |
Return the GeneticAlgo used (const version) | |
Genome * | genome () |
Return the Genome. | |
Genotype * | genotype () |
return the Genotype to Evaluate | |
unsigned int | genotypeID () |
Return the index of the Genotype into the Genome. | |
virtual void | initGeneration (int generation) |
Called at the beginning of each generation. | |
void | initialize (Genotype *genotypeToEvaluate) |
Initialize the Evaluation Process. | |
bool | isEvaluationDone () |
return true if the Evaluation Process has finish | |
void | setGA (GeneticAlgo *g) |
Set the GeneticAlgo used. | |
void | setGenome (Genome *g) |
Set the Genome where Genotypes lives. | |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix)=0 |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
ParameterSettable () | |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
virtual void | save (ConfigurationParameters ¶ms, QString prefix)=0 |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Protected Member Functions | |
void | evaluationDone () |
Called by developers for signaling the end of Evaluation Process. | |
virtual void | fini ()=0 |
Re-implemented by Users for fit to own experiments. | |
virtual void | init ()=0 |
Re-implemented by Users for fit to own experiments. | |
virtual void | step ()=0 |
Re-implemented by Users for fit to own experiments. | |
![]() | |
void | notifyChangesToParam (QString paramName) |
![]() | |
void | notifyChangesToParam (QString paramName) |
Additional Inherited Members | |
![]() | |
enum | Property |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
![]() | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
![]() | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
![]() | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
Detailed Description
Evaluation Process Interface.
Interface of the Evaluation Process Evalution Process consist of one or more steps for calculating the fitness of Genotype The Evaluation Process follow this schema:
- set the Genotype which do you want calculate the fitness with setGenotype
- call initialize (optional it will automatically at first step calls)
- while( ! isEvaluationDone() ) call evaluateStep()
- call finalize (optional it will automatically called when finish the evaluation
- query the fitness with Genotype::fitness() method
Definition at line 45 of file evaluation.h.
Constructor & Destructor Documentation
Evaluation | ( | ) |
Default Constructor.
Definition at line 25 of file evaluation.cpp.
|
virtual |
Destructor.
Definition at line 35 of file evaluation.cpp.
Member Function Documentation
|
pure virtual |
Create an exact copy of Evaluation.
Implemented in MultiTrials.
|
inlinevirtual |
Called at the end of each generation.
The default implementation is empty
Definition at line 73 of file evaluation.h.
Referenced by StefanoSteadyStateGA::gaStep().
void evaluate | ( | ) |
It evaluate the Genotype in a single-shot calling as many times as necessary evaluateStep.
- Warning
- this is a blocking method
Definition at line 63 of file evaluation.cpp.
References Evaluation::evaluateStep(), and Evaluation::isEvaluationDone().
void evaluateStep | ( | ) |
Execute a single minor step and return.
- Warning
- if you forget to initialize the Evaluation, this method will return a Fatal error blocking the execution of the application
Definition at line 55 of file evaluation.cpp.
References Evaluation::step().
Referenced by Evaluation::evaluate(), and StefanoSteadyStateGA::gaStep().
|
protected |
Called by developers for signaling the end of Evaluation Process.
- Warning
- this does not automatically calls finalize()
Definition at line 83 of file evaluation.cpp.
void finalize | ( | ) |
Finalize the Evaluation Process.
Definition at line 69 of file evaluation.cpp.
References Evaluation::fini().
Referenced by StefanoSteadyStateGA::gaStep().
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::finalize().
|
inline |
Return the GeneticAlgo used.
Definition at line 99 of file evaluation.h.
|
inline |
Return the GeneticAlgo used (const version)
Definition at line 103 of file evaluation.h.
|
inline |
Return the Genome.
Definition at line 91 of file evaluation.h.
Referenced by Evaluation::initialize().
|
inline |
return the Genotype to Evaluate
Definition at line 79 of file evaluation.h.
Referenced by StefanoSteadyStateGA::gaStep().
|
inline |
Return the index of the Genotype into the Genome.
Definition at line 83 of file evaluation.h.
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::initialize().
|
inlinevirtual |
Called at the beginning of each generation.
The default implementation is empty
Definition at line 68 of file evaluation.h.
Referenced by StefanoSteadyStateGA::gaStep(), and StefanoSteadyStateGA::initialize().
void initialize | ( | Genotype * | genotypeToEvaluate | ) |
Initialize the Evaluation Process.
- Parameters
-
genotypeToEvaluate is the Genotype to evaluate
Definition at line 39 of file evaluation.cpp.
References Genome::find(), Evaluation::genome(), and Evaluation::init().
Referenced by StefanoSteadyStateGA::gaStep().
bool isEvaluationDone | ( | ) |
return true if the Evaluation Process has finish
Definition at line 79 of file evaluation.cpp.
Referenced by Evaluation::evaluate(), and StefanoSteadyStateGA::gaStep().
|
inline |
Set the GeneticAlgo used.
Definition at line 95 of file evaluation.h.
Referenced by StefanoSteadyStateGA::setEvaluation(), SimpleGA::setEvaluation(), NSGA2::setEvaluation(), ParallelGA::setEvaluation(), and LaralGA::setFitnessFunction().
|
inline |
Set the Genome where Genotypes lives.
Definition at line 87 of file evaluation.h.
Referenced by StefanoSteadyStateGA::configure(), NSGA2::configure(), SimpleGA::configure(), ParallelGA::configure(), LaralGA::configure(), SimpleGA::gaStep(), NSGA2::gaStep(), ParallelGA::gaStep(), and StefanoSteadyStateGA::initialize().
|
protectedpure virtual |
Re-implemented by Users for fit to own experiments.
Referenced by Evaluation::evaluateStep().
The documentation for this class was generated from the following files:
- ga/include/core/evaluation.h
- ga/src/core/evaluation.cpp