LoveBrains  1.0.0
simulator.h
1 /*
2 ** simulator.h for LoveBrains in /home/robin_f/Programming/Git/CPP/LoveBrains
3 **
4 ** Made by Guillaume ROBIN
5 ** Login <robin_f@epitech.eu>
6 **
7 ** Started on Thu Jul 23 11:56:50 2015 Guillaume ROBIN
8 ** Last update Tue Aug 25 11:58:30 2015 Guillaume ROBIN
9 */
10 
11 #ifndef SIMULATOR_H_
12 # define SIMULATOR_H_
13 
14 # include "GANN/gann_engine.h"
15 # include "ANN/ann_generator.h"
16 # include "Graphics/environment.h"
17 # include "Simulator/simulator_config.h"
18 
23 namespace Simulator
24 {
28  class Simulator
29  {
30  public:
34  Simulator(void) throw();
38  ~Simulator(void) throw();
39 
40  /*
41  ** Getters.
42  */
43 
48  GANN::GANNEngine const& getEngine(void) const throw();
53  GANN::GANNEngine& getEngine(void) throw();
58  GANN::ANNGenerator const& getGenerator(void) const throw();
63  GA::GAConfig const& getConfig(void) const throw();
68  std::list<Graphics::IObject *>& getObjects(void) throw();
73  Graphics::Physics& getPhysicsEngine(void) throw();
74 
75  /*
76  ** Overload.
77  */
78 
82  Simulator& operator=(Simulator const& simulator);
83 
84  /*
85  ** Methods.
86  */
87 
93  void InitEnvironment(SConfig const& config);
100  void Init(SConfig const& config, const char *file);
106  void Run(const char *output_file);
112  static void Evaluate(std::list<GA::IDNA *>& brains);
113 
114  private:
115  static Graphics::Environment2D *_env;
116  GANN::GANNEngine _engine;
117  GANN::ANNGenerator _generator;
118  GA::GAConfig _config;
119  };
120 }
121 
122 #endif /* !SIMULATOR_H_ */
Manage the configuration of the simulator.
Definition: simulator_config.h:26
Define the engine that will manage the population of GANN and the evolution.
Definition: gann_engine.h:24
Define the generator of a neural network.
Definition: ann_generator.h:27
Contains objects that manage the simulation.
Define the configuration of the GAEngine.
Definition: ga_config.h:24
Define the physics engine used by the environment.
Definition: physics.h:28
Definition: environment.h:31