EvaluatorThreadForEvoga Class Reference

this is an helper class for implementing multithread in Evoga More...

Public Member Functions

 EvaluatorThreadForEvoga (Evoga *ga, EvoRobotExperiment *exp)
 Constructor.
 
 ~EvaluatorThreadForEvoga ()
 Destructor.
 
EvoRobotExperimentgetExperiment ()
 Returns the experiment we run.
 
double getFitness () const
 Returns the fitness of the last run.
 
int getGenotypeId () const
 Returns the id of the genotype used in this experiment.
 
void run ()
 Runs the experiment.
 
void setGenotype (int id)
 Configures the experiment with the given genotype id.
 

Detailed Description

this is an helper class for implementing multithread in Evoga

Definition at line 46 of file evoga.cpp.

Constructor & Destructor Documentation

EvaluatorThreadForEvoga ( Evoga ga,
EvoRobotExperiment exp 
)
inline

Constructor.

Parameters
gaa pointer to the genetic algorithm
expthe experiment to run. We take ownership of the experiment and free its memory at destruction

Definition at line 56 of file evoga.cpp.

Destructor.

Definition at line 65 of file evoga.cpp.

Member Function Documentation

EvoRobotExperiment* getExperiment ( )
inline

Returns the experiment we run.

Returns
the experiment we run

Definition at line 115 of file evoga.cpp.

double getFitness ( ) const
inline

Returns the fitness of the last run.

Returns
the fitness of the last run

Definition at line 105 of file evoga.cpp.

int getGenotypeId ( ) const
inline

Returns the id of the genotype used in this experiment.

Returns
the id of the genotype used in this experiment

Definition at line 86 of file evoga.cpp.

void run ( )
inline

Runs the experiment.

Definition at line 94 of file evoga.cpp.

References EvoRobotExperiment::doAllTrialsForIndividual(), and EvoRobotExperiment::getFitness().

void setGenotype ( int  id)
inline

Configures the experiment with the given genotype id.

Parameters
idthe genotype id to use in this experiment

Definition at line 75 of file evoga.cpp.

References EvoRobotExperiment::setNetParameters().


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