[Avida-SVN] r1400 - branches/dkdev/source/main
dknoester at myxo.css.msu.edu
dknoester at myxo.css.msu.edu
Wed Mar 14 06:35:27 PDT 2007
Author: dknoester
Date: 2007-03-14 09:35:27 -0400 (Wed, 14 Mar 2007)
New Revision: 1400
Modified:
branches/dkdev/source/main/cAvidaConfig.h
branches/dkdev/source/main/cPopulation.cc
Log:
Adding separate copy mut P for germlines, no divide mutations.
Modified: branches/dkdev/source/main/cAvidaConfig.h
===================================================================
--- branches/dkdev/source/main/cAvidaConfig.h 2007-03-13 16:56:54 UTC (rev 1399)
+++ branches/dkdev/source/main/cAvidaConfig.h 2007-03-14 13:35:27 UTC (rev 1400)
@@ -162,6 +162,7 @@
CONFIG_ADD_VAR(WORLD_GEOMETRY, int, 2, "1 = Bounded Grid\n2 = Torus");
CONFIG_ADD_VAR(NUM_DEMES, int, 0, "Number of independed groups in the population; 0=off");
CONFIG_ADD_VAR(DEMES_USE_GERMLINE, int, 0, "Whether or not demes use a distinct germline; 0=off");
+ CONFIG_ADD_VAR(GERMLINE_COPY_MUT, double, 0.0075, "Probability of copy mutations occuring during germline replication.");
CONFIG_ADD_VAR(MAX_DEME_AGE, int, 500, "The maximum age of a deme (in updates) to be used for age-based replication (default=500).");
CONFIG_ADD_VAR(RANDOM_SEED, int, 0, "Random number seed (0 for based on time)");
CONFIG_ADD_VAR(HARDWARE_TYPE, int, 0, "0 = Original CPUs\n1 = New SMT CPUs\n2 = Transitional SMT");
Modified: branches/dkdev/source/main/cPopulation.cc
===================================================================
--- branches/dkdev/source/main/cPopulation.cc 2007-03-13 16:56:54 UTC (rev 1399)
+++ branches/dkdev/source/main/cPopulation.cc 2007-03-14 13:35:27 UTC (rev 1400)
@@ -860,12 +860,11 @@
// Now create the next germ by manually mutating the source.
// @refactor (strategy pattern)
cGenome next_germ(source_germ);
- cMutationRates mutator; mutator.Setup(m_world);
- if(mutator.GetCopyMutProb() > 0) {
+ if(m_world->GetConfig().GERMLINE_COPY_MUT.Get() > 0) {
const cInstSet& instset = m_world->GetHardwareManager().GetInstSet();
- cAvidaContext ctx(m_world->GetRandom());
+ cAvidaContext ctx(m_world->GetRandom());
for(int i=0; i<next_germ.GetSize(); ++i) {
- if(mutator.TestCopyMut(ctx)) {
+ if(m_world->GetRandom().P(m_world->GetConfig().GERMLINE_COPY_MUT.Get())) {
next_germ[i] = instset.GetRandomInst(ctx);
}
}
More information about the Avida-cvs
mailing list