[Avida-SVN] r2335 - in development: . source source/actions source/cpu source/main source/tools support/config

covertar at myxo.css.msu.edu covertar at myxo.css.msu.edu
Sun Feb 17 13:23:33 PST 2008


Author: covertar
Date: 2008-02-17 16:23:33 -0500 (Sun, 17 Feb 2008)
New Revision: 2335

Added:
   development/source/tools/cDemeProbSchedule.cc
   development/source/tools/cDemeProbSchedule.h
Modified:
   development/CMakeLists.txt
   development/build_avida
   development/source/actions/PopulationActions.cc
   development/source/cpu/cHardwareBase.cc
   development/source/cpu/cHardwareBase.h
   development/source/cpu/cHardwareCPU.cc
   development/source/defs.h
   development/source/main/cAvidaConfig.h
   development/source/main/cPopulation.cc
   development/source/tools/cConstSchedule.cc
   development/source/tools/cConstSchedule.h
   development/source/tools/cIntegratedSchedule.cc
   development/source/tools/cIntegratedSchedule.h
   development/source/tools/cProbSchedule.cc
   development/source/tools/cProbSchedule.h
   development/source/tools/cSchedule.h
   development/support/config/avida.cfg
Log:

Added MIGRATION_RATE -- probability of being born in a different deme -- currently only works for full random within deme births -- eventually will work for local copy within demes as well.

Added various adjustments to resampling code

Added InjectSeqneceWithDivMutRate -- inject a genome sequence with a given per-site mutation rate

Added Deme Probablisitic scheduler, awards CPU cycles probabilisticly within demes, but award them in a round-robin fashion among demes -- only usefull for starting with a full population -- for use with preliminary runs - a better version yet to come.



M    source/main/cPopulation.cc
M    source/cpu/cHardwareBase.cc
M    source/cpu/cHardwareBase.h
M    source/cpu/cHardwareCPU.cc
M    source/actions/PopulationActions.cc
M    source/tools/cSchedule.h
M    source/tools/cConstSchedule.cc
A    source/tools/cDemeProbSchedule.cc
M    source/tools/cProbSchedule.cc
M    source/tools/cIntegratedSchedule.cc
M    source/tools/cConstSchedule.h
M    source/tools/cProbSchedule.h
M    source/tools/cIntegratedSchedule.h
A    source/tools/cDemeProbSchedule.h
M    source/defs.h
M    build_avida
M    support/config/avida.cfg
M    CMakeLists.txt


Modified: development/CMakeLists.txt
===================================================================
--- development/CMakeLists.txt	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/CMakeLists.txt	2008-02-17 21:23:33 UTC (rev 2335)
@@ -278,6 +278,7 @@
   ${TOOLS_DIR}/cDataFileManager.cc
   ${TOOLS_DIR}/cDataManager_Base.cc
   ${TOOLS_DIR}/cDefaultMessageDisplay.cc
+  ${TOOLS_DIR}/cDemeProbSchedule.cc
   ${TOOLS_DIR}/cDoubleSum.cc
   ${TOOLS_DIR}/cFile.cc
   ${TOOLS_DIR}/cHelpAlias.cc

Modified: development/build_avida
===================================================================
--- development/build_avida	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/build_avida	2008-02-17 21:23:33 UTC (rev 2335)
@@ -3,6 +3,6 @@
 mkdir -p cbuild
 cd cbuild
 cmake "$@" ../
-make  
+make  -j9
 make install
 

Modified: development/source/actions/PopulationActions.cc
===================================================================
--- development/source/actions/PopulationActions.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/actions/PopulationActions.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -341,6 +341,65 @@
   }
 };
 
+/*
+ Injects identical organisms into a range of cells of the population with a specified divide mut rate (per site).
+ 
+ Parameters:
+   sequence (string) [required]
+     The genome sequence for this organism.
+   cell_start (int)
+     First cell to inject into.
+   cell_end (int)
+     First cell *not* to inject into.
+   merit (double) default: -1
+     The initial merit of the organism. If set to -1, this is ignored.
+   lineage label (integer) default: 0
+     An integer that marks all descendants of this organism.
+   neutral metric (double) default: 0
+     A double value that randomly drifts over time.
+*/
+class cActionInjectSequenceWithDivMutRate : public cAction
+{
+private:
+  cString m_sequence;
+  int m_cell_start;
+  int m_cell_end;
+  double m_merit;
+  double m_div_mut_rate;
+  int m_lineage_label;
+  double m_neutral_metric;
+public:
+  cActionInjectSequenceWithDivMutRate(cWorld* world, const cString& args)
+    : cAction(world, args), m_cell_start(0), m_cell_end(-1), m_div_mut_rate(0.0),m_merit(-1), m_lineage_label(0), m_neutral_metric(0)
+  {
+    cString largs(args);
+    m_sequence = largs.PopWord();
+    if (largs.GetSize()) m_cell_start = largs.PopWord().AsInt();
+    if (largs.GetSize()) m_cell_end = largs.PopWord().AsInt();
+    if (largs.GetSize()) m_div_mut_rate = largs.PopWord().AsDouble();
+    if (largs.GetSize()) m_merit = largs.PopWord().AsDouble();
+    if (largs.GetSize()) m_lineage_label = largs.PopWord().AsInt();
+    if (largs.GetSize()) m_neutral_metric = largs.PopWord().AsDouble();
+    
+    if (m_cell_end == -1) m_cell_end = m_cell_start + 1;
+  }
+  
+  static const cString GetDescription() { return "Arguments: <string sequence> [int cell_start=0] [int cell_end=-1] [double div_mut_rate=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; }
+  
+  void Process(cAvidaContext& ctx)
+  {
+    if (m_cell_start < 0 || m_cell_end > m_world->GetPopulation().GetSize() || m_cell_start >= m_cell_end) {
+      m_world->GetDriver().NotifyWarning("InjectRange has invalid range!");
+    } else {
+      cGenome genome(m_sequence);
+      for (int i = m_cell_start; i < m_cell_end; i++) {
+        m_world->GetPopulation().Inject(genome, i, m_merit, m_lineage_label, m_neutral_metric);
+	m_world->GetPopulation().GetCell(i).GetOrganism()->MutationRates().SetDivMutProb(m_div_mut_rate);
+      }
+      m_world->GetPopulation().SetSyncEvents(true);
+    }
+  }
+};
 
 /*
  Injects identical parasites into a range of cells of the population.
@@ -1573,6 +1632,7 @@
   action_lib->Register<cActionInjectAll>("InjectAll");
   action_lib->Register<cActionInjectRange>("InjectRange");
   action_lib->Register<cActionInjectSequence>("InjectSequence");
+  action_lib->Register<cActionInjectSequenceWithDivMutRate>("InjectSequenceWDivMutRate");
   action_lib->Register<cActionInjectDemes>("InjectDemes");
 
   action_lib->Register<cActionInjectParasite>("InjectParasite");

Modified: development/source/cpu/cHardwareBase.cc
===================================================================
--- development/source/cpu/cHardwareBase.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/cpu/cHardwareBase.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -268,7 +268,10 @@
         totalMutations++;
       }
     }
-  }
+  }/*
+  else if(organism->GetDivMutProb() == 0.0){
+    cerr << "*******************DivMutProb NOT SET" << organism->GetID() << "****************" << endl;
+  }*/
   
 
   
@@ -580,6 +583,79 @@
       return (!sterilize) && revert;
 }
 
