experiments/evorobot/include/tests.h

00001 /********************************************************************************
00002  *  FARSA Experiments Library                                                   *
00003  *  Copyright (C) 2007-2012                                                     *
00004  *  Piero Savastano <piero.savastano@istc.cnr.it>                               *
00005  *  Tomassino Ferrauto <tomassino.ferrauto@istc.cnr.it>                         *
00006  *  Stefano Nolfi <stefano.nolfi@istc.cnr.it>                                   *
00007  *  Onofrio Gigliotta <onofrio.gigliotta@istc.cnr.it>                           *
00008  *  Gianluca Massera <emmegian@yahoo.it>                                        *
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 Free Software                 *
00022  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA  *
00023  ********************************************************************************/
00024 
00025 #ifndef TESTS_H
00026 #define TESTS_H
00027 
00028 #include "abstracttest.h"
00029 
00030 namespace farsa {
00031 
00034 class FARSA_EXPERIMENTS_API TestRandom : public AbstractTest
00035 {
00036 public:
00043     TestRandom();
00045     virtual ~TestRandom();
00056     virtual void configure(ConfigurationParameters& params, QString prefix);
00067     virtual void save(ConfigurationParameters& params, QString prefix);
00069     static void describe( QString type );
00071     virtual void runTest();
00073     int* buildRandomDNA();
00074 };
00075 
00078 class FARSA_EXPERIMENTS_API TestIndividual : public AbstractTest
00079 {
00080 public:
00087     TestIndividual();
00089     virtual ~TestIndividual();
00100     virtual void configure(ConfigurationParameters& params, QString prefix);
00111     virtual void save(ConfigurationParameters& params, QString prefix);
00113     static void describe( QString type );
00115     virtual void runTest();
00120     void setIndividualToTest( int idIndividual );
00127     void setPopulationToTest( QString filename, bool deferLoading = true );
00128 private:
00130     int idIndividual;
00132     QString populationFile;
00134     bool populationLoaded;
00135 };
00136 
00137 } //end namespace farsa
00138 
00139 #endif