TestRandom Class Reference
Test a robot using a random genotype. More...

Public Member Functions | |
TestRandom () | |
Constructor. | |
virtual | ~TestRandom () |
Destructor. | |
int * | buildRandomDNA () |
Create a random genotype. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
Configures the object using a ConfigurationParameters object. | |
virtual void | runTest () |
Run the test setting random genotype. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
Static Public Member Functions | |
static void | describe (QString type) |
Describe Function. |
Detailed Description
Constructor & Destructor Documentation
TestRandom | ( | ) |
Constructor.
- Warning:
- This class must work correctly even if the configure function is not called, because it could be create without a ConfigurationParameters object when the user doesn't explicitly add this in the configuration file
Definition at line 36 of file tests.cpp.
References AbstractTest::m_iconFilename, AbstractTest::m_menuText, and AbstractTest::m_tooltip.
~TestRandom | ( | ) | [virtual] |
Member Function Documentation
int * buildRandomDNA | ( | ) |
Create a random genotype.
Definition at line 48 of file tests.cpp.
References AbstractTest::component(), Evonet::DEFAULT_VALUE, Evoga::getEvoRobotExperiment(), EvoRobotComponent::getGA(), EvoRobotExperiment::getGenomeLength(), and EvoRobotExperiment::getNeuralNetwork().
Referenced by TestRandom::runTest().
void configure | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Configures the object using a ConfigurationParameters object.
- Parameters:
-
params the configuration parameters object with parameters to use prefix the prefix to use to access the object configuration parameters. This is guaranteed to end with the separator character when called by the factory, so you don't need to add one
Reimplemented from AbstractTest.
void describe | ( | QString | type | ) | [static] |
Describe Function.
Reimplemented from AbstractTest.
Definition at line 75 of file tests.cpp.
References ParameterSettable::addTypeDescription().
void runTest | ( | ) | [virtual] |
Run the test setting random genotype.
Implements AbstractTest.
Definition at line 79 of file tests.cpp.
References TestRandom::buildRandomDNA(), AbstractTest::component(), EvoRobotExperiment::doAllTrialsForIndividual(), EvoRobotExperiment::endGeneration(), Evoga::getEvoRobotExperiment(), EvoRobotComponent::getGA(), Logger::info(), EvoRobotExperiment::initGeneration(), EvoRobotExperiment::setActivityPhase(), and EvoRobotExperiment::setNetParameters().
void save | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Save the actual status of parameters into the ConfigurationParameters object passed.
This is not implemented, a call to this function will cause an abort
- Parameters:
-
params the configuration parameters object on which save actual parameters prefix the prefix to use to access the object configuration parameters.
Reimplemented from AbstractTest.
Definition at line 70 of file tests.cpp.
References ConfigurationParameters::startObjectParameters().
The documentation for this class was generated from the following files: