From 8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 5 Aug 2012 01:26:45 -0600 Subject: 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. --- src/explicitsimulation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/explicitsimulation.h') 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 public: ExplicitSimulation( Operator *pOper, FitnessFunction *pFunc, int iThreads, int iPopSize, float fKeep, float fRandom, - bool bKeepBest=true ); + bool bKeepBest=true, bool bRecalcSurvivors=false ); virtual ~ExplicitSimulation(); void timestep(); @@ -47,6 +47,7 @@ namespace Genetic float fKeep; float fRandom; bool bKeepBest; + bool bRecalcSurvivors; typedef Bu::Hash FitnessHash; FitnessHash hFitness; double dMinFitness; -- cgit v1.2.3