propclass/evolve.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2007 by Jorrit Tyberghein 00004 00005 Genetic Algorithm Property Class 00006 Copyright (C) 2007 by Mat Sutcliffe 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with this library; if not, write to the Free 00020 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef __CEL_PF_EVOLVE__ 00024 #define __CEL_PF_EVOLVE__ 00025 00026 #include "cstypes.h" 00027 #include "csutil/scf.h" 00028 #include "csutil/refcount.h" 00029 #include "csutil/array.h" 00030 00031 #include "physicallayer/datatype.h" 00032 00062 struct iPcEvolve : public virtual iBase 00063 { 00064 SCF_INTERFACE(iPcEvolve, 0, 0, 1); 00065 00069 virtual void SetPopulationSize(size_t size) = 0; 00070 00074 virtual size_t GetPopulationSize() const = 0; 00075 00080 virtual void SetSubject(iCelPropertyClass *pc) = 0; 00081 00086 virtual iCelPropertyClass* GetSubject() = 0; 00087 00099 virtual void SetProbabilities(float select, float mutate) = 0; 00100 00106 virtual void Generate() = 0; 00107 00113 virtual void FitnessCallback(float fitness) = 0; 00114 00121 virtual float GetFitness(size_t index) const = 0; 00122 00129 virtual void SelectGenome(size_t index) = 0; 00130 00135 virtual void ResetPopulation() = 0; 00136 }; 00137 00138 #endif // __CEL_PF_EVOLVE__ 00139
Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1