diff options
author | Mike Buland <mike@xagasoft.com> | 2012-08-05 01:26:45 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2012-08-05 01:26:45 -0600 |
commit | 8a0d33b5ebb3497d158f2d5c050c69be3fcd1e0d (patch) | |
tree | 8519567e456d856a19892421ab50202118d4fb59 /src/explicitsimulation.h | |
parent | 2406848173c445a94a1710106116ad796a8bacb9 (diff) | |
download | libgenetic-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.h | 3 |
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; |