EvaluatorThreadForEvoga Class Reference

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

Public Member Functions

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

Detailed Description

this is an helper class for implementing multithread in Evoga

Definition at line 55 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 65 of file evoga.cpp.

Destructor.

Definition at line 74 of file evoga.cpp.

Member Function Documentation

EvoRobotExperiment* getExperiment ( )
inline

Returns the experiment we run.

Returns
the experiment we run

Definition at line 124 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 114 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 95 of file evoga.cpp.

void run ( )
inline

Runs the experiment.

Definition at line 103 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 84 of file evoga.cpp.

References Evoga::getGenes(), and EvoRobotExperiment::setNetParameters().


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