LoveBrains
1.0.0
|
Manage the configuration of the simulator. More...
#include <simulator_config.h>
Public Types | |
enum | DisplayMode { NONE, ENVIRONMENT_2D } |
Contains several display options. | |
Public Member Functions | |
SConfig (void) throw () | |
Constructor. | |
~SConfig (void) throw () | |
Destructor. | |
void | setCrossingRate (double rate) |
Set the crossing rate that will be used by the GAEngine. More... | |
void | setMutationRate (double rate) |
Set the mutation rate that will be used by the GAEngine. More... | |
void | setSelectionRate (double rate) |
Set the selection rate that will be used by the GAEngine. More... | |
void | setExpectedFitness (double rate) throw () |
Set the expected fitness that will be used by the GAEngine. More... | |
void | setPoolSize (unsigned int size) |
Set the pool size for the tournament in the GAEngine. More... | |
void | setMaxEpochs (int max) throw () |
Set the maximum epochs for the GAEngine. More... | |
void | setReportInterval (unsigned int interval) throw () |
Set the report interval for the GAEngine. More... | |
void | setPopulationSize (unsigned int size) |
Set the population size of the GAEngine. More... | |
void | setANNInfos (std::string infos) |
Set the topology of the neural network used by the AI objects. More... | |
void | setActivation (GANN::ANNLayer::FActivate function, GANN::ANN::ActivationType type) |
Set the activation function for the intern layers of the neural network. More... | |
void | setOutputsActivation (GANN::ANNLayer::FActivate function, GANN::ANN::ActivationType type) |
Set the activation function for the output layer of the neural network. More... | |
void | setEnvironmentSize (unsigned int width, unsigned int height) |
Set the environment size (window size). More... | |
void | setIsTournament (bool isTournament) throw () |
Set if it's a tournament or not. More... | |
void | setDisplayMode (DisplayMode display) throw () |
Set the display mode of the environment. More... | |
double | getCrossingRate (void) const throw () |
Get the crossing rate member. More... | |
double | getMutationRate (void) const throw () |
Get the mutation rate member. More... | |
double | getSelectionRate (void) const throw () |
Get the selection rate member. More... | |
double | getExpectedFitness (void) const throw () |
Get the expected fitness member. More... | |
unsigned int | getPoolSize (void) const throw () |
Get the pool size member. More... | |
int | getMaxEpochs (void) const throw () |
Get the maximum epochs member. More... | |
unsigned int | getReportInterval (void) const throw () |
Get the report interval member. More... | |
unsigned int | getPopulationSize (void) const throw () |
Get the population size member. More... | |
std::vector< unsigned int > const & | getANNInfos (void) const throw () |
Get the neural network topology member. More... | |
GANN::ANNLayer::FActivate | getActivation (void) const throw () |
Get the activation function pointer of the intern layers. More... | |
GANN::ANNLayer::FActivate | getOutputsActivation (void) const throw () |
Get the activation function pointer of the output layer. More... | |
unsigned int | getEnvironmentWidth (void) const throw () |
Get the window's width. More... | |
unsigned int | getEnvironmentHeight (void) const throw () |
Get the window's height. More... | |
GANN::ANN::ActivationType | getLayerActivationType (void) const throw () |
Get the type of the activation function pointer inside an intern layer. More... | |
GANN::ANN::ActivationType | getOutputActivationType (void) const throw () |
Get the type of the activation function pointer inside the output layer. More... | |
bool | isTournament (void) const throw () |
Get the boolean that says if it's a tournament. More... | |
DisplayMode | getDisplayMode (void) const throw () |
Get the current display mode of the environment. More... | |
SConfig & | operator= (SConfig const &config) |
Manage the configuration of the simulator.
GANN::ANNLayer::FActivate Simulator::SConfig::getActivation | ( | void | ) | const | |
throw | ( | ||||
) |
Get the activation function pointer of the intern layers.
std::vector< unsigned int > const & Simulator::SConfig::getANNInfos | ( | void | ) | const | |
throw | ( | ||||
) |
Get the neural network topology member.
double Simulator::SConfig::getCrossingRate | ( | void | ) | const | |
throw | ( | ||||
) |
Get the crossing rate member.
SConfig::DisplayMode Simulator::SConfig::getDisplayMode | ( | void | ) | const | |
throw | ( | ||||
) |
Get the current display mode of the environment.
unsigned int Simulator::SConfig::getEnvironmentHeight | ( | void | ) | const | |
throw | ( | ||||
) |
Get the window's height.
unsigned int Simulator::SConfig::getEnvironmentWidth | ( | void | ) | const | |
throw | ( | ||||
) |
Get the window's width.
double Simulator::SConfig::getExpectedFitness | ( | void | ) | const | |
throw | ( | ||||
) |
Get the expected fitness member.
GANN::ANN::ActivationType Simulator::SConfig::getLayerActivationType | ( | void | ) | const | |
throw | ( | ||||
) |
Get the type of the activation function pointer inside an intern layer.
int Simulator::SConfig::getMaxEpochs | ( | void | ) | const | |
throw | ( | ||||
) |
Get the maximum epochs member.
double Simulator::SConfig::getMutationRate | ( | void | ) | const | |
throw | ( | ||||
) |
Get the mutation rate member.
GANN::ANN::ActivationType Simulator::SConfig::getOutputActivationType | ( | void | ) | const | |
throw | ( | ||||
) |
Get the type of the activation function pointer inside the output layer.
GANN::ANNLayer::FActivate Simulator::SConfig::getOutputsActivation | ( | void | ) | const | |
throw | ( | ||||
) |
Get the activation function pointer of the output layer.
unsigned int Simulator::SConfig::getPoolSize | ( | void | ) | const | |
throw | ( | ||||
) |
Get the pool size member.
unsigned int Simulator::SConfig::getPopulationSize | ( | void | ) | const | |
throw | ( | ||||
) |
Get the population size member.
unsigned int Simulator::SConfig::getReportInterval | ( | void | ) | const | |
throw | ( | ||||
) |
Get the report interval member.
double Simulator::SConfig::getSelectionRate | ( | void | ) | const | |
throw | ( | ||||
) |
Get the selection rate member.
bool Simulator::SConfig::isTournament | ( | void | ) | const | |
throw | ( | ||||
) |
Get the boolean that says if it's a tournament.
void Simulator::SConfig::setActivation | ( | GANN::ANNLayer::FActivate | function, |
GANN::ANN::ActivationType | type | ||
) |
Set the activation function for the intern layers of the neural network.
function | : Contains the function pointer of the new activation function. |
type | : Contains the type of the function pointer. |
void Simulator::SConfig::setANNInfos | ( | std::string | infos | ) |
Set the topology of the neural network used by the AI objects.
infos | : Contains a string that describe the topology. |
void Simulator::SConfig::setCrossingRate | ( | double | rate | ) |
Set the crossing rate that will be used by the GAEngine.
rate | : Contains the new crossing rate. |
void Simulator::SConfig::setDisplayMode | ( | SConfig::DisplayMode | display | ) | |
throw | ( | ||||
) |
Set the display mode of the environment.
display | : Contains the display mode. |
void Simulator::SConfig::setEnvironmentSize | ( | unsigned int | width, |
unsigned int | height | ||
) |
Set the environment size (window size).
width | : Window's width. |
height | : Window's height. |
void Simulator::SConfig::setExpectedFitness | ( | double | rate | ) | |
throw | ( | ||||
) |
Set the expected fitness that will be used by the GAEngine.
rate | : Contains the new expected fitness. |
void Simulator::SConfig::setIsTournament | ( | bool | isTournament | ) | |
throw | ( | ||||
) |
Set if it's a tournament or not.
isTournament | : (true) if it's a tournament, (false) is it's not. |
void Simulator::SConfig::setMaxEpochs | ( | int | max | ) | |
throw | ( | ||||
) |
Set the maximum epochs for the GAEngine.
max | : Contains the maximum epochs. |
void Simulator::SConfig::setMutationRate | ( | double | rate | ) |
Set the mutation rate that will be used by the GAEngine.
rate | : Contains the new mutation rate. |
void Simulator::SConfig::setOutputsActivation | ( | GANN::ANNLayer::FActivate | function, |
GANN::ANN::ActivationType | type | ||
) |
Set the activation function for the output layer of the neural network.
function | : Contains the function pointer of the new activation function. |
type | : Contains the type of the function pointer. |
void Simulator::SConfig::setPoolSize | ( | unsigned int | size | ) |
Set the pool size for the tournament in the GAEngine.
size | : Contains the pool size. |
void Simulator::SConfig::setPopulationSize | ( | unsigned int | size | ) |
Set the population size of the GAEngine.
size | : Contains the new population size. |
void Simulator::SConfig::setReportInterval | ( | unsigned int | interval | ) | |
throw | ( | ||||
) |
Set the report interval for the GAEngine.
interval | : Contains the new interval between each report. |
void Simulator::SConfig::setSelectionRate | ( | double | rate | ) |
Set the selection rate that will be used by the GAEngine.
rate | : Contains the new selection rate. |