24 #ifndef EVOROBOTEXPERIMENT_H
25 #define EVOROBOTEXPERIMENT_H
27 #include "resourcesuser.h"
29 #include "neuroninterfaces.h"
35 #include "configurationparameters.h"
36 #include "parametersettable.h"
39 #include "simpletimer.h"
40 #include "randomgenerator.h"
42 #include <QCoreApplication>
165 void setEvoga(
Evoga* ga );
169 bool inBatchRunning();
187 bool selectAgent(
int agentId );
199 void enableAgent(
int agentId );
211 void disableAgent(
int agentId );
220 bool agentEnabled(
int agentId );
225 Evonet* getNeuralNetwork(
int agentId=0 );
227 virtual void setNetParameters(
float *genes);
229 virtual void setNetParameters(
int *genes);
231 virtual void initGeneration(
int generation);
233 virtual void initIndividual(
int individual);
236 virtual void initTrial(
int trial);
238 virtual void initStep(
int step );
289 void endIndividualLife();
294 virtual void afterSensorsUpdate();
298 virtual void beforeMotorsUpdate();
302 virtual void beforeWorldAdvance();
304 virtual void endStep(
int step ) = 0;
308 virtual void endTrial(
int trial);
311 virtual void endIndividual(
int individual);
313 virtual void endGeneration(
int generation);
315 void doAllTrialsForIndividual(
int individual);
318 int getGenomeLength();
325 Sensor* getSensor( QString sensorName,
int agentId=0 );
332 Motor* getMotor( QString motorName,
int agentId=0 );
340 virtual void setTestingAgentAndSeed(
int idindividual,
int nreplica );
390 static void describe( QString type );
396 virtual void postConfigureInitialization();
413 ntrials = new_ntrials;
460 void newGASeed(
int seed);
474 void setStepDelay(
int delay );
480 float getWorldTimeStep()
const;
496 void recreateWorld();
510 bool recreateRobot(
int agentId = 0 );
517 void recreateAllRobots();
523 void recreateArena();
535 void recreateNeuralNetwork(
int agentId = 0 );
542 void recreateAllNeuralNetworks();
567 const QString* savedPrefix;
576 void setWorldTimestep(
float timestep );
579 class EmbodiedAgent {
588 void recreateRobot();
590 void recreateNeuralNetwork();
606 QString resourcePrefix;
614 QVector<Sensor*> sensors;
616 QVector<Motor*> motors;
618 QMap<QString, Sensor*> sensorsMap;
620 QMap<QString, Motor*> motorsMap;
632 QList<EmbodiedAgent*> eagents;
638 bool stopCurrentTrial;
640 bool skipCurrentTrial;
642 bool restartCurrentTrial;
644 bool endCurrentIndividualLife;
656 bool sameRandomSequence;
This class iterate over the neurons of a Evonet neural network.
QVector< int * > m_weightIndividual
Added by Jonata for the SpecializerSteadyState GA.
A class representing a list of objects.
double totalFitnessValue
the fitness value of the individual all over the trials
Phases getActivityPhase()
return the state of the EvoRobotExperiment
int getCurTrial() const
Returns the current trial.
int getNTrials() const
Returns the number of trials.
The class modelling an arena.
double totalErrorValue
the error of the individual all over the trials
An abstract class for robots.
The base abstract class for the Sensor hierarchy.
int getCurStep() const
Returns the current step.
int getNSteps() const
Returns the number of steps.
Genetic algorithm from evorobot more or less (spare parts)
Arena * getArena()
Returns the arena. This can returns NULL if no arena object is present.
Phases
this type define the phase of which the EvoRobotExperiment
Evonet is the neural network taken from the EvoRobot.
The base abstract class for the Motor hierarchy.
int nstep
number of cycles
void setNSteps(int new_nsteps)
Sets the number of steps.
WObjectsList()
Constructor.
double trialFitnessValue
the fitness value of the individual during the execution of one trial
double trialErrorValue
the error of the individual during the execution of one trial
WObjectsList(int size)
Constructor.
void setNTrials(int new_ntrials)
Sets the number of trials.
The base common class that evaluate the fitness of a robot.
void setActivityPhase(Phases newPhase)
set the new activity phase
WObjectsList(int size, WObject *const &value)
Constructor.
WObjectsList(const QVector< WObject * > &other)
Copy Constructor.