+// test whether the offspring creature contains an advantageous mutation.
+/*
+ Return true iff only a reversion is performed -- returns false is sterilized regardless of whether or 
+ not a reversion is performed.  AWC 06/29/06
+ */
+bool cHardwareBase::Divide_TestFitnessMeasures1(cAvidaContext& ctx)
+{
+  cPhenotype & phenotype = organism->GetPhenotype();
+  phenotype.CopyTrue() = ( organism->ChildGenome() == organism->GetGenome() );
+  phenotype.ChildFertile() = true;
+	
+  // Only continue if we're supposed to do a fitness test on divide...
+  if (organism->GetTestOnDivide() == false) return false;
+	
+  // If this was a perfect copy, then we don't need to worry about any other
+  // tests...  Theoretically, we need to worry about the parent changing,
+  // but as long as the child is always compared to the original genotype,
+  // this won't be an issue.
+  if (phenotype.CopyTrue() == true) return false;
+	
+  const double parent_fitness = organism->GetTestFitness(ctx);
+  const double neut_min = parent_fitness * (1.0 - organism->GetNeutralMin());//nHardware::FITNESS_NEUTRAL_MIN;
+  const double neut_max = parent_fitness * (1.0 + organism->GetNeutralMax());//nHardware::FITNESS_NEUTRAL_MAX;
+      
+  cTestCPU* testcpu = m_world->GetHardwareManager().CreateTestCPU();
+  cCPUTestInfo test_info;
+  test_info.UseRandomInputs();
+  testcpu->TestGenome(ctx, test_info, organism->ChildGenome());
+  const double child_fitness = test_info.GetGenotypeFitness();
+  delete testcpu;
+  
+  bool revert = false;
+  bool sterilize = false;
+  
+  //if you?r suppose to be dead, you really are going to be dead
+  if(!test_info.IsViable()){
+    //if (test_info.GetMaxDepth() > 0) sterilize = true;
+    sterilize = true;
+  }
+  
+  // If implicit mutations are turned off, make sure this won't spawn one.
+  if (organism->GetFailImplicit() == true) {
+    if (test_info.GetMaxDepth() > 0) sterilize = true;
+  }
+  
+  if (child_fitness == 0.0) {
+    // Fatal mutation... test for reversion.
+    if (ctx.GetRandom().P(organism->GetRevertFatal())) revert = true;
+    if (ctx.GetRandom().P(organism->GetSterilizeFatal())) sterilize = true;
+  } else if (child_fitness < neut_min) {
+    if (ctx.GetRandom().P(organism->GetRevertNeg())) revert = true;
+    if (ctx.GetRandom().P(organism->GetSterilizeNeg())) sterilize = true;
+  } else if (child_fitness <= neut_max) {
+    if (ctx.GetRandom().P(organism->GetRevertNeut())) revert = true;
+    if (ctx.GetRandom().P(organism->GetSterilizeNeut())) sterilize = true;
+  } else {
+    if (ctx.GetRandom().P(organism->GetRevertPos())) revert = true;
+    if (ctx.GetRandom().P(organism->GetSterilizePos())) sterilize = true;
+  }
+  
+  // Ideally, we won't have reversions and sterilizations turned on at the
+  // same time, but if we do, give revert the priority.
+  if (revert == true) {
+    organism->ChildGenome() = organism->GetGenome();
+  }
+  
+  if (sterilize == true) {
+    organism->GetPhenotype().ChildFertile() = false;
+  }
+  
+  return (!sterilize) && revert;
+}
+
 int cHardwareBase::PointMutate(cAvidaContext& ctx, const double mut_rate)
 {
   cCPUMemory& memory = GetMemory();

Modified: development/source/cpu/cHardwareBase.h
===================================================================
--- development/source/cpu/cHardwareBase.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/cpu/cHardwareBase.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -76,6 +76,7 @@
 
 protected:
   unsigned Divide_DoExactMutations(cAvidaContext& ctx, double mut_multiplier = 1.0, const int pointmut = INT_MAX);
+  bool Divide_TestFitnessMeasures1(cAvidaContext& ctx);
   
   void TriggerMutations_Body(cAvidaContext& ctx, int type, cCPUMemory& target_memory, cHeadCPU& cur_head);
   bool TriggerMutations_ScopeGenome(cAvidaContext& ctx, const cMutation* cur_mut,

Modified: development/source/cpu/cHardwareCPU.cc
===================================================================
--- development/source/cpu/cHardwareCPU.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/cpu/cHardwareCPU.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -1496,7 +1496,7 @@
       m_world->GetStats().IncResamplings();
     }
 
-    fitTest = Divide_TestFitnessMeasures(ctx);
+    fitTest = Divide_TestFitnessMeasures1(ctx);
     //if(mutations > 1 ) cerr << "Too Many mutations!!!!!!!!!!!!!!!" << endl;
     if(!fitTest && mutations >= totalMutations) break;
 

Modified: development/source/defs.h
===================================================================
--- development/source/defs.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/defs.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -95,7 +95,8 @@
 {
   SLICE_CONSTANT = 0,
   SLICE_PROB_MERIT,
-  SLICE_INTEGRATED_MERIT
+  SLICE_INTEGRATED_MERIT,
+  SLICE_DEME_PROB_MERIT
 };
 
 enum ePOSITION_CHILD

Modified: development/source/main/cAvidaConfig.h
===================================================================
--- development/source/main/cAvidaConfig.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/main/cAvidaConfig.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -367,6 +367,7 @@
   CONFIG_ADD_VAR(META_COPY_MUT, double, 0.0, "Prob. of copy mutation rate changing (per gen)");
   CONFIG_ADD_VAR(META_STD_DEV, double, 0.0, "Standard deviation of meta mutation size.");
   CONFIG_ADD_VAR(MUT_RATE_SOURCE, int, 1, "1 = Mutation rates determined by environment.\n2 = Mutation rates inherited from parent.");
+  CONFIG_ADD_VAR(MIGRATION_RATE, double, 0.0, "Uniform probability of offspring migrating to a new deme.");
  
   CONFIG_ADD_GROUP(REVERSION_GROUP, "Mutation Reversion\nThese slow down avida a lot, and should be set to 0.0 normally.");
   CONFIG_ADD_VAR(REVERT_FATAL, double, 0.0, "Should any mutations be reverted on birth?");
@@ -383,7 +384,7 @@
   
   CONFIG_ADD_GROUP(TIME_GROUP, "Time Slicing");
   CONFIG_ADD_VAR(AVE_TIME_SLICE, int, 30, "Ave number of insts per org per update");
-  CONFIG_ADD_VAR(SLICING_METHOD, int, 1, "0 = CONSTANT: all organisms get default...\n1 = PROBABILISTIC: Run _prob_ proportional to merit.\n2 = INTEGRATED: Perfectly integrated deterministic.");
+  CONFIG_ADD_VAR(SLICING_METHOD, int, 1, "0 = CONSTANT: all organisms get default...\n1 = PROBABILISTIC: Run _prob_ proportional to merit.\n2 = INTEGRATED: Perfectly integrated deterministic.\n3 = DemeProbabalistic, each deme gets the same number of CPU cycles, which are awarded probabalistically within each deme.");
   CONFIG_ADD_VAR(BASE_MERIT_METHOD, int, 4, "0 = Constant (merit independent of size)\n1 = Merit proportional to copied size\n2 = Merit prop. to executed size\n3 = Merit prop. to full size\n4 = Merit prop. to min of executed or copied size\n5 = Merit prop. to sqrt of the minimum size\n6 = Merit prop. to num times MERIT_BONUS_INST is in genome.");
   CONFIG_ADD_VAR(BASE_CONST_MERIT, int, 100, "Base merit when BASE_MERIT_METHOD set to 0");
   CONFIG_ADD_VAR(DEFAULT_BONUS, double, 1.0, "Initial bonus before any tasks");

Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/main/cPopulation.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -31,6 +31,7 @@
 #include "cCodeLabel.h"
 #include "cConstSchedule.h"
 #include "cDataFile.h"
+#include "cDemeProbSchedule.h"
 #include "cEnvironment.h"
 #include "functions.h"
 #include "cGenome.h"
@@ -355,7 +356,7 @@
         delete test_cpu;
       }
     }
