summaryrefslogtreecommitdiff
path: root/src/explicitsimulation.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2012-08-05 01:26:45 -0600
committerMike Buland <mike@xagasoft.com>2012-08-05 01:26:45 -0600
commit8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d (patch)
tree8519567e456d856a19892421ab50202118d4fb59 /src/explicitsimulation.h
parent2406848173c445a94a1710106116ad796a8bacb9 (diff)
downloadlibgenetic-8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d.tar.gz
libgenetic-8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d.tar.bz2
libgenetic-8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d.tar.xz
libgenetic-8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d.zip
Added option to recalculate survivors.
This accomidates simulations where the test conditions can change as the simulation runs, which would effect the scores of phenotypes that have already been tested.
Diffstat (limited to '')
-rw-r--r--src/explicitsimulation.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/explicitsimulation.h b/src/explicitsimulation.h
index e71b489..78cb904 100644
--- a/src/explicitsimulation.h
+++ b/src/explicitsimulation.h
@@ -18,7 +18,7 @@ namespace Genetic
18 public: 18 public:
19 ExplicitSimulation( Operator *pOper, FitnessFunction *pFunc, 19 ExplicitSimulation( Operator *pOper, FitnessFunction *pFunc,
20 int iThreads, int iPopSize, float fKeep, float fRandom, 20 int iThreads, int iPopSize, float fKeep, float fRandom,
21 bool bKeepBest=true ); 21 bool bKeepBest=true, bool bRecalcSurvivors=false );
22 virtual ~ExplicitSimulation(); 22 virtual ~ExplicitSimulation();
23 23
24 void timestep(); 24 void timestep();
@@ -47,6 +47,7 @@ namespace Genetic
47 float fKeep; 47 float fKeep;
48 float fRandom; 48 float fRandom;
49 bool bKeepBest; 49 bool bKeepBest;
50 bool bRecalcSurvivors;
50 typedef Bu::Hash<Genetic::PhenotypeId, double> FitnessHash; 51 typedef Bu::Hash<Genetic::PhenotypeId, double> FitnessHash;
51 FitnessHash hFitness; 52 FitnessHash hFitness;
52 double dMinFitness; 53 double dMinFitness;