Robot Simulator of the Robotics Group for Self-Organization of Control: IFitnessStrategy.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- File List
- File Members

# IFitnessStrategy.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005-2009 by Robot Group Leipzig                        *
    00003  *    martius@informatik.uni-leipzig.de                                    *
    00004  *    fhesse@informatik.uni-leipzig.de                                     *
    00005  *    der@informatik.uni-leipzig.de                                        *
    00006  *    guettler@informatik.uni-leipzig.de                                   *
    00007  *    jhoffmann@informatik.uni-leipzig.de                                  *
    00008  *    joergweide84@aol.com (robot12)                                       *
    00009  *                                                                         *
    00010  *   This program is free software; you can redistribute it and/or modify  *
    00011  *   it under the terms of the GNU General Public License as published by  *
    00012  *   the Free Software Foundation; either version 2 of the License, or     *
    00013  *   (at your option) any later version.                                   *
    00014  *                                                                         *
    00015  *   This program is distributed in the hope that it will be useful,       *
    00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00018  *   GNU General Public License for more details.                          *
    00019  *                                                                         *
    00020  *   You should have received a copy of the GNU General Public License     *
    00021  *   along with this program; if not, write to the                         *
    00022  *   Free Software Foundation, Inc.,                                       *
    00023  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    00024  ***************************************************************************
    00025  *                                                                         *
    00026  *   This class is a interface for the fitness strategy. It is used from   *
    00027  *   the class individual an is for individual strategy design pattern.    *
    00028  *                                                                         *
    00029  *   $Log: IFitnessStrategy.h,v $
    00030  *   Revision 1.3  2009/07/02 15:24:53  robot12
    00031  *   update and add new class InvertedFitnessStrategy
    00032  *
    00033  *   Revision 1.2  2009/06/15 13:58:37  robot12
    00034  *   3 new fitness strategys and IFitnessStrategy and SumFitnessStragegy with comments.
    00035  *
    00036  *   Revision 1.1  2009/05/04 15:27:56  robot12
    00037  *   rename of some files and moving files to other positions
    00038  *    - SingletonGenAlgAPI has one error!!! --> is not ready now
    00039  *
    00040  *   Revision 1.3  2009/04/30 11:35:53  robot12
    00041  *   some changes:
    00042  *    - insert a SelectStrategie
    00043  *    - insert a MutationStrategie
    00044  *    - reorganisation of the design
    00045  *
    00046  *   Revision 1.2  2009/04/28 13:23:55  robot12
    00047  *   some implements... Part2
    00048  *
    00049  *   Revision 1.1  2009/04/27 10:59:33  robot12
    00050  *   some implements
    00051  *
    00052  *
    00053  ***************************************************************************/
    00054
    00055 #ifndef IFITNESSSTRATEGY_H_
    00056 #define IFITNESSSTRATEGY_H_
    00057
    00058 // forward declaration
    00059 class Individual;
    00060
    00061 /**
    00062  * The interface for the fitness strategy of an individual.
    00063  */
    00064 class IFitnessStrategy {
    00065 public:
    00066         /**
    00067          * default constructor
    00068          * do nothing
    00069          */
    00070         IFitnessStrategy();
    00071
    00072         /**
    00073          * default destructor
    00074          * do nothing
    00075          */
    00076         virtual ~IFitnessStrategy();
    00077
    00078         /**
    00079          * declaration of the function getFitness. This function will give the fitness value
    00080          * of an individual back. For which individual is him called by 'individual'.
    00081          *
    00082          * @param individual (const Individual*) calculate the fitness for this individual
    00083          * @return (double) The fitness value
    00084          */
    00085         virtual double getFitness(const Individual* individual) = 0;
    00086 };
    00087
    00088 #endif /* IFITNESSSTRATEGY_H_ */