-    schedule->Adjust(parent_cell.GetID(), parent_phenotype.GetMerit());
+    schedule->Adjust(parent_cell.GetID(), parent_phenotype.GetMerit(),parent_cell.GetDemeID());
     
     // In a local run, face the child toward the parent. 
     const int birth_method = m_world->GetConfig().BIRTH_METHOD.Get();
@@ -488,7 +489,7 @@
   m_world->GetClassificationManager().AdjustGenotype(*in_genotype);
   
   // Initialize the time-slice for this new organism.
-  schedule->Adjust(target_cell.GetID(), in_organism->GetPhenotype().GetMerit());
+  schedule->Adjust(target_cell.GetID(), in_organism->GetPhenotype().GetMerit(),target_cell.GetDemeID());
   
   // Special handling for certain birth methods.
   if (m_world->GetConfig().BIRTH_METHOD.Get() == POSITION_CHILD_FULL_SOUP_ELDEST) {
@@ -676,7 +677,7 @@
   else organism->GetPhenotype().SetToDelete();
   
   // Alert the scheduler that this cell has a 0 merit.
-  schedule->Adjust(in_cell.GetID(), cMerit(0));
+  schedule->Adjust(in_cell.GetID(), cMerit(0),in_cell.GetDemeID());
   
   // Update the archive (note: genotype adjustment may be defered)
   m_world->GetClassificationManager().AdjustGenotype(*genotype);
@@ -819,16 +820,16 @@
   //cout << "SwapCells: organism 2 is non-null, fix up source cell" << endl;
   if (org2 != NULL) {
     cell1.InsertOrganism(org2);
-    schedule->Adjust(cell1.GetID(), org2->GetPhenotype().GetMerit());
+    schedule->Adjust(cell1.GetID(), org2->GetPhenotype().GetMerit(),cell1.GetDemeID());
   } else {
-    schedule->Adjust(cell1.GetID(), cMerit(0));
+    schedule->Adjust(cell1.GetID(), cMerit(0), cell1.GetDemeID());
   }
   //cout << "SwapCells: organism 1 is non-null, fix up dest cell" << endl;
   if (org1 != NULL) {
     cell2.InsertOrganism(org1);
-    schedule->Adjust(cell2.GetID(), org1->GetPhenotype().GetMerit());
+    schedule->Adjust(cell2.GetID(), org1->GetPhenotype().GetMerit(), cell2.GetDemeID());
   } else {
-    schedule->Adjust(cell2.GetID(), cMerit(0));
+    schedule->Adjust(cell2.GetID(), cMerit(0), cell2.GetDemeID());
   }
   //cout << "SwapCells: Done." << endl;
 }
