Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TemplateTaskedGaSimulationFitnessStrategy.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2008-2011 LpzRobots development team *
3  * Joerg Weider <joergweide84 at aol dot com> (robot12) *
4  * Georg Martius <georg dot martius at web dot de> *
5  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
6  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
7  * Ralf Der <ralfder at mis dot mpg dot de> *
8  * Joern Hoffmann <jhoffmann at informatik dot uni-leipzig dot de *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24  * *
25  ***************************************************************************/
26 
27 #ifndef TEMPLATETASKEDGASIMULATIONFITNESSSTRATEGY_H_
28 #define TEMPLATETASKEDGASIMULATIONFITNESSSTRATEGY_H_
29 
30 #include <ga_tools/IFitnessStrategy.h>
31 #include <vector>
32 
33 /**
34  * the fitness strategy for this demonstration simulation
35  */
37 public:
38  /**
39  * default constructor
40  */
42 
43  /**
44  * default destructor
45  */
47 
48  /**
49  * this return the saved fitness value (entropy)
50  *
51  * Be careful because this method isn't safe for individuals, which are not saved in the storage!!!
52  *
53  * @param individual (for this we search the entropy)
54  * @return the fitness
55  */
56  virtual double getFitness(const Individual* individual);
57 
58  /**
59  * a storage for all Entropies!
60  */
61  std::vector<double> m_storage;
62 };
63 
64 #endif /* TEMPLATETASKEDGASIMULATIONFITNESSSTRATEGY_H_ */
TemplateTaskedGaSimulationFitnessStrategy()
default constructor
Definition: TemplateTaskedGaSimulationFitnessStrategy.cpp:31
std::vector< double > m_storage
a storage for all Entropies!
Definition: TemplateTaskedGaSimulationFitnessStrategy.h:61
virtual ~TemplateTaskedGaSimulationFitnessStrategy()
default destructor
Definition: TemplateTaskedGaSimulationFitnessStrategy.cpp:35
The interface for the fitness strategy of an individual.
Definition: IFitnessStrategy.h:36
virtual double getFitness(const Individual *individual)
this return the saved fitness value (entropy)
Definition: TemplateTaskedGaSimulationFitnessStrategy.cpp:39
This class represent one individual of the complete gen.
Definition: Individual.h:45
the fitness strategy for this demonstration simulation
Definition: TemplateTaskedGaSimulationFitnessStrategy.h:36