EvaluatorThreadForXnes Class Reference

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

Public Member Functions

 EvaluatorThreadForXnes (Evoga *ga, EvoRobotExperiment *exp)
 Constructor. More...
 
 ~EvaluatorThreadForXnes ()
 Destructor. More...
 
double getError () const
 Returns the similarity error of the last run. 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, float *genes)
 Configures the experiment with the given genotype id. More...
 

Detailed Description

this is an helper class for implementing multithread in xNES

Definition at line 161 of file evoga.cpp.

Constructor & Destructor Documentation

EvaluatorThreadForXnes ( 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 171 of file evoga.cpp.

Destructor.

Definition at line 180 of file evoga.cpp.

Member Function Documentation

double getError ( ) const
inline

Returns the similarity error of the last run.

Returns
the fitness of the last run

Definition at line 232 of file evoga.cpp.

EvoRobotExperiment* getExperiment ( )
inline

Returns the experiment we run.

Returns
the experiment we run

Definition at line 242 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 222 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 202 of file evoga.cpp.

void run ( )
inline
void setGenotype ( int  id,
float *  genes 
)
inline

Configures the experiment with the given genotype id.

Parameters
idthe genotype id to use in this experiment
genesthe genotype to use in this experiment

Definition at line 191 of file evoga.cpp.

References EvoRobotExperiment::setNetParameters().


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