@@ -2121,7 +2122,24 @@
     return *out_cell;
   }
   else if (birth_method == POSITION_CHILD_DEME_RANDOM) {
-    const int deme_id = parent_cell.GetDemeID();
+    int deme_id = parent_cell.GetDemeID();
+    
+    //@AWC -- decide wether the child will migrate to another deme
+    if((m_world->GetConfig().MIGRATION_RATE.Get() > 0.0) 
+       && m_world->GetRandom().P(m_world->GetConfig().MIGRATION_RATE.Get())){
+      
+      //get another -unadjusted- deme id
+      int rnd_deme_id = m_world->GetRandom().GetInt(deme_array.GetSize()-1);
+      
+      //if the -unadjusted- id is above the excluded id, bump it up one
+      //insures uniform prob of landing in any deme but the parent's
+      if(rnd_deme_id >= deme_id) rnd_deme_id++;
+      
+      //set the new deme_id
+      deme_id = rnd_deme_id;
+    }
+    
+    
     const int deme_size = deme_array[deme_id].GetSize();
     
     int out_pos = m_world->GetRandom().GetUInt(deme_size);
@@ -2845,7 +2863,7 @@
         InjectGenotype( current_cell, (*it).genotype );
         cPhenotype & phenotype = GetCell(current_cell).GetOrganism()->GetPhenotype();
         if ( (*it).merit > 0) phenotype.SetMerit( cMerit((*it).merit) );
-        schedule->Adjust(current_cell, phenotype.GetMerit());
+        schedule->Adjust(current_cell, phenotype.GetMerit(), GetCell(current_cell).GetDemeID());
         
         int lineage_label = 0;
         LineageSetupOrganism(GetCell(current_cell).GetOrganism(),
@@ -2935,7 +2953,7 @@
   phenotype.SetNeutralMetric(neutral);
     
   if (merit > 0) phenotype.SetMerit(cMerit(merit));
-  schedule->Adjust(cell_id, phenotype.GetMerit());
+  schedule->Adjust(cell_id, phenotype.GetMerit(), GetCell(cell_id).GetDemeID());
   
   LineageSetupOrganism(GetCell(cell_id).GetOrganism(), 0, lineage_label);
   
@@ -3023,6 +3041,9 @@
     case SLICE_PROB_MERIT:
       schedule = new cProbSchedule(cell_array.GetSize(), m_world->GetRandom().GetInt(0x7FFFFFFF));
       break;
+    case SLICE_DEME_PROB_MERIT:
+      schedule = new cDemeProbSchedule(cell_array.GetSize(), m_world->GetRandom().GetInt(0x7FFFFFFF), deme_array.GetSize());
+      break;
     case SLICE_INTEGRATED_MERIT:
       schedule = new cIntegratedSchedule(cell_array.GetSize());
       break;
@@ -3393,7 +3414,7 @@
   if (new_merit <= old_merit) {
 	  phenotype.SetIsDonorCur(); }  
   else  { phenotype.SetIsReceiver(); } 
-  schedule->Adjust(cell_id, phenotype.GetMerit());
+  schedule->Adjust(cell_id, phenotype.GetMerit(),GetCell(cell_id).GetDemeID());
   
   return true;
 }

Modified: development/source/tools/cConstSchedule.cc
===================================================================
--- development/source/tools/cConstSchedule.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cConstSchedule.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -35,7 +35,7 @@
   return true;
 }
 
-void cConstSchedule::Adjust(int item_id, const cMerit & merit)
+void cConstSchedule::Adjust(int item_id, const cMerit & merit, int deme_id)
 {
   if (cChangeList *change_list = GetChangeList()) {
     change_list->MarkChange(item_id);

Modified: development/source/tools/cConstSchedule.h
===================================================================
--- development/source/tools/cConstSchedule.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cConstSchedule.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -58,7 +58,7 @@
   ~cConstSchedule() { ; }
 
   bool OK();
-  void Adjust(int item_id, const cMerit& merit);
+  void Adjust(int item_id, const cMerit& merit, int deme_id);
 
   int GetNextID();
 };

Added: development/source/tools/cDemeProbSchedule.cc
===================================================================
--- development/source/tools/cDemeProbSchedule.cc	                        (rev 0)
+++ development/source/tools/cDemeProbSchedule.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -0,0 +1,84 @@
+/*
+ *  cDemeProbSchedule.cc
+ *  Avida
+ *  Implemented by Art Covert 2/11/2008
+ *
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *  Copyright 1993-2003 California Institute of Technology.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#include "cDemeProbSchedule.h"
+
+#include "cChangeList.h"
+#include "cMerit.h"
+
+// The larger merits cause problems here; things need to be re-thought out. 
+
+/* 
+ @AWC -- the previous comment is "inherited" from cProbScheduler, this is 
+ still a within deme issue.  However, this class mitigates the problem somewhat
+ when using more than one deme!
+
+ Yes, I know we're not *suppose* to reuse code -- DEAL
+*/
+
+//get the next CPU cycle, awarded to the next populated deme and cycled in a round-robin fashion
+int cDemeProbSchedule::GetNextID()
+{
+  //iterate the deme
+  curr_deme = ++curr_deme % num_demes;
+
+  //loop to check each deme at most once -- this could be a problem in sparse pops, best to start with populated or mostly-poulated demes
+  for (int i = 0; i < num_demes; i++){
+
+    //check to see if deme is populated
+    if (chart[curr_deme]->GetTotalWeight() == 0){ 
+
+      //deme is empty -- iterate the deme
+      curr_deme = ++curr_deme % num_demes;
+    }
+    else{ //deme not empty -- return offset id
+
+      //calculate the offset
+      int offset = curr_deme * deme_size;
+      
+      // get the within postion of the node whos corresponding cell will get the CPU cycle
+      const double position = m_rng.GetDouble(chart[curr_deme]->GetTotalWeight());
+
+      // return the adjusted ID of the cell to get the CPU cycle
+      return chart[curr_deme]->FindPosition(position) + offset;
+    }
+  }
+}
+
+
+//adjust the weight of an org within deme
+void cDemeProbSchedule::Adjust(int item_id, const cMerit& item_merit, int deme_id)
+{
+  //calculate the corrected id for the org to be adjusted
+  int offset_id = item_id - (deme_id * deme_size);
+
+  //who the hell knows what this crap does -- "ineherited" from cProbScheduler
+  if (cChangeList *change_list = GetChangeList()) {
+    change_list->MarkChange(item_id);
+  }
+
+  //adjust the merit of the org in the tree
+  chart[deme_id]->SetWeight(offset_id, item_merit.GetDouble());
+}

Added: development/source/tools/cDemeProbSchedule.h
===================================================================
--- development/source/tools/cDemeProbSchedule.h	                        (rev 0)
+++ development/source/tools/cDemeProbSchedule.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -0,0 +1,106 @@
+/*
+ *  cProbSchedule.h
+ *  Avida
+ *
+ *  Called "prob_schedule.hh" prior to 12/7/05.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *  Copyright 1993-2003 California Institute of Technology.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#ifndef cDemeProbSchedule_h
+#define cDemeProbSchedule_h
+
+#ifndef cRandom_h
+#include "cRandom.h"
+#endif
+#ifndef cSchedule_h
+#include "cSchedule.h"
+#endif
+#ifndef cWeightedIndex_h
+#include "cWeightedIndex.h"
+#endif
+//need a pointer to the world to figure out number of demes
+#ifndef cWorld_h
+#include "cWorld.h"
+#endif
+//need tList to construct array of trees
+#ifndef tArray_h
+#include "tArray.h"
+#endif
+
+
+/**
+ * The DemeProbiblistic Schedule has the chance for an item to
+ * be scheduled within each Deme proportional to the merit of that 
+ * item relative to the rest of the deme.
+ * 
+ * @AWC -- further implementation notes in CC file.
+ **/
+
+class cMerit;
+
+class cDemeProbSchedule : public cSchedule
+{
+private:
+  cRandom m_rng; 
+  tArray<cWeightedIndex*> chart;
+
+  //how many demes are there?
+  int num_demes;
+
+  //size of each deme... num_cells/num_demes
+  int deme_size;
+
+  //what deme should GetNextID give the next CPU cycle to?
+  int curr_deme;
+
+  //const cWorld* m_world;
+  
+  
+  cDemeProbSchedule(const cDemeProbSchedule&); // @not_implemented
+  cDemeProbSchedule& operator=(const cDemeProbSchedule&); // @not_implemented
+
+public:
+  cDemeProbSchedule(int num_cells, int seed, int ndemes) : cSchedule(num_cells), m_rng(seed), num_demes(ndemes) { 
+    
+    deme_size = num_cells/num_demes;
+
+    for(int i = 0; i < num_demes; i++){
+      chart.Push(new cWeightedIndex(deme_size));
+    }
+  }
+  ~cDemeProbSchedule() { ; }
+
+  void Adjust(int item_id, const cMerit& merit, int deme_id=0);
+  int GetNextID();
+};
+
+
+#ifdef ENABLE_UNIT_TESTS
+namespace nProbSchedule {
+  /**
+   * Run unit tests
+   *
+   * @param full Run full test suite; if false, just the fast tests.
+   **/
+  void UnitTests(bool full = false);
+}
+#endif  
+
+#endif

Modified: development/source/tools/cIntegratedSchedule.cc
===================================================================
--- development/source/tools/cIntegratedSchedule.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cIntegratedSchedule.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -76,7 +76,7 @@
 }
 
 
