LoveBrains  1.0.0
Public Member Functions | Static Public Member Functions | List of all members
Simulator::Simulator Class Reference

Contains all the objects in order to run the simulation. More...

#include <simulator.h>

Public Member Functions

 Simulator (void) throw ()
 Constructor.
 
 ~Simulator (void) throw ()
 Destructor.
 
GANN::GANNEngine const & getEngine (void) const throw ()
 Get the GANN Engine member. More...
 
GANN::GANNEnginegetEngine (void) throw ()
 Get the GANN Engine member. More...
 
GANN::ANNGenerator const & getGenerator (void) const throw ()
 Get the ANN generator member. More...
 
GA::GAConfig const & getConfig (void) const throw ()
 Get the simulator's configuration member. More...
 
std::list< Graphics::IObject * > & getObjects (void) throw ()
 Get the list that contains all the environment's objects. More...
 
Graphics::PhysicsgetPhysicsEngine (void) throw ()
 Get the physics engine member. More...
 
Simulatoroperator= (Simulator const &simulator)
 
void InitEnvironment (SConfig const &config)
 Initialize the environment. More...
 
void Init (SConfig const &config, const char *file)
 Initialize the simulator. More...
 
void Run (const char *output_file)
 Run the simulation. More...
 

Static Public Member Functions

static void Evaluate (std::list< GA::IDNA * > &brains)
 This function is given to the GAEngine with the aim of evaluating the population. More...
 

Detailed Description

Contains all the objects in order to run the simulation.

Member Function Documentation

void Simulator::Simulator::Evaluate ( std::list< GA::IDNA * > &  brains)
static

This function is given to the GAEngine with the aim of evaluating the population.

Parameters
brains: Contains neural networks that will be given to the AI objects.
Returns
error : SimulatorException
GA::GAConfig const & Simulator::Simulator::getConfig ( void  ) const
throw (
)

Get the simulator's configuration member.

Returns
GA::GAConfig const&
GANN::GANNEngine const & Simulator::Simulator::getEngine ( void  ) const
throw (
)

Get the GANN Engine member.

Returns
GANN::GANNEngine const&
GANN::GANNEngine & Simulator::Simulator::getEngine ( void  )
throw (
)

Get the GANN Engine member.

Returns
GANN::GANNEngine &
GANN::ANNGenerator const & Simulator::Simulator::getGenerator ( void  ) const
throw (
)

Get the ANN generator member.

Returns
GANN::ANNGenerator const&
std::list< Graphics::IObject * > & Simulator::Simulator::getObjects ( void  )
throw (
)

Get the list that contains all the environment's objects.

Returns
std::list<Graphics::IObject *>&
Graphics::Physics & Simulator::Simulator::getPhysicsEngine ( void  )
throw (
)

Get the physics engine member.

Returns
Graphics::Physics&
void Simulator::Simulator::Init ( SConfig const &  config,
const char *  file 
)

Initialize the simulator.

Parameters
config: Contains the simalator configuration.
file: Contains the path to the environment configuration.
Returns
error : SimulatorException
void Simulator::Simulator::InitEnvironment ( SConfig const &  config)

Initialize the environment.

Parameters
config: Contains the simulator configuration.
Returns
error : SimulatorException
Simulator & Simulator::Simulator::operator= ( Simulator const &  simulator)
Returns
error : SimulatorException
void Simulator::Simulator::Run ( const char *  output_file)

Run the simulation.

Parameters
output_file: Contains the path to the output file to save the best neural network.
Returns
error : SimulatorException

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