27 #include "evorobotcomponent.h"
28 #include "evorobotexperiment.h"
30 #include "configurationhelper.h"
40 m_tooltip =
"Create a random genotype and it will run a test on it";
53 int* randomDna =
new int[length];
59 for(
int i=0; i<length; i++)
61 randomDna[i] = rand()%256;
81 Logger::info(
"Test Random Individual - Starting the test of an agent with a random DNA" );
101 populationLoaded(true)
104 m_tooltip =
"Run a test on the individual selected with \"Individual to Test\" view";
115 if ( !filename.isEmpty() ) {
124 if ( !populationFile.isEmpty() ) {
127 params.
createParameter( prefix,
"idIndividual", QString::number(idIndividual) );
132 d.
describeString(
"populationFile" ).
help(
"The name of the file from wich to load the genotypes to test" );
138 if ( !populationLoaded ) {
141 QRegExp reg(
"[BG][0-9]+S([0-9]+).gen");
142 reg.indexIn( populationFile );
144 Logger::info( QString(
"TestIndividual - Loaded Genome from %1").arg(populationFile) );
145 populationLoaded =
true;
147 Logger::info( QString(
"TestIndividual - Start of the Test of Individual %1").arg(idIndividual) );
154 Logger::info( QString(
"TestIndividual - End of the Test of Individual %1").arg(idIndividual) );
158 this->idIndividual = idIndividual;
162 if ( populationFile != filename ) {
163 populationFile = filename;
164 populationLoaded =
false;
166 if ( !deferLoading ) {
169 QRegExp reg(
"[BG][0-9]+S([0-9]+).gen");
170 reg.indexIn( populationFile );
172 Logger::info( QString(
"TestIndividual - Loaded Genome from %1").arg(populationFile) );
173 populationLoaded =
true;