-void cIntegratedSchedule::Adjust(int item_id, const cMerit & new_merit)
+void cIntegratedSchedule::Adjust(int item_id, const cMerit & new_merit, int deme_id)
 {
   if (cChangeList *change_list = GetChangeList()) {
     change_list->MarkChange(item_id);

Modified: development/source/tools/cIntegratedSchedule.h
===================================================================
--- development/source/tools/cIntegratedSchedule.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cIntegratedSchedule.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -1,5 +1,5 @@
 /*
- *  cIntegratedSchedule.h
+ *  Cintegratedschedule.h
  *  Avida
  *
  *  Called "integrated_schedule.hh" prior to 12/7/05.
@@ -66,7 +66,7 @@
   cIntegratedSchedule(int _item_count);
   ~cIntegratedSchedule();
 
-  void Adjust(int item_id, const cMerit & new_merit);
+  void Adjust(int item_id, const cMerit & new_merit,int deme_id);
   int GetNextID();
   double GetStatus(int id);
 

Modified: development/source/tools/cProbSchedule.cc
===================================================================
--- development/source/tools/cProbSchedule.cc	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cProbSchedule.cc	2008-02-17 21:23:33 UTC (rev 2335)
@@ -37,7 +37,7 @@
   return chart.FindPosition(position);
 }
 
-void cProbSchedule::Adjust(int item_id, const cMerit& item_merit)
+void cProbSchedule::Adjust(int item_id, const cMerit& item_merit, int deme_id)
 {
   if (cChangeList *change_list = GetChangeList()) {
     change_list->MarkChange(item_id);

Modified: development/source/tools/cProbSchedule.h
===================================================================
--- development/source/tools/cProbSchedule.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cProbSchedule.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -57,7 +57,7 @@
   cProbSchedule(int num_cells, int seed) : cSchedule(num_cells), m_rng(seed), chart(num_cells) { ; }
   ~cProbSchedule() { ; }
 
-  void Adjust(int item_id, const cMerit& merit);
+  void Adjust(int item_id, const cMerit& merit, int deme_id);
   int GetNextID();
 };
 

Modified: development/source/tools/cSchedule.h
===================================================================
--- development/source/tools/cSchedule.h	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/source/tools/cSchedule.h	2008-02-17 21:23:33 UTC (rev 2335)
@@ -35,7 +35,7 @@
 
 /**
  * This class is the base object to handle time-slicing. All other schedulers
- * are derived from this class.  This is a pure virtual class.
+ * are derived from this class.  This is a virtual class.
  *
  **/
 
@@ -61,7 +61,7 @@
   virtual ~cSchedule();
 
   virtual bool OK() { return true; }
-  virtual void Adjust(int item_id, const cMerit & merit) { ; }
+  virtual void Adjust(int item_id, const cMerit & merit, int deme_id=0) { ; }
   virtual int GetNextID() = 0;
   virtual double GetStatus(int id) { return 0.0; }
   void SetChangeList(cChangeList *change_list);

Modified: development/support/config/avida.cfg
===================================================================
--- development/support/config/avida.cfg	2008-02-16 19:37:06 UTC (rev 2334)
+++ development/support/config/avida.cfg	2008-02-17 21:23:33 UTC (rev 2335)
@@ -3,7 +3,7 @@
 # For more information, see doc/config.html
 #############################################################################
 
-VERSION_ID 2.9.0   # Do not change this value.
+VERSION_ID 2.7.0   # Do not change this value.
 
 ### GENERAL_GROUP ###
 # General Settings
@@ -12,11 +12,7 @@
                 # 2 = Interactive
 VIEW_MODE 1     # Initial viewer screen
 CLONE_FILE -    # Clone file to load
-VERBOSITY 1     # 0 = No output at all
-                # 1=Normal output
-                # 2 = Verbose output, detailing progress
-                # 3 = High level of details, as available
-                # 4 = Print Debug Information, as applicable
+VERBOSITY 1     # Control output verbosity
 
 ### ARCH_GROUP ###
 # Architecture Variables
@@ -36,9 +32,6 @@
 # Configuration Files
 DATA_DIR data                       # Directory in which config files are found
 INST_SET -                          # File containing instruction set
-INST_SET_FORMAT 0                   # Instruction set file format.
-                                    # 0 = Default
-                                    # 1 = New Style
 EVENT_FILE events.cfg               # File containing list of events during run
 ANALYZE_FILE analyze.cfg            # File used for analysis mode
 ENVIRONMENT_FILE environment.cfg    # File that describes the environment
@@ -53,51 +46,45 @@
                              # germline replication.
 GERMLINE_REPLACES_SOURCE 0   # Whether the source germline is updated
                              # on replication; 0=no.
-GERMLINE_RANDOM_PLACEMENT 0  # Defines how the seed for a germline is placed
-                             #  within the deme;
-                             # 0 = organisms is placed in center of deme, no orientation
-                             # 1 = organisms is placed in center of deme and oriented
-                             # 2 = organism is randomly placed in deme, no orientation
+GERMLINE_RANDOM_PLACEMENT 0  # Whether the seed for a germline is placed
+                             #  randomly within the deme; 0=no.
 MAX_DEME_AGE 500             # The maximum age of a deme (in updates) to be
                              # used for age-based replication (default=500).
 
 ### REPRODUCTION_GROUP ###
 # Birth and Death
-BIRTH_METHOD 0            # Which organism should be replaced on birth?
-                          # 0 = Random organism in neighborhood
-                          # 1 = Oldest in neighborhood
-                          # 2 = Largest Age/Merit in neighborhood
-                          # 3 = None (use only empty cells in neighborhood)
-                          # 4 = Random from population (Mass Action)
-                          # 5 = Oldest in entire population
-                          # 6 = Random within deme
-                          # 7 = Organism faced by parent
-                          # 8 = Next grid cell (id+1)
-                          # 9 = Largest energy used in entire population
-                          # 10 = Largest energy used in neighborhood
-PREFER_EMPTY 1            # Give empty cells preference in offsping placement?
-ALLOW_PARENT 1            # Allow births to replace the parent organism?
-DEATH_METHOD 2            # 0 = Never die of old age.
-                          # 1 = Die when inst executed = AGE_LIMIT (+deviation)
-                          # 2 = Die when inst executed = length*AGE_LIMIT (+dev)
-AGE_LIMIT 20              # Modifies DEATH_METHOD
-AGE_DEVIATION 0           # Creates a distribution around AGE_LIMIT
-ALLOC_METHOD 0            # (Orignal CPU Only)
-                          # 0 = Allocated space is set to default instruction.
-                          # 1 = Set to section of dead genome (Necrophilia)
-                          # 2 = Allocated space is set to random instruction.
-DIVIDE_METHOD 1           # 0 = Divide leaves state of mother untouched.
-                          # 1 = Divide resets state of mother
-                          #     (after the divide, we have 2 children)
-                          # 2 = Divide resets state of current thread only
-                          #     (does not touch possible parasite threads)
-INJECT_METHOD 0           # 0 = Leaves the parasite thread state untouched.
-                          # 1 = Resets the calling thread state on inject
-GENERATION_INC_METHOD 1   # 0 = Only the generation of the child is
-                          #     increased on divide.
-                          # 1 = Both the generation of the mother and child are
-                          #     increased on divide (good with DIVIDE_METHOD 1).
-RESET_INPUTS_ON_DIVIDE 0  # Reset environment inputs of parent upon successful divide.
+BIRTH_METHOD 0           # Which organism should be replaced on birth?
+                         # 0 = Random organism in neighborhood
+                         # 1 = Oldest in neighborhood
+                         # 2 = Largest Age/Merit in neighborhood
+                         # 3 = None (use only empty cells in neighborhood)
+                         # 4 = Random from population (Mass Action)
+                         # 5 = Oldest in entire population
+                         # 6 = Random within deme
+                         # 7 = Organism faced by parent
+                         # 8 = Next grid cell (id+1)
+                         # 9 = Largest energy used in entire population
+                         # 10 = Largest energy used in neighborhood
+PREFER_EMPTY 1           # Give empty cells preference in offsping placement?
+ALLOW_PARENT 1           # Allow births to replace the parent organism?
+DEATH_METHOD 2           # 0 = Never die of old age.
+                         # 1 = Die when inst executed = AGE_LIMIT (+deviation)
+                         # 2 = Die when inst executed = length*AGE_LIMIT (+dev)
+AGE_LIMIT 20             # Modifies DEATH_METHOD
+AGE_DEVIATION 0          # Creates a distribution around AGE_LIMIT
+ALLOC_METHOD 0           # (Orignal CPU Only)
+                         # 0 = Allocated space is set to default instruction.
+                         # 1 = Set to section of dead genome (Necrophilia)
+                         # 2 = Allocated space is set to random instruction.
+DIVIDE_METHOD 1          # 0 = Divide leaves state of mother untouched.
+                         # 1 = Divide resets state of mother
+                         #     (after the divide, we have 2 children)
+                         # 2 = Divide resets state of current thread only
+                         #     (does not touch possible parasite threads)
+GENERATION_INC_METHOD 1  # 0 = Only the generation of the child is
+                         #     increased on divide.
+                         # 1 = Both the generation of the mother and child are
+                         #     increased on divide (good with DIVIDE_METHOD 1).
 
 ### RECOMBINATION_GROUP ###
 # Sexual Recombination and Modularity
@@ -114,34 +101,25 @@
 
 ### DIVIDE_GROUP ###
 # Divide Restrictions
-CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes.
-MIN_COPIED_LINES 0.5         # Code fraction which must be copied before divide.
-MIN_EXE_LINES 0.5            # Code fraction which must be executed before divide.
-REQUIRE_ALLOCATE 1           # (Original CPU Only) Require allocate before divide?
-REQUIRED_TASK -1             # Task ID required for successful divide.
-IMMUNITY_TASK -1             # Task providing immunity from the required task.
-REQUIRED_REACTION -1         # Reaction ID required for successful divide.
-REQUIRED_BONUS 0.0           # Required bonus to divide.
-IMPLICIT_REPRO_BONUS 0       # Call Inst_Repro to divide upon achieving this bonus. 0 = OFF
-IMPLICIT_REPRO_CPU_CYCLES 0  # Call Inst_Repro after this many cpu cycles. 0 = OFF
-IMPLICIT_REPRO_TIME 0        # Call Inst_Repro after this time used. 0 = OFF
-IMPLICIT_REPRO_END 0         # Call Inst_Repro after executing the last instruction in the genome.
+CHILD_SIZE_RANGE 2.0  # Maximal differential between child and parent sizes.
+MIN_COPIED_LINES 0.5  # Code fraction which must be copied before divide.
+MIN_EXE_LINES 0.5     # Code fraction which must be executed before divide.
+REQUIRE_ALLOCATE 1    # (Original CPU Only) Require allocate before divide?
+REQUIRED_TASK -1      # Task ID required for successful divide.
+IMMUNITY_TASK -1      # Task providing immunity from the required task.
+REQUIRED_REACTION -1  # Reaction ID required for successful divide.
+REQUIRED_BONUS 0      # The bonus that an organism must accumulate to divide.
 
 ### MUTATION_GROUP ###
 # Mutations
 POINT_MUT_PROB 0.0    # Mutation rate (per-location per update)
 COPY_MUT_PROB 0.0075  # Mutation rate (per copy)
-COPY_SLIP_PROB 0.0    # Slip rate (per copy)
 INS_MUT_PROB 0.0      # Insertion rate (per site, applied on divide)
 DEL_MUT_PROB 0.0      # Deletion rate (per site, applied on divide)
 DIV_MUT_PROB 0.0      # Mutation rate (per site, applied on divide)
-UNIFORM_MUT_PROB 0.0  # Uniform mutation probability (per site, applied on divide)
-                      # - Randomly applies any of the three classes of mutations (ins, del, point).
 DIVIDE_MUT_PROB 0.0   # Mutation rate (per divide)
 DIVIDE_INS_PROB 0.05  # Insertion rate (per divide)
 DIVIDE_DEL_PROB 0.05  # Deletion rate (per divide)
-DIVIDE_SLIP_PROB 0.0  # Slip rate (per divide) - creates large deletions/duplications
-SLIP_FILL_MODE 0      # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled
 PARENT_MUT_PROB 0.0   # Per-site, in parent, on divide
 SPECIAL_MUT_LINE -1   # If this is >= 0, ONLY this line is mutated
 INJECT_INS_PROB 0.0   # Insertion rate (per site, applied on inject)
@@ -165,10 +143,8 @@
 STERILIZE_BENEFICIAL 0.0   # 
 FAIL_IMPLICIT 0            # Should copies that failed *not* due to mutations
                            # be eliminated?
-NEUTRAL_MAX 0.0            # The percent benifical change from parent fitness
-                           # to be considered neutral.
-NEUTRAL_MIN 0.0            # The percent deleterious change from parent fitness
-                           # to be considered neutral.
+NEUTRAL_MAX 0.0            # The percent benifical change from parent fitness to be considered neutral.
+NEUTRAL_MIN 0.0            # The percent deleterious change from parent fitness to be considered neutral.
 
 ### TIME_GROUP ###
 # Time Slicing
@@ -185,44 +161,39 @@
                             # 6 = Merit prop. to num times MERIT_BONUS_INST is in genome.
 BASE_CONST_MERIT 100        # Base merit when BASE_MERIT_METHOD set to 0
 DEFAULT_BONUS 1.0           # Initial bonus before any tasks
-MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by this default bonus
-                            # rather than the accumulated bonus of the parent? 0 = off
-MERIT_BONUS_INST 0          # in BASE_MERIT_METHOD 6, this sets which instruction counts
-                            # (-1 = none, 0 = First in INST_SET.)
-MERIT_BONUS_EFFECT 0        # in BASE_MERIT_METHOD 6, this sets how much merit is earned
-                            # per instruction (-1 = penalty, 0 = no effect.)
-FITNESS_METHOD 0            # 0 = default, >1 = experimental
-FITNESS_COEFF 1.0           # A FITNESS_METHOD parameter
-FITNESS_VALLEY 0            # in BASE_MERIT_METHOD 6, this creates valleys from
-                            # FITNESS_VALLEY_START to FITNESS_VALLEY_STOP
-                            # (0 = off, 1 = on)
-FITNESS_VALLEY_START 0      # if FITNESS_VALLEY = 1, orgs with num_key_instructions
-                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP
-                            # get fitness 1 (lowest)
-FITNESS_VALLEY_STOP 0       # if FITNESS_VALLEY = 1, orgs with num_key_instructions
-                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP
-                            # get fitness 1 (lowest)
+MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by the default bonus
+                            # rather than the accumulated bonus of the parent?
+MERIT_BONUS_INST 0          # in BASE_MERIT_METHOD 6, this sets which instruction counts (-1=none, 0= 1st in INST_SET.)
+MERIT_BONUS_EFFECT 0        # in BASE_MERIT_METHOD 6, this sets how much merit is earned per INST (-1=penalty, 0= no effect.)
+FITNESS_VALLEY 0            # in BASE_MERIT_METHOD 6, this creates valleys from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP (0= off, 1=on)
+FITNESS_VALLEY_START 0      # if FITNESS_VALLEY =1, orgs with num_key_instructions from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP get fitness 1 (lowest)
+FITNESS_VALLEY_STOP 0       # if FITNESS_VALLEY =1, orgs with num_key_instructions from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP get fitness 1 (lowest)
 MAX_CPU_THREADS 1           # Number of Threads a CPU can spawn
 THREAD_SLICING_METHOD 0     # Formula for and organism's thread slicing
                             #   (num_threads-1) * THREAD_SLICING_METHOD + 1
                             # 0 = One thread executed per time slice.
                             # 1 = All threads executed each time slice.
-NO_CPU_CYCLE_TIME 0         # Don't count each CPU cycle as part of gestation time
 MAX_LABEL_EXE_SIZE 1        # Max nops marked as executed when labels are used
 MERIT_GIVEN 0.0             # Fraction of merit donated with 'donate' command
 MERIT_RECEIVED 0.0          # Multiplier of merit given with 'donate' command
 MAX_DONATE_KIN_DIST -1      # Limit on distance of relation for donate; -1=no max
 MAX_DONATE_EDIT_DIST -1     # Limit on genetic (edit) distance for donate; -1=no max
-MIN_GB_DONATE_THRESHOLD -1  # threshold green beard donates only to orgs above this
-                            # donation attempt threshold; -1=no thresh
+MIN_GB_DONATE_THRESHOLD -1  # threshold green beard donates only to orgs above this donation attempt threshold; -1=no thresh
 DONATE_THRESH_QUANTA 10     # The size of steps between quanta donate thresholds
 MAX_DONATES 1000000         # Limit on number of donates organisms are allowed.
-PRECALC_PHENOTYPE 0         # 0 = Disabled
-                            #  1 = Assign precalculated merit at birth (unlimited resources only)
-                            #  2 = Assign precalculated gestation time
-                            #  3 = Assign precalculated merit AND gestation time.
-                            # Fitness will be evaluated for organism based on these settings.
 
+### PROMOTER_GROUP ###
+# Promoters
+PROMOTERS_ENABLED 0             # Use the promoter/terminator execution scheme.
+                                # Certain instructions must also be included.
+PROMOTER_PROCESSIVITY 1.0       # Chance of not terminating after each cpu cycle.
+PROMOTER_PROCESSIVITY_INST 1.0  # Chance of not terminating after each instruction.
+PROMOTER_BG_STRENGTH 0          # Probability of positions that are not promoter
+                                # instructions initiating execution (promoters are 1).
+REGULATION_STRENGTH 1           # Strength added or subtracted to a promoter by regulation.
+REGULATION_DECAY_FRAC 0.1       # Fraction of regulation that decays away. 
+                                # Max regulation = 2^(REGULATION_STRENGTH/REGULATION_DECAY_FRAC)
+
 ### GENEOLOGY_GROUP ###
 # Geneology
 TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?
@@ -283,80 +254,11 @@
 
 ### ANALYZE_GROUP ###
 # Analysis Settings
-MAX_CONCURRENCY -1  # Maximum number of analyze threads, -1 == use all available.
-ANALYZE_OPTION_1    # String variable accessible from analysis scripts
-ANALYZE_OPTION_2    # String variable accessible from analysis scripts
+MT_CONCURRENCY 1   # Number of concurrent analyze threads
+ANALYZE_OPTION_1   # String variable accessible from analysis scripts
+ANALYZE_OPTION_2   # String variable accessible from analysis scripts
 
-### ENERGY_GROUP ###
-# Energy Settings
-ENERGY_ENABLED 0                       # Enable Energy Model. 0/1 (off/on)
-ENERGY_GIVEN_ON_INJECT 0               # Energy given to organism upon injection.
-ENERGY_GIVEN_AT_BIRTH 0                # Energy given to offspring upon birth.
-FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH 0.5  # Fraction of perent's energy given to offspring.
-FRAC_ENERGY_DECAY_AT_BIRTH 0.0         # Fraction of energy lost due to decay during reproduction.
-NUM_INST_EXC_BEFORE_0_ENERGY 0         # Number of instructions executed before energy is exhausted.
-ENERGY_CAP -1                          # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int
-APPLY_ENERGY_METHOD 0                  # When should rewarded energy be applied to current energy?
-                                       # 0 = on divide
-                                       # 1 = on completion of task
-                                       # 2 = on sleep
-FRAC_ENERGY_TRANSFER 0.0               # Fraction of replaced organism's energy take by new resident
-LOG_SLEEP_TIMES 0                      # Log sleep start and end times. 0/1 (off/on)
-                                       # WARNING: may use lots of memory.
-
 ### SECOND_PASS_GROUP ###
 # Tracking metrics known after the running experiment previously
 TRACK_CCLADES 0                    # Enable tracking of coalescence clades
 TRACK_CCLADES_IDS coalescence.ids  # File storing coalescence IDs
-
-### GX_GROUP ###
-# Gene Expression CPU Settings
-MAX_PROGRAMIDS 16                # Maximum number of programids an organism can create.
-MAX_PROGRAMID_AGE 2000           # Max number of CPU cycles a programid executes before it is removed.
-IMPLICIT_GENE_EXPRESSION 0       # Create executable programids from the genome without explicit allocation and copying?
-IMPLICIT_BG_PROMOTER_RATE 0.0    # Relative rate of non-promoter sites creating programids.
-IMPLICIT_TURNOVER_RATE 0.0       # Number of programids recycled per CPU cycle. 0 = OFF
-IMPLICIT_MAX_PROGRAMID_LENGTH 0  # Creation of an executable programid terminates after this many instructions. 0 = disabled
-
-### PROMOTER_GROUP ###
-# Promoters
-PROMOTERS_ENABLED 0             # Use the promoter/terminator execution scheme.
-                                # Certain instructions must also be included.
-PROMOTER_INST_MAX 0             # Maximum number of instructions to execute before terminating. 0 = off
-PROMOTER_PROCESSIVITY 1.0       # Chance of not terminating after each cpu cycle.
-PROMOTER_PROCESSIVITY_INST 1.0  # Chance of not terminating after each instruction.
-PROMOTER_TO_REGISTER 0          # Place a promoter's base bit code in register BX when starting execution from it?
-TERMINATION_RESETS 0            # Does termination reset the thread's state?
-NO_ACTIVE_PROMOTER_EFFECT 0     # What happens when there are no active promoters?
-                                # 0 = Start execution at the beginning of the genome.
-                                # 1 = Kill the organism.
-                                # 2 = Stop the organism from executing any further instructions.
-PROMOTER_CODE_SIZE 24           # Size of a promoter code in bits. (Maximum value is 32)
-PROMOTER_EXE_LENGTH 3           # Length of promoter windows used to determine execution.
-PROMOTER_EXE_THRESHOLD 2        # Minimum number of bits that must be set in a promoter window to allow execution.
-INST_CODE_LENGTH 3              # Instruction binary code length (number of bits)
-INST_CODE_DEFAULT_TYPE 0        # Default value of instruction binary code value.
-                                # 0 = All zeros
-                                # 1 = Based off the instruction number
-CONSTITUTIVE_REGULATION 0       # Sense a new regulation value before each CPU cycle?
-
-### COLORS_GROUP ###
-# Output colors for when data files are printed in HTML mode.
-# There are two sets of these; the first are for lineages,
-# and the second are for mutation tests.
-COLOR_DIFF CCCCFF        # Color to flag stat that has changed since parent.
-COLOR_SAME FFFFFF        # Color to flag stat that has NOT changed since parent.
-COLOR_NEG2 FF0000        # Color to flag stat that is significantly worse than parent.
-COLOR_NEG1 FFCCCC        # Color to flag stat that is minorly worse than parent.
-COLOR_POS1 CCFFCC        # Color to flag stat that is minorly better than parent.
-COLOR_POS2 00FF00        # Color to flag stat that is significantly better than parent.
-COLOR_MUT_POS 00FF00     # Color to flag stat that has changed since parent.
-COLOR_MUT_NEUT FFFFFF    # Color to flag stat that has changed since parent.
-COLOR_MUT_NEG FFFF00     # Color to flag stat that has changed since parent.
-COLOR_MUT_LETHAL FF0000  # Color to flag stat that has changed since parent.
-
-### BIOMIMETIC_GROUP ###
-# Biomimetic Features Settings
-BIOMIMETIC_REFRACTORY_PERIOD 0.0  # Number of updates affected by refractory period
-BIOMIMETIC_MOVEMENT_STEP 0        # Number of cells to move Avidian on move instruction
-BIOMIMETIC_K 0                    # Carrying capacity in number of organisms




More information about the Avida-cvs mailing list