[Avida-SVN] r3559 - in branches/biounit: . Avida.xcodeproj source/cpu source/drivers source/main source/targets/avida-viewer support/config/misc support/config/misc/Parasites tests/default_transsmt_100u

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Wed Dec 16 08:01:42 PST 2009


Author: brysonda
Date: 2009-12-16 11:01:42 -0500 (Wed, 16 Dec 2009)
New Revision: 3559

Added:
   branches/biounit/support/config/misc/Parasites/
   branches/biounit/support/config/misc/Parasites/avida.cfg
   branches/biounit/support/config/misc/Parasites/default-smt.org
   branches/biounit/support/config/misc/Parasites/dominant-org.org
   branches/biounit/support/config/misc/Parasites/environment.cfg
   branches/biounit/support/config/misc/Parasites/events.cfg
   branches/biounit/support/config/misc/Parasites/instset-smt.cfg
   branches/biounit/support/config/misc/Parasites/parasite-smt.org
Removed:
   branches/biounit/support/config/misc/Parasites/avida.cfg
   branches/biounit/support/config/misc/Parasites/default-smt.org
   branches/biounit/support/config/misc/Parasites/dominant-org.org
   branches/biounit/support/config/misc/Parasites/environment.cfg
   branches/biounit/support/config/misc/Parasites/events.cfg
   branches/biounit/support/config/misc/Parasites/instset-smt.cfg
   branches/biounit/support/config/misc/Parasites/parasite-smt.org
Modified:
   branches/biounit/
   branches/biounit/Avida.xcodeproj/
   branches/biounit/source/cpu/cHardwareTransSMT.cc
   branches/biounit/source/drivers/cDefaultRunDriver.cc
   branches/biounit/source/main/cAvidaConfig.h
   branches/biounit/source/main/cOrganism.cc
   branches/biounit/source/main/cPhenotype.cc
   branches/biounit/source/main/cPhenotype.h
   branches/biounit/source/main/cPopulation.cc
   branches/biounit/source/main/cPopulationInterface.cc
   branches/biounit/source/main/cPopulationInterface.h
   branches/biounit/source/targets/avida-viewer/cSymbolUtil.cc
   branches/biounit/tests/default_transsmt_100u/test_list
Log:
Merge r3507:3558 from branches/parasites into branches/biounit.  Includes r3554:3558 from development.


Property changes on: branches/biounit
___________________________________________________________________
Name: svn:ignore
   + build



Property changes on: branches/biounit/Avida.xcodeproj
___________________________________________________________________
Name: svn:ignore
   + zamanlui.mode1v3
zamanlui.pbxuser


Modified: branches/biounit/source/cpu/cHardwareTransSMT.cc
===================================================================
--- branches/biounit/source/cpu/cHardwareTransSMT.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/cpu/cHardwareTransSMT.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -131,7 +131,7 @@
 	
   return new tInstLib<tMethod>(f_size, s_f_array, n_names, nop_mods, functions, def, null_inst);
 }
- 
+
 cHardwareTransSMT::cHardwareTransSMT(cAvidaContext& ctx, cWorld* world, cOrganism* in_organism,
                                      cInstSet* in_inst_set, int inst_set_id)
 : cHardwareBase(world, in_organism, in_inst_set, inst_set_id), m_mem_array(1)
@@ -159,7 +159,7 @@
   // Reset that single thread.
   m_threads[0].Reset(this, 0);
   m_cur_thread = 0;
-		
+  
   // Reset all stacks (local and global)
   for(int i = 0; i < NUM_STACKS; i++) {
 		Stack(i).Clear();
@@ -200,7 +200,7 @@
     // Setup the hardware for the next instruction to be executed.
     m_cur_thread++;
     if (m_cur_thread >= m_threads.GetSize()) m_cur_thread = 0;
-
+    
     if (!ThreadIsRunning()) continue;
     
     AdvanceIP() = true;
@@ -331,13 +331,13 @@
 	<< endl;
 	
   fp << "  R-Head:(" << GetHead(nHardware::HEAD_READ).GetMemSpace() << ", " 
-		<< GetHead(nHardware::HEAD_READ).GetPosition() << ")  " 
-		<< "W-Head:(" << GetHead(nHardware::HEAD_WRITE).GetMemSpace()  << ", "
-		<< GetHead(nHardware::HEAD_WRITE).GetPosition() << ")  "
-		<< "F-Head:(" << GetHead(nHardware::HEAD_FLOW).GetMemSpace()   << ",  "
-		<< GetHead(nHardware::HEAD_FLOW).GetPosition() << ")  "
-		<< "RL:" << GetReadLabel().AsString() << "   "
-    << endl;
+  << GetHead(nHardware::HEAD_READ).GetPosition() << ")  " 
+  << "W-Head:(" << GetHead(nHardware::HEAD_WRITE).GetMemSpace()  << ", "
+  << GetHead(nHardware::HEAD_WRITE).GetPosition() << ")  "
+  << "F-Head:(" << GetHead(nHardware::HEAD_FLOW).GetMemSpace()   << ",  "
+  << GetHead(nHardware::HEAD_FLOW).GetPosition() << ")  "
+  << "RL:" << GetReadLabel().AsString() << "   "
+  << endl;
 	
   for (int i = 0; i < m_mem_array.GetSize(); i++) {
     const cCPUMemory& mem = m_mem_array[i];
@@ -415,7 +415,7 @@
 // memory.  Return the first line _after_ the the found label.  It is okay
 // to find search label's match inside another label.
 int cHardwareTransSMT::FindLabel_Forward(const cCodeLabel& search_label,
-                                    const cGenome& search_genome, int pos)
+                                         const cGenome& search_genome, int pos)
 {
   assert (pos < search_genome.GetSize() && pos >= 0);
 	
@@ -496,7 +496,7 @@
 // memory.  Return the first line _after_ the the found label.  It is okay
 // to find search label's match inside another label.
 int cHardwareTransSMT::FindLabel_Backward(const cCodeLabel & search_label,
-                                     const cGenome & search_genome, int pos)
+                                          const cGenome & search_genome, int pos)
 {
   assert (pos < search_genome.GetSize());
 	
@@ -648,8 +648,11 @@
 bool cHardwareTransSMT::InjectHost(const cCodeLabel& in_label, const cGenome& inject_code)
 {
   // Inject fails if the memory space is already in use or thread exists
-  if (MemorySpaceExists(in_label) || FindThreadLabel(in_label) != -1) return false;
-
+  if (MemorySpaceExists(in_label) || FindThreadLabel(in_label) != -1) 
+  {
+    return false;
+  }
+  
   // Otherwise create the memory space and copy in the genome
   int mem_space_used = FindMemorySpaceLabel(in_label, -1);
   assert(mem_space_used != -1);
@@ -657,7 +660,7 @@
   
   // Create a thread for this parasite
   if (!ThreadCreate(in_label, mem_space_used)) return false; // Partially failed injection, could not create thread
-
+  
   return true;
 }
 
@@ -716,7 +719,7 @@
   // Add new thread entry
   m_threads.Resize(thread_id + 1);
   m_thread_lbls.Add(hash_key, thread_id);
-    
+  
   // Setup this thread into the current selected memory space (Flow Head)
   m_threads[thread_id].Reset(this, mem_space);
 	
@@ -726,7 +729,7 @@
 bool cHardwareTransSMT::ThreadKill(const int thread_id)
 {
   if (thread_id < 1 || thread_id >= m_threads.GetSize()) return false;
-
+  
   // Increment thread, if killing current thread
   if (m_cur_thread == thread_id) ThreadNext();
   
@@ -840,59 +843,50 @@
   m_organism->GetPhenotype().SetDivType(mut_multiplier);
 	
   // Divide Mutations (per site)
-  if(m_organism->GetDivMutProb() > 0){
-    int num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(), 
-																					 m_organism->GetInjectMutProb() / mut_multiplier);
-    // If we have lines to mutate...
-    if( num_mut > 0 ){
-      for (int i = 0; i < num_mut; i++) {
-				int site = ctx.GetRandom().GetUInt(injected_code.GetSize());
-				injected_code[site] = m_inst_set->GetRandomInst(ctx);
-      }
+  int num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(), 
+                                                m_organism->GetInjectMutProb() / mut_multiplier);
+  // If we have lines to mutate...
+  if( num_mut > 0 ){
+    for (int i = 0; i < num_mut; i++) {
+      int site = ctx.GetRandom().GetUInt(injected_code.GetSize());
+      injected_code[site] = m_inst_set->GetRandomInst(ctx);
     }
   }
 	
-	
   // Insert Mutations (per site)
-  if(m_organism->GetDivInsProb() > 0){
-    int num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(),
-																					 m_organism->GetInjectInsProb());
-    // If would make creature to big, insert up to MAX_CREATURE_SIZE
-    if( num_mut + injected_code.GetSize() > MAX_CREATURE_SIZE ){
-      num_mut = MAX_CREATURE_SIZE - injected_code.GetSize();
+  num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(),
+                                            m_organism->GetInjectInsProb());
+  // If would make creature to big, insert up to MAX_CREATURE_SIZE
+  if( num_mut + injected_code.GetSize() > MAX_CREATURE_SIZE )
+    num_mut = MAX_CREATURE_SIZE - injected_code.GetSize();
+  // If we have lines to insert...
+  if( num_mut > 0 ){
+    // Build a list of the sites where mutations occured
+    static int mut_sites[MAX_CREATURE_SIZE];
+    for (int i = 0; i < num_mut; i++) {
+      mut_sites[i] = ctx.GetRandom().GetUInt(injected_code.GetSize() + 1);
     }
-    // If we have lines to insert...
-    if( num_mut > 0 ){
-      // Build a list of the sites where mutations occured
-      static int mut_sites[MAX_CREATURE_SIZE];
-      for (int i = 0; i < num_mut; i++) {
-				mut_sites[i] = ctx.GetRandom().GetUInt(injected_code.GetSize() + 1);
-      }
-      // Sort the list
-      qsort( (void*)mut_sites, num_mut, sizeof(int), &IntCompareFunction );
-      // Actually do the mutations (in reverse sort order)
-      for(int i = num_mut-1; i >= 0; i--) {
-				injected_code.Insert(mut_sites[i], m_inst_set->GetRandomInst(ctx));
-      }
+    // Sort the list
+    qsort( (void*)mut_sites, num_mut, sizeof(int), &IntCompareFunction );
+    // Actually do the mutations (in reverse sort order)
+    for(int i = num_mut-1; i >= 0; i--) {
+      injected_code.Insert(mut_sites[i], m_inst_set->GetRandomInst(ctx));
     }
   }
 	
-	
   // Delete Mutations (per site)
-  if( m_organism->GetDivDelProb() > 0 ){
-    int num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(),
-																					 m_organism->GetInjectDelProb());
-    // If would make creature too small, delete down to MIN_CREATURE_SIZE
-    if (injected_code.GetSize() - num_mut < MIN_CREATURE_SIZE) {
-      num_mut = injected_code.GetSize() - MIN_CREATURE_SIZE;
-    }
-		
-    // If we have lines to delete...
-    for (int i = 0; i < num_mut; i++) {
-      int site = ctx.GetRandom().GetUInt(injected_code.GetSize());
-      injected_code.Remove(site);
-    }
+  num_mut = ctx.GetRandom().GetRandBinomial(injected_code.GetSize(),
+                                            m_organism->GetInjectDelProb());
+  // If would make creature too small, delete down to MIN_CREATURE_SIZE
+  if (injected_code.GetSize() - num_mut < MIN_CREATURE_SIZE) {
+    num_mut = injected_code.GetSize() - MIN_CREATURE_SIZE;
   }
+  
+  // If we have lines to delete...
+  for (int i = 0; i < num_mut; i++) {
+    int site = ctx.GetRandom().GetUInt(injected_code.GetSize());
+    injected_code.Remove(site);
+  }
 	
   // Mutations in the parent's genome
   if (m_organism->GetParentMutProb() > 0) {
@@ -906,6 +900,7 @@
 }
 
 
+
 bool cHardwareTransSMT::Divide_Main(cAvidaContext& ctx, double mut_multiplier)
 {
   const int mem_space_used = GetHead(nHardware::HEAD_WRITE).GetMemSpace();
@@ -913,7 +908,7 @@
   
   // Make sure the memory space we're using exists
   if (m_mem_array.GetSize() <= mem_space_used) return false;
-  	
+  
   // Make sure this divide will produce a viable offspring.
   m_cur_child = mem_space_used; // save current child memory space for use by dependent functions (e.g. calcCopiedSize())
   if (!Divide_CheckViable(ctx, m_mem_array[0].GetSize(), write_head_pos)) return false;
@@ -954,13 +949,13 @@
       case DIVIDE_METHOD_SPLIT:
         Reset(ctx);  // This will wipe out all parasites on a divide.
         break;
-      
+        
       case DIVIDE_METHOD_BIRTH:
         // Reset only the calling thread's state
         for(int x = 0; x < nHardware::NUM_HEADS; x++) GetHead(x).Reset(this, 0);
         for(int x = 0; x < NUM_LOCAL_STACKS; x++) Stack(x).Clear();
         break;
-      
+        
       case DIVIDE_METHOD_OFFSPRING:
       default:
         break;
@@ -1125,11 +1120,15 @@
 	
   // Mutations only occur on the read, for the moment.
   int read_inst = 0;
+  
   if (m_organism->TestCopyMut(ctx)) {
     read_inst = m_inst_set->GetRandomInst(ctx).GetOp();
   } else {
     read_inst = GetHead(head_id).GetInst().GetOp();
   }
+
+  
+  read_inst = GetHead(head_id).GetInst().GetOp();
   Stack(dst).Push(read_inst);
   ReadInst(read_inst);
 	
@@ -1142,7 +1141,7 @@
 {
   const int head_id = FindModifiedHead(nHardware::HEAD_WRITE);
   const int src = FindModifiedStack(STACK_AX);
-
+  
   cHeadCPU & active_head = GetHead(head_id);
   int mem_space_used = active_head.GetMemSpace();
   
@@ -1451,7 +1450,7 @@
 bool cHardwareTransSMT::Inst_CallFlow(cAvidaContext& ctx)
 {
   const int dst = FindModifiedStack(STACK_AX);
-
+  
   const int location = IP().GetPosition() & 0xFFFF;
   const int mem_space = IP().GetMemSpace() << 8;
   const int ra  = location | mem_space;

Modified: branches/biounit/source/drivers/cDefaultRunDriver.cc
===================================================================
--- branches/biounit/source/drivers/cDefaultRunDriver.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/drivers/cDefaultRunDriver.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -46,7 +46,7 @@
 
 
 cDefaultRunDriver::cDefaultRunDriver(cWorld* world) : m_world(world), m_done(false), 
-      m_fastforward(false),m_last_generation(0),  m_generation_same_update_count(0) 
+m_fastforward(false),m_last_generation(0),  m_generation_same_update_count(0) 
 {
   cDriverManager::Register(this);
   world->SetDriver(this);
@@ -110,7 +110,7 @@
       // Process the update.
       const int UD_size = ave_time_slice * population.GetNumOrganisms();
       const double step_size = 1.0 / (double) UD_size;
-    
+      
       for (int i = 0; i < UD_size; i++) {
         if (population.GetNumOrganisms() == 0) {
           m_done = true;
@@ -122,21 +122,21 @@
     
     // end of update stats...
     population.ProcessPostUpdate(ctx);
-        
+    
     // No viewer; print out status for this update....
     if (m_world->GetVerbosity() > VERBOSE_SILENT) {
       cout.setf(ios::left);
       cout.setf(ios::showpoint);
       cout << "UD: " << setw(6) << stats.GetUpdate() << "  "
-        << "Gen: " << setw(9) << setprecision(7) << stats.SumGeneration().Average() << "  "
-        << "Fit: " << setw(9) << setprecision(7) << stats.GetAveFitness() << "  "
+      << "Gen: " << setw(9) << setprecision(7) << stats.SumGeneration().Average() << "  "
+      << "Fit: " << setw(9) << setprecision(7) << stats.GetAveFitness() << "  "
       //  << "Energy: " << setw(9) << setprecision(7) << stats.GetAveEnergy() << "  "
-//        << "Merit: " << setw(9) << setprecision(7) << stats.GetAveMerit() << "  "
-        << "Orgs: " << setw(6) << population.GetNumOrganisms() << "  ";
-//        << "Spec: " << setw(6) << setprecision(4) << stats.GetAveSpeculative() << "  "
-//        << "SWst: " << setw(6) << setprecision(4) << (((double)stats.GetSpeculativeWaste() / (double)UD_size) * 100.0) << "%"
-//        << "Thrd: " << setw(6) << stats.GetNumThreads() << "  "
-//        << "Para: " << stats.GetNumParasites()
+      << "Merit: " << setw(9) << setprecision(7) << stats.GetAveMerit() << "  "
+      << "Orgs: " << setw(6) << population.GetNumOrganisms() << "  "
+      //        << "Spec: " << setw(6) << setprecision(4) << stats.GetAveSpeculative() << "  "
+      //        << "SWst: " << setw(6) << setprecision(4) << (((double)stats.GetSpeculativeWaste() / (double)UD_size) * 100.0) << "%"
+      << "Thrd: " << setw(6) << stats.GetNumThreads() << "  "
+      << "Para: " << stats.GetNumParasites() << "  GenEntr: " << stats.GetEntropy() << "  ";
       if (m_world->GetPopulation().GetNumDemes() > 1) cout << "Demes: " << setw(4) << stats.GetNumOccupiedDemes() << " ";
       cout << endl;
     }
@@ -153,7 +153,7 @@
     
     // Keep track of changes in generation for fast-forward purposes
     UpdateFastForward(stats.GetGeneration(),stats.GetNumCreatures());
-      
+    
     // Exit conditons...
     if (population.GetNumOrganisms() == 0) m_done = true;
   }
@@ -184,11 +184,11 @@
 {
   if (bool(m_population_fastforward_threshold))
   {
-	if (population >= m_population_fastforward_threshold) m_fastforward = true;
-	else m_fastforward = false;
+    if (population >= m_population_fastforward_threshold) m_fastforward = true;
+    else m_fastforward = false;
   }
   if (!m_generation_update_fastforward_threshold) return;
-
+  
   if (inGeneration == m_last_generation)
   {
     m_generation_same_update_count++;

Modified: branches/biounit/source/main/cAvidaConfig.h
===================================================================
--- branches/biounit/source/main/cAvidaConfig.h	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cAvidaConfig.h	2009-12-16 16:01:42 UTC (rev 3559)
@@ -150,8 +150,7 @@
     bool use_overide;
     
   public:
-    cBaseConfigEntry(const cString& _name, const cString& _type,
-		     const cString& _def, const cString& _desc);
+    cBaseConfigEntry(const cString& _name, const cString& _type, const cString& _def, const cString& _desc);
     virtual ~cBaseConfigEntry() { ; }
     
     virtual void LoadString(const cString& str_value) = 0;
@@ -175,7 +174,7 @@
     tList<cBaseConfigEntry> entry_list;
   public:
     cBaseConfigGroup(const cString& _name, const cString& _desc)
-      : group_name(_name), description(_desc) { global_group_list.PushRear(this); }
+    : group_name(_name), description(_desc) { global_group_list.PushRear(this); }
     ~cBaseConfigGroup() { ; }
     
     const cString& GetName() const { return group_name; }
@@ -195,7 +194,7 @@
     cString m_description;
     tList<cBaseConfigFormatEntry> m_entry_list;
     cStringList m_value;
-  
+    
   public:
     cBaseConfigCustomFormat(const cString& _name, const cString& _desc)
       : m_format_name(_name), m_description(_desc) { global_format_list.PushRear(this); }
@@ -207,11 +206,11 @@
     const tList<cBaseConfigFormatEntry>& GetEntryList() const { return m_entry_list; }
     
     void AddEntry(cBaseConfigFormatEntry* _entry) { m_entry_list.PushRear(_entry); }
-  
+    
     const cStringList& Get() const { return m_value; }
     void Add(const cString& value) { m_value.PushRear(value); }
   };
-
+  
   // The cConfigFormatEntry class is a bass class for all configuration entries.
   // It is used to manage the various types of entries in a dynamic fashion.
   class cBaseConfigFormatEntry {
@@ -247,8 +246,8 @@
   static tList<cBaseConfigCustomFormat> global_format_list;
   tList<cBaseConfigGroup> m_group_list;
   tList<cBaseConfigCustomFormat> m_format_list;
-
-
+  
+  
 public:
   cAvidaConfig()
   {
@@ -257,7 +256,7 @@
     global_list_mutex.Unlock();
   }
   ~cAvidaConfig() { ; }
-
+  
 #ifdef OVERRIDE_CONFIG
 #include "config_overrides.h"
 #else
@@ -339,7 +338,7 @@
   CONFIG_ADD_VAR(DEMES_PREFER_EMPTY, int, 0, "Give empty demes preference as targets of deme replication?");
   CONFIG_ADD_VAR(DEMES_PROTECTION_POINTS, int, 0, "The number of points a deme receives for each suicide.");
 	CONFIG_ADD_VAR(POINT_DECAY_PERCENT, int, 0, "The percentage of points decayed each time cActionDecayPoints is called.");
-
+  
   CONFIG_ADD_GROUP(REPRODUCTION_GROUP, "Birth and Death");
   CONFIG_ADD_VAR(BIRTH_METHOD, int, 0, "Which organism should be replaced on birth?\n0 = Random organism in neighborhood\n1 = Oldest in neighborhood\n2 = Largest Age/Merit in neighborhood\n3 = None (use only empty cells in neighborhood)\n4 = Random from population (Mass Action)\n5 = Oldest in entire population\n6 = Random within deme\n7 = Organism faced by parent\n8 = Next grid cell (id+1)\n9 = Largest energy used in entire population\n10 = Largest energy used in neighborhood\n11 = Local neighborhood dispersal");
   CONFIG_ADD_VAR(PREFER_EMPTY, int, 1, "Give empty cells preference in offsping placement?");
@@ -355,6 +354,11 @@
   CONFIG_ADD_VAR(GENERATION_INC_METHOD, int, 1, "0 = Only the generation of the child is\n    increased on divide.\n1 = Both the generation of the mother and child are\n    increased on divide (good with DIVIDE_METHOD 1).");
   CONFIG_ADD_VAR(RESET_INPUTS_ON_DIVIDE, int, 0, "Reset environment inputs of parent upon successful divide.");
   CONFIG_ADD_VAR(REPRO_METHOD, int, 1, "Replace existing organism: 1=yes");
+  
+  
+  CONFIG_ADD_VAR(INJECT_PROB_FROM_TASKS, int, 1, "Inject occurs based on probability from performing tasks");
+  CONFIG_ADD_VAR(INJECT_STERILIZES_HOST, int, 0, "Infection causes host steralization");
+  CONFIG_ADD_VAR(INJECT_PROB_SIGMOID, int, 1, "Inject Probs follow a psuedo-sigmoid path - only works if task probs are turned on");
 	
   CONFIG_ADD_GROUP(RECOMBINATION_GROUP, "Sexual Recombination and Modularity");
   CONFIG_ADD_VAR(RECOMBINATION_PROB, double, 1.0, "probability of recombination in div-sex");
@@ -366,7 +370,7 @@
   CONFIG_ADD_VAR(SAME_LENGTH_SEX, int, 0, "0 = recombine with any genome\n1 = only recombine w/ same length");
   CONFIG_ADD_VAR(ALLOW_MATE_SELECTION, bool, 0, "Allow organisms to select mates (requires instruction set support)");
   CONFIG_ADD_VAR(LEGACY_GRID_LOCAL_SELECTION, bool, 0, "Enable legacy grid local mate selection (ignores population structure)");
-
+  
   CONFIG_ADD_GROUP(DIVIDE_GROUP, "Divide Restrictions");
   CONFIG_ADD_VAR(CHILD_SIZE_RANGE, double, 2.0, "Maximal differential between child and parent sizes.\n(Checked BEFORE mutations applied on divide.)");
   CONFIG_ADD_VAR(MIN_COPIED_LINES, double, 0.5, "Code fraction which must be copied before divide.");
@@ -387,13 +391,13 @@
   
   CONFIG_ADD_GROUP(MUTATION_GROUP, "Mutations");
   CONFIG_ADD_VAR(POINT_MUT_PROB, double, 0.0, "Mutation rate (per-location per update)");
-
+  
   CONFIG_ADD_VAR(COPY_MUT_PROB, double, 0.0075, "Mutation rate (per copy)");
   CONFIG_ADD_VAR(COPY_INS_PROB, double, 0.0, "Insertion rate (per copy)");
   CONFIG_ADD_VAR(COPY_DEL_PROB, double, 0.0, "Deletion rate (per copy)");
   CONFIG_ADD_VAR(COPY_UNIFORM_PROB, double, 0.0, "Uniform mutation probability (per copy)\n- Randomly applies any of the three classes of mutations (ins, del, point).");
   CONFIG_ADD_VAR(COPY_SLIP_PROB, double, 0.0, "Slip rate (per copy)");
-
+  
   CONFIG_ADD_VAR(DIV_MUT_PROB, double, 0.0, "Mutation rate (per site, applied on divide)");
   CONFIG_ADD_VAR(DIV_INS_PROB, double, 0.0, "Insertion rate (per site, applied on divide)");
   CONFIG_ADD_VAR(DIV_DEL_PROB, double, 0.0, "Deletion rate (per site, applied on divide)");
@@ -409,9 +413,9 @@
   CONFIG_ADD_VAR(DIVIDE_POISSON_INS_MEAN, double, 0.0, "Insertion rate (Poisson distributed, per divide)");
   CONFIG_ADD_VAR(DIVIDE_POISSON_DEL_MEAN, double, 0.0, "Deletion rate (Poisson distributed, per divide)");
   CONFIG_ADD_VAR(DIVIDE_POISSON_SLIP_MEAN, double, 0.0, "Slip rate (Poisson distributed, per divide)");
-
+  
   CONFIG_ADD_VAR(DIVIDE_UNIFORM_PROB, double, 0.0, "Uniform mutation probability (per divide)\n- Randomly applies any of the three classes of mutations (ins, del, point).");
-
+  
   CONFIG_ADD_VAR(DEATH_PROB, double, 0.0, "Death rate (parent organism, per divide)");
   
   CONFIG_ADD_VAR(INJECT_INS_PROB, double, 0.0, "Insertion rate (per site, applied on inject)");
@@ -426,7 +430,7 @@
   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?");
   CONFIG_ADD_VAR(REVERT_DETRIMENTAL, double, 0.0, "  0.0 to 1.0; Probability of reversion.");
@@ -474,7 +478,7 @@
   CONFIG_ADD_VAR(FASTFORWARD_UPDATES, int, 0, "Fast-forward if the average generation has not changed in this many updates. (0 = off)");
   CONFIG_ADD_VAR(FASTFORWARD_NUM_ORGS, int, 0, "Fast-forward if population is equal to this");
   CONFIG_ADD_VAR(GENOTYPE_PHENPLAST_CALC, int, 100, "Number of times to test a genotype's\nplasticity during runtime.");
-
+  
   CONFIG_ADD_GROUP(GENEOLOGY_GROUP, "Geneology");
   CONFIG_ADD_VAR(TRACK_MAIN_LINEAGE, int, 1, "Keep all ancestors of the active population?\n0=no, 1=yes, 2=yes,w/sexual population");
   CONFIG_ADD_VAR(THRESHOLD, int, 3, "Number of organisms in a genotype needed for it\n  to be considered viable.");
@@ -507,7 +511,7 @@
   CONFIG_ADD_VAR(MESSAGE_SEND_BUFFER_SIZE, bool, 1, "Size of message send buffer (stores messages that were sent)\nTASKS NOT CHECKED ON 0!\n-1=inf, default=1.");
   CONFIG_ADD_VAR(MESSAGE_RECV_BUFFER_SIZE, bool, 8, "Size of message receive buffer (stores messages that are received); -1=inf, default=8.");
 	CONFIG_ADD_VAR(MESSAGE_RECV_BUFFER_BEHAVIOR, bool, 0, "Behavior of message receive buffer; 0=drop oldest (default), 1=drop incoming");
-
+  
   CONFIG_ADD_GROUP(BUY_SELL_GROUP, "Buying and Selling Parameters");
   CONFIG_ADD_VAR(SAVE_RECEIVED, bool, 0, "Enable storage of all inputs bought from other orgs");
   CONFIG_ADD_VAR(BUY_PRICE, int, 0, "price offered by organisms attempting to buy");
@@ -561,7 +565,7 @@
   CONFIG_ADD_GROUP(SECOND_PASS_GROUP, "Tracking metrics known after the running experiment previously");
   CONFIG_ADD_VAR(TRACK_CCLADES, int, 0, "Enable tracking of coalescence clades");
   CONFIG_ADD_VAR(TRACK_CCLADES_IDS, cString, "coalescence.ids", "File storing coalescence IDs");
-
+  
   CONFIG_ADD_GROUP(GX_GROUP, "Gene Expression CPU Settings");
   CONFIG_ADD_VAR(MAX_PROGRAMIDS, int, 16, "Maximum number of programids an organism can create.");
   CONFIG_ADD_VAR(MAX_PROGRAMID_AGE, int, 2000, "Max number of CPU cycles a programid executes before it is removed.");
@@ -570,7 +574,7 @@
   CONFIG_ADD_VAR(IMPLICIT_TURNOVER_RATE, double, 0.0, "Number of programids recycled per CPU cycle. 0 = OFF");
   CONFIG_ADD_VAR(IMPLICIT_MAX_PROGRAMID_LENGTH, int, 0, "Creation of an executable programid terminates after this many instructions. 0 = disabled");
   //  CONFIG_ADD_VAR(CLEAR_ON_OUTPUT, int, 0, "Reset input buffer every time output called?"); @JEB Not fully implemented
-
+  
   CONFIG_ADD_GROUP(PROMOTER_GROUP, "Promoters");
   CONFIG_ADD_VAR(PROMOTERS_ENABLED, int, 0, "Use the promoter/terminator execution scheme.\nCertain instructions must also be included.");
   CONFIG_ADD_VAR(PROMOTER_INST_MAX, int, 0, "Maximum number of instructions to execute before terminating. 0 = off");
@@ -585,7 +589,7 @@
   CONFIG_ADD_VAR(INST_CODE_LENGTH, int, 3, "Instruction binary code length (number of bits)");
   CONFIG_ADD_VAR(INST_CODE_DEFAULT_TYPE, int, 0, "Default value of instruction binary code value.\n0 = All zeros\n1 = Based off the instruction number");
   CONFIG_ADD_VAR(CONSTITUTIVE_REGULATION, int, 0, "Sense a new regulation value before each CPU cycle?");
-
+  
   CONFIG_ADD_GROUP(COLORS_GROUP, "Output colors for when data files are printed in HTML mode.\nThere are two sets of these; the first are for lineages,\nand the second are for mutation tests.");
   CONFIG_ADD_VAR(COLOR_DIFF, cString, "CCCCFF", "Color to flag stat that has changed since parent.");
   CONFIG_ADD_VAR(COLOR_SAME, cString, "FFFFFF", "Color to flag stat that has NOT changed since parent.");
@@ -593,12 +597,12 @@
   CONFIG_ADD_VAR(COLOR_NEG1, cString, "FFCCCC", "Color to flag stat that is minorly worse than parent.");
   CONFIG_ADD_VAR(COLOR_POS1, cString, "CCFFCC", "Color to flag stat that is minorly better than parent.");
   CONFIG_ADD_VAR(COLOR_POS2, cString, "00FF00", "Color to flag stat that is significantly better than parent.");
-
+  
   CONFIG_ADD_VAR(COLOR_MUT_POS,    cString, "00FF00", "Color to flag stat that has changed since parent.");
   CONFIG_ADD_VAR(COLOR_MUT_NEUT,   cString, "FFFFFF", "Color to flag stat that has changed since parent.");
   CONFIG_ADD_VAR(COLOR_MUT_NEG,    cString, "FFFF00", "Color to flag stat that has changed since parent.");
   CONFIG_ADD_VAR(COLOR_MUT_LETHAL, cString, "FF0000", "Color to flag stat that has changed since parent.");
-
+  
   // @WRE: Additions for approaching various features of biological organisms
   CONFIG_ADD_GROUP(BIOMIMETIC_GROUP, "Biomimetic Features Settings");
   CONFIG_ADD_VAR(BIOMIMETIC_REFRACTORY_PERIOD, double, 0.0, "Number of updates affected by refractory period");
@@ -607,7 +611,7 @@
   CONFIG_ADD_VAR(BIOMIMETIC_MOVEMENT_FACTOR, double, 1.0, "Scale merit bonus due to movement (m<1.0 applies a cost)");
   CONFIG_ADD_VAR(BIOMIMETIC_EVAL_ON_MOVEMENT, int, 0, "Force task evaluation on each movement step");
   CONFIG_ADD_VAR(BIOMIMETIC_K, int, 0, "Carrying capacity in number of organisms");
-
+  
   // BDC: Additions for pheromones
   CONFIG_ADD_GROUP(PHEROMONE_GROUP, "Pheromone Settings");
   CONFIG_ADD_VAR(PHEROMONE_ENABLED, bool, 0, "Enable pheromone usage. 0/1 (off/on)");
@@ -631,7 +635,7 @@
 	// -------- Consensus config options --------
   CONFIG_ADD_GROUP(CONSENSUS_GROUP, "Consensus settings");	
 	CONFIG_ADD_VAR(CONSENSUS_HOLD_TIME, int, 1, "Number of updates that consensus must be held for.");
-		
+  
   CONFIG_ADD_CUSTOM_FORMAT(INST_SET_NEW, "Instruction Set Definition");
   CONFIG_ADD_FORMAT_VAR(INST, "Instruction entry in the instruction set");
 	
@@ -664,14 +668,14 @@
 	// -------- Horizontal Gene Transfer (HGT) config options --------
 	CONFIG_ADD_GROUP(HGT_GROUP, "Horizontal gene transfer settings");
 	CONFIG_ADD_VAR(ENABLE_HGT, int, 0, "Whether HGT is enabled; 0=false (default),\n 1=true.");
-	CONFIG_ADD_VAR(HGT_FRAGMENT_SELECTION, int, 0, "Method used to select fragments for HGT mutation (0=random [default]\n1=trimmed selection).");
+	CONFIG_ADD_VAR(HGT_FRAGMENT_SELECTION, int, 0, "Method used to select fragments for HGT mutation (0=random [default]\n1=trimmed selection\n2=random placement).");
 	CONFIG_ADD_VAR(HGT_FRAGMENT_SIZE_MEAN, double, 10, "Mean size of fragments (drawn from a normal\ndist., default=10).");
 	CONFIG_ADD_VAR(HGT_FRAGMENT_SIZE_VARIANCE, double, 2, "Variance of fragments (drawn from a normal\ndist., default=2).");
 	CONFIG_ADD_VAR(HGT_MAX_FRAGMENTS_PER_CELL, int, 100, "Max. allowed number of fragments\nper cell (default=100).");
 	CONFIG_ADD_VAR(HGT_DIFFUSION_METHOD, int, 0, "Method to use for diffusion of genome\nfragments (0=none [default]).");
 	CONFIG_ADD_VAR(HGT_MUTATION_P, double, 0.0, "Probability that an HGT mutation will occur on divide (default=0.0).");
 	CONFIG_ADD_VAR(HGT_INSERTION_MUT_P, double, 0.5, "Probability that an HGT mutation will result in an insertion (default=0.5); replacement if false.");
-	
+
   CONFIG_ADD_GROUP(INST_RES_GROUP, "Resource-Dependent Instructions Settings");
   CONFIG_ADD_VAR(INST_RES, cString, "", "Resource upon which the execution of certain instruction depends");
   CONFIG_ADD_VAR(INST_RES_FLOOR, double, 0.0, "Assumed lower level of resource in environment.  Used for probability dist.");

Modified: branches/biounit/source/main/cOrganism.cc
===================================================================
--- branches/biounit/source/main/cOrganism.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cOrganism.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -423,6 +423,9 @@
   bool task_completed = m_phenotype.TestOutput(ctx, taskctx, globalAndDeme_resource_count, 
                                                m_phenotype.GetCurRBinsAvail(), globalAndDeme_res_change, 
                                                insts_triggered);
+											   
+  if(task_completed)
+	cout << "task done" << endl;
   
   // Handle merit increases that take the organism above it's current population merit
   if (m_world->GetConfig().MERIT_INC_APPLY_IMMEDIATE.Get()) {

Modified: branches/biounit/source/main/cPhenotype.cc
===================================================================
--- branches/biounit/source/main/cPhenotype.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cPhenotype.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -41,34 +41,34 @@
 
 
 cPhenotype::cPhenotype(cWorld* world, int parent_generation)
-  : m_world(world)
-  , initialized(false)
-  , cur_task_count(m_world->GetEnvironment().GetNumTasks())
-  , cur_internal_task_count(m_world->GetEnvironment().GetNumTasks())
-  , eff_task_count(m_world->GetEnvironment().GetNumTasks())
-  , cur_task_quality(m_world->GetEnvironment().GetNumTasks())  
-  , cur_task_value(m_world->GetEnvironment().GetNumTasks())  
-  , cur_internal_task_quality(m_world->GetEnvironment().GetNumTasks())
-  , cur_rbins_total(m_world->GetEnvironment().GetResourceLib().GetSize())
-  , cur_rbins_avail(m_world->GetEnvironment().GetResourceLib().GetSize())
-  , cur_collect_spec_counts(m_world->GetNumResourceSpecs())
-  , cur_reaction_count(m_world->GetEnvironment().GetReactionLib().GetSize())
-  , cur_reaction_add_reward(m_world->GetEnvironment().GetReactionLib().GetSize())
-  , cur_sense_count(m_world->GetStats().GetSenseSize())
-  , sensed_resources(m_world->GetEnvironment().GetResourceLib().GetSize())
-  , cur_task_time(m_world->GetEnvironment().GetNumTasks())   // Added for tracking time; WRE 03-18-07
-  , m_reaction_result(NULL)
-  , last_task_count(m_world->GetEnvironment().GetNumTasks())
-  , last_internal_task_count(m_world->GetEnvironment().GetNumTasks())
-  , last_task_quality(m_world->GetEnvironment().GetNumTasks())
-  , last_task_value(m_world->GetEnvironment().GetNumTasks())
-  , last_internal_task_quality(m_world->GetEnvironment().GetNumTasks())
-  , last_rbins_total(m_world->GetEnvironment().GetResourceLib().GetSize())
-  , last_rbins_avail(m_world->GetEnvironment().GetResourceLib().GetSize())
-  , last_collect_spec_counts()
-  , last_reaction_count(m_world->GetEnvironment().GetReactionLib().GetSize())
-  , last_reaction_add_reward(m_world->GetEnvironment().GetReactionLib().GetSize())  
-  , last_sense_count(m_world->GetStats().GetSenseSize())
+: m_world(world)
+, initialized(false)
+, cur_task_count(m_world->GetEnvironment().GetNumTasks())
+, cur_internal_task_count(m_world->GetEnvironment().GetNumTasks())
+, eff_task_count(m_world->GetEnvironment().GetNumTasks())
+, cur_task_quality(m_world->GetEnvironment().GetNumTasks())  
+, cur_task_value(m_world->GetEnvironment().GetNumTasks())  
+, cur_internal_task_quality(m_world->GetEnvironment().GetNumTasks())
+, cur_rbins_total(m_world->GetEnvironment().GetResourceLib().GetSize())
+, cur_rbins_avail(m_world->GetEnvironment().GetResourceLib().GetSize())
+, cur_collect_spec_counts(m_world->GetNumResourceSpecs())
+, cur_reaction_count(m_world->GetEnvironment().GetReactionLib().GetSize())
+, cur_reaction_add_reward(m_world->GetEnvironment().GetReactionLib().GetSize())
+, cur_sense_count(m_world->GetStats().GetSenseSize())
+, sensed_resources(m_world->GetEnvironment().GetResourceLib().GetSize())
+, cur_task_time(m_world->GetEnvironment().GetNumTasks())   // Added for tracking time; WRE 03-18-07
+, m_reaction_result(NULL)
+, last_task_count(m_world->GetEnvironment().GetNumTasks())
+, last_internal_task_count(m_world->GetEnvironment().GetNumTasks())
+, last_task_quality(m_world->GetEnvironment().GetNumTasks())
+, last_task_value(m_world->GetEnvironment().GetNumTasks())
+, last_internal_task_quality(m_world->GetEnvironment().GetNumTasks())
+, last_rbins_total(m_world->GetEnvironment().GetResourceLib().GetSize())
+, last_rbins_avail(m_world->GetEnvironment().GetResourceLib().GetSize())
+, last_collect_spec_counts()
+, last_reaction_count(m_world->GetEnvironment().GetReactionLib().GetSize())
+, last_reaction_add_reward(m_world->GetEnvironment().GetReactionLib().GetSize())  
+, last_sense_count(m_world->GetStats().GetSenseSize())
   , generation(0)
 {
   if (parent_generation >= 0) {
@@ -112,7 +112,7 @@
   copied_size              = in_phen.copied_size;          
   executed_size            = in_phen.executed_size;       
   gestation_time           = in_phen.gestation_time;       
-                  
+  
   gestation_start          = in_phen.gestation_start;     
   fitness                  = in_phen.fitness;           
   div_type                 = in_phen.div_type;          
@@ -138,7 +138,7 @@
   sensed_resources         = in_phen.sensed_resources;            
   cur_task_time            = in_phen.cur_task_time;   
   cur_child_germline_propensity = in_phen.cur_child_germline_propensity;
-
+  
   // Dynamically allocated m_task_states requires special handling
   tList<cTaskState*> hash_values;
   tList<void*>       hash_keys;
@@ -174,7 +174,7 @@
   total_energy_donated     = in_phen.total_energy_donated;
   total_energy_received    = in_phen.total_energy_received;
   total_energy_applied     = in_phen.total_energy_applied;
-
+  
   // 4. Records from this organisms life...
   num_divides              = in_phen.num_divides;      
   generation               = in_phen.generation;        
@@ -250,7 +250,7 @@
   total_energy_donated    = in_phen.total_energy_donated;
   total_energy_received   = in_phen.total_energy_received;
   total_energy_applied    = in_phen.total_energy_applied;
-
+  
   // 6. Child information...
   copy_true               = in_phen.copy_true;       
   divide_sex              = in_phen.divide_sex;       
@@ -259,10 +259,10 @@
   child_fertile           = in_phen.child_fertile;  
   last_child_fertile      = in_phen.last_child_fertile; 
   child_copied_size       = in_phen.child_copied_size;
-
+  
   // 7. Permanent information...
   permanent_germline_propensity = in_phen.permanent_germline_propensity;
-         
+  
   return *this;
 }
 
@@ -311,7 +311,7 @@
     executionRatio = 1.0;
   else 
     executionRatio = parent_phenotype.executionRatio;
-    
+  
   energy_store    = min(energy_store, m_world->GetConfig().ENERGY_CAP.Get());
   energy_tobe_applied = 0.0;
   energy_testament = 0.0;
@@ -325,12 +325,12 @@
   cpu_cycles_used = 0;
   fitness         = parent_phenotype.fitness;
   div_type        = parent_phenotype.div_type;
-
+  
   assert(genome_length > 0);
   assert(copied_size > 0);
   assert(gestation_time >= 0); //@JEB 0 valid for some fitness methods
   assert(div_type > 0);
-
+  
   // Initialize current values, as neeeded.
   cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_energy_bonus = 0.0;
@@ -346,7 +346,7 @@
   // parent's resources have already been halved in DivideReset;
   // offspring gets that value too.
   for (int i = 0; i < cur_rbins_avail.GetSize(); i++)
-        cur_rbins_avail[i] = parent_phenotype.cur_rbins_avail[i];
+    cur_rbins_avail[i] = parent_phenotype.cur_rbins_avail[i];
   cur_collect_spec_counts.SetAll(0);
   cur_reaction_count.SetAll(0);
   cur_reaction_add_reward.SetAll(0);
@@ -354,14 +354,14 @@
   cur_sense_count.SetAll(0);  
   cur_task_time.SetAll(0.0);  // Added for time tracking; WRE 03-18-07
   for (int j = 0; j < sensed_resources.GetSize(); j++)
-	      sensed_resources[j] =  parent_phenotype.sensed_resources[j];
+    sensed_resources[j] =  parent_phenotype.sensed_resources[j];
   cur_trial_fitnesses.Resize(0); 
   cur_trial_bonuses.Resize(0); 
   cur_trial_times_used.Resize(0); 
   trial_time_used = 0;
   trial_cpu_cycles_used = 0;
   cur_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // Copy last values from parent
   last_merit_base           = parent_phenotype.last_merit_base;
   last_bonus                = parent_phenotype.last_bonus;
@@ -382,7 +382,7 @@
   last_sense_count          = parent_phenotype.last_sense_count;
   last_fitness              = CalcFitness(last_merit_base, last_bonus, gestation_time, last_cpu_cycles_used);
   last_child_germline_propensity = parent_phenotype.last_child_germline_propensity;   // chance of child being a germline cell; @JEB
-
+  
   // Setup other miscellaneous values...
   num_divides     = 0;
   generation      = parent_phenotype.generation;
@@ -451,7 +451,7 @@
   parent_cross_num    = parent_phenotype.cross_num;
   to_die = false;
   to_delete = false;
-
+  
   is_energy_requestor = false;
   is_energy_donor = false;
   is_energy_receiver = false;
@@ -460,7 +460,7 @@
   total_energy_donated = 0.0;
   total_energy_received = 0.0; 
   total_energy_applied = 0.0;
-
+  
   // Setup child info...
   copy_true          = false;
   divide_sex         = false;
@@ -469,10 +469,10 @@
   last_child_fertile = is_fertile;
   child_fertile      = true;
   child_copied_size  = 0;
-
+  
   // permanently set germline propensity of org (since DivideReset is called first, it is now in the "last" slot...)
   permanent_germline_propensity  = parent_phenotype.last_child_germline_propensity;
-
+  
   initialized = true;
 }
 
@@ -502,7 +502,7 @@
   gestation_start = 0;
   fitness         = 0;
   div_type	  = 1;
-
+  
   // Initialize current values, as neeeded.
   cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cur_energy_bonus = 0.0;
@@ -529,7 +529,7 @@
   trial_time_used = 0;
   trial_cpu_cycles_used = 0;
   cur_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // New organism has no parent and so cannot use its last values; initialize as needed
   last_merit_base = genome_length;
   last_bonus      = 1;
@@ -549,7 +549,7 @@
   last_inst_count.SetAll(0);
   last_sense_count.SetAll(0);
   last_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // Setup other miscellaneous values...
   num_divides     = 0;
   generation      = 0;
@@ -561,7 +561,7 @@
   life_fitness    = 0;
   exec_time_born  = 0;
   birth_update     = m_world->GetStats().GetUpdate();
-
+  
   num_thresh_gb_donations = 0;
   num_thresh_gb_donations_last = 0;
   num_quanta_thresh_gb_donations = 0;
@@ -626,7 +626,7 @@
   total_energy_donated = 0.0;
   total_energy_received = 0.0;
   total_energy_applied = 0.0;
-
+  
   // Setup child info...
   copy_true         = false;
   divide_sex        = false;
@@ -635,9 +635,9 @@
   child_fertile     = true;
   last_child_fertile = true;
   child_copied_size = 0;
-
+  
   permanent_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   initialized = true;
 }
 
@@ -645,12 +645,12 @@
 /**
  * This function is run whenever an organism executes a successful divide.
  **/
- 
- void cPhenotype::DivideReset(const cGenome & _genome)
+
+void cPhenotype::DivideReset(const cGenome & _genome)
 {
   assert(time_used >= 0);
   assert(initialized == true);
-
+  
   // Update these values as needed...
   int cur_merit_base = CalcSizeMerit();
   
@@ -673,12 +673,12 @@
   gestation_time  = time_used - gestation_start;
   gestation_start = time_used;
   fitness = CalcFitness( cur_merit_base, cur_bonus, gestation_time, cpu_cycles_used); 
-
+  
   // Lock in cur values as last values.
   last_merit_base           = cur_merit_base;
   last_bonus                = cur_bonus;
   last_cpu_cycles_used      = cpu_cycles_used;
-//TODO?  last_energy         = cur_energy_bonus;
+  //TODO?  last_energy         = cur_energy_bonus;
   last_num_errors           = cur_num_errors;
   last_num_donates          = cur_num_donates;
   last_task_count           = cur_task_count;
@@ -694,7 +694,7 @@
   last_inst_count           = cur_inst_count;
   last_sense_count          = cur_sense_count;
   last_child_germline_propensity = cur_child_germline_propensity;
-
+  
   // Reset cur values.
   cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cpu_cycles_used = 0;
@@ -717,7 +717,7 @@
   cur_sense_count.SetAll(0);
   cur_task_time.SetAll(0.0);
   cur_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // Setup other miscellaneous values...
   num_divides++;
   (void) generation;
@@ -728,7 +728,7 @@
   life_fitness = fitness; 
   exec_time_born += gestation_time;  //@MRR Treating organism as sibling
   birth_update = m_world->GetStats().GetUpdate();   
-
+  
   num_thresh_gb_donations_last = num_thresh_gb_donations;
   num_thresh_gb_donations = 0;
   num_quanta_thresh_gb_donations_last = num_quanta_thresh_gb_donations;
@@ -782,7 +782,7 @@
   (void) parent_true;
   (void) parent_sex;
   (void) parent_cross_num;
-
+  
   // Reset child info...
   (void) copy_true;
   (void) divide_sex;
@@ -791,16 +791,16 @@
   last_child_fertile = child_fertile;
   child_fertile     = true;
   (void) child_copied_size;;
-
+  
   // A few final changes if the parent was supposed to be be considered
   // a second child on the divide.
-  if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) {
+  if ((m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) || (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_BIRTH)) {
     gestation_start = 0;
     cpu_cycles_used = 0;
     time_used = 0;
     neutral_metric += m_world->GetRandom().GetRandNormal();
   }
-
+  
   if (m_world->GetConfig().GENERATION_INC_METHOD.Get() == GENERATION_INC_BOTH) generation++;
   
   // Reset Task States
@@ -820,7 +820,7 @@
 {
   assert(time_used > 0);
   assert(initialized == true);
-
+  
   // Update these values as needed...
   int cur_merit_base = CalcSizeMerit();
   const int merit_default_bonus = m_world->GetConfig().MERIT_DEFAULT_BONUS.Get();
@@ -828,7 +828,7 @@
     cur_bonus = merit_default_bonus;
   }
   merit = cur_merit_base * cur_bonus;
-
+  
   genome_length   = _genome.GetSize();
   (void) copied_size;                            // Unchanged
   (void) executed_size;                          // Unchanged
@@ -836,7 +836,7 @@
   gestation_start = time_used;
   fitness         = CalcFitness(cur_merit_base, cur_bonus, gestation_time, cpu_cycles_used);
   (void) div_type; 				// Unchanged
-
+  
   // Lock in cur values as last values.
   last_merit_base           = cur_merit_base;
   last_bonus                = cur_bonus;
@@ -884,7 +884,7 @@
   trial_time_used = 0;
   trial_cpu_cycles_used = 0;
   cur_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // Setup other miscellaneous values...
   num_divides++;
   generation++;
@@ -895,7 +895,7 @@
   life_fitness = fitness; 
   exec_time_born += gestation_time;  //@MRR See DivideReset 
   birth_update  = m_world->GetStats().GetUpdate();
-
+  
   num_thresh_gb_donations_last = num_thresh_gb_donations;
   num_thresh_gb_donations = 0;
   num_quanta_thresh_gb_donations_last = num_quanta_thresh_gb_donations;
@@ -949,7 +949,7 @@
   (void) parent_true;
   (void) parent_sex;
   (void) parent_cross_num;
-
+  
   // Reset child info...
   (void) copy_true;
   (void) divide_sex;
@@ -979,12 +979,12 @@
   energy_tobe_applied = 0.0;
   energy_testament = 0.0;
   energy_received_buffer = 0.0;
-
+  
   if(m_world->GetConfig().INHERIT_EXE_RATE.Get() == 0)
     executionRatio = 1.0;
   else 
     executionRatio = clone_phenotype.executionRatio;
-
+  
   genome_length   = clone_phenotype.genome_length;
   copied_size     = clone_phenotype.copied_size;
   // copied_size     = clone_phenotype.child_copied_size;
@@ -993,12 +993,12 @@
   gestation_start = 0;
   fitness         = clone_phenotype.fitness;
   div_type        = clone_phenotype.div_type;
-
+  
   assert(genome_length > 0);
   assert(copied_size > 0);
   assert(gestation_time >= 0); //@JEB 0 valid for some fitness methods
   assert(div_type > 0);
-
+  
   // Initialize current values, as neeeded.
   cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cpu_cycles_used = 0;
@@ -1016,14 +1016,14 @@
   cur_sense_count.SetAll(0);  
   cur_task_time.SetAll(0.0);
   for (int j = 0; j < sensed_resources.GetSize(); j++)
-	      sensed_resources[j] =  clone_phenotype.sensed_resources[j];
+    sensed_resources[j] =  clone_phenotype.sensed_resources[j];
   cur_trial_fitnesses.Resize(0); 
   cur_trial_bonuses.Resize(0); 
   cur_trial_times_used.Resize(0); 
   trial_time_used = 0;
   trial_cpu_cycles_used = 0;
   cur_child_germline_propensity = m_world->GetConfig().DEMES_DEFAULT_GERMLINE_PROPENSITY.Get();
-
+  
   // Copy last values from parent
   last_merit_base          = clone_phenotype.last_merit_base;
   last_bonus               = clone_phenotype.last_bonus;
@@ -1041,7 +1041,7 @@
   last_sense_count         = clone_phenotype.last_sense_count;  
   last_fitness             = CalcFitness(last_merit_base, last_bonus, gestation_time, last_cpu_cycles_used);
   last_child_germline_propensity = clone_phenotype.last_child_germline_propensity;
-
+  
   // Setup other miscellaneous values...
   num_divides     = 0;
   generation      = clone_phenotype.generation;
@@ -1054,7 +1054,7 @@
   life_fitness    = fitness; 
   exec_time_born  = 0;
   birth_update    = m_world->GetStats().GetUpdate();
-
+  
   num_thresh_gb_donations_last = clone_phenotype.num_thresh_gb_donations_last;
   num_thresh_gb_donations  = clone_phenotype.num_thresh_gb_donations;
   num_quanta_thresh_gb_donations_last = clone_phenotype.num_quanta_thresh_gb_donations_last;
@@ -1116,7 +1116,7 @@
   is_energy_receiver = false;
   has_used_donated_energy = false;
   has_open_energy_request = false;
-
+  
   // Setup child info...
   copy_true          = false;
   divide_sex         = false;
@@ -1126,7 +1126,7 @@
   child_fertile      = true;
   child_copied_size  = 0;
   permanent_germline_propensity = clone_phenotype.permanent_germline_propensity;
-
+  
   initialized = true;
 }
 
@@ -1141,35 +1141,35 @@
 }
 
 bool cPhenotype::TestOutput(cAvidaContext& ctx, cTaskContext& taskctx,
-			    const tArray<double>& res_in, const tArray<double>& rbins_in, tArray<double>& res_change,
-			    tArray<int>& insts_triggered)
+                            const tArray<double>& res_in, const tArray<double>& rbins_in, tArray<double>& res_change,
+                            tArray<int>& insts_triggered)
 {
   assert(initialized == true);
   taskctx.SetTaskStates(&m_task_states);
-
+  
   const cEnvironment& env = m_world->GetEnvironment();
   const int num_resources = env.GetResourceLib().GetSize();
   const int num_tasks = env.GetNumTasks();
   const int num_reactions = env.GetReactionLib().GetSize();
-
+  
   // For refractory period @WRE 03-20-07
   const int cur_update_time = m_world->GetStats().GetUpdate();
   const double biomimetic_refractory_period = m_world->GetConfig().BIOMIMETIC_REFRACTORY_PERIOD.Get();
   double refract_factor;
-
+  
   if (!m_reaction_result) m_reaction_result = new cReactionResult(num_resources, num_tasks, num_reactions);
   cReactionResult& result = *m_reaction_result;
   
   // Run everything through the environment.
   bool found = env.TestOutput(ctx, result, taskctx, eff_task_count, cur_reaction_count, res_in, rbins_in); //NEED different eff_task_count and cur_reaction_count for deme resource
-
+  
   // If nothing was found, stop here.
   if (found == false) {
     result.Invalidate();
     res_change.SetAll(0.0);
     return false;  // Nothing happened.
   }
-
+  
   // Update the phenotype with the results...
   // Start with updating task and reaction counters
   for (int i = 0; i < num_tasks; i++) {
@@ -1189,7 +1189,7 @@
       //cerr << "eff: " << eff_task_count[i] << endl;
       if(result.UsedEnvResource() == false) { cur_internal_task_count[i]++; }
     }
-
+    
     if (result.TaskQuality(i) > 0) 
     {
     	cur_task_quality[i] += result.TaskQuality(i) * refract_factor;
@@ -1214,14 +1214,14 @@
 		  m_world->GetStats().AddOtherTaskCounts(i, prev_num_tasks, cur_num_tasks);
 	  }
   }
-
+  
   for (int i = 0; i < num_reactions; i++) {
-//    if (result.ReactionTriggered(i) == true) cur_reaction_count[i]++;  // moved into cEnvironment::TestOutput to allow reaction requisites to be satisified at the time a reaction is completed
+    //    if (result.ReactionTriggered(i) == true) cur_reaction_count[i]++;  // moved into cEnvironment::TestOutput to allow reaction requisites to be satisified at the time a reaction is completed
     cur_reaction_add_reward[i] += result.GetReactionAddBonus(i);
-	if (result.ReactionTriggered(i) && last_reaction_count[i]==0) 
-		m_world->GetStats().AddNewReactionCount(i); 
+    if (result.ReactionTriggered(i) && last_reaction_count[i]==0) 
+      m_world->GetStats().AddNewReactionCount(i); 
   }
-
+  
   // Update the merit bonus
   cur_bonus *= result.GetMultBonus();
   cur_bonus += result.GetAddBonus();
@@ -1234,7 +1234,7 @@
   // no deme object.  Don't touch deme merit if there is no deme frac component.
   cDeme* deme = taskctx.GetOrganism()->GetDeme();
   if (deme) {
-  
+    
     if (result.GetActiveDeme()) {
       double deme_bonus = deme->GetHeritableDemeMerit().GetDouble();
       deme_bonus *= result.GetMultDemeBonus();
@@ -1250,7 +1250,7 @@
       if (result.ReactionTriggered(i) == true) deme->AddCurReaction(i);
     }
   }
-    
+  
   // Update the energy bonus
   cur_energy_bonus += result.GetAddEnergy();
   
@@ -1258,7 +1258,7 @@
   for (int i = 0; i < res_in.GetSize(); i++) {
     res_change[i] = result.GetProduced(i) - result.GetConsumed(i);
   }
-
+  
   // Update rbins as necessary
   if(result.UsedEnvResource() == false)
   {
@@ -1270,18 +1270,18 @@
   		if(rbin_diff > 0) { cur_rbins_total[i] += rbin_diff; }
   	}
   }
-
+  
   // Save the instructions that should be triggered...
   insts_triggered = result.GetInstArray();
-
+  
   //Put in detected resources
   for (int j = 0; j < res_in.GetSize(); j++)
 	  if(result.GetDetected(j) != -1.0)
-	      sensed_resources[j] = result.GetDetected(j);
-
+      sensed_resources[j] = result.GetDetected(j);
+  
   //Kill any cells that did lethal reactions
   to_die = result.GetLethal();
-
+  
   // Sterilize organisms that have performed a sterilizing task.
   if(result.GetSterilize()) {
     is_fertile = false;
@@ -1291,13 +1291,17 @@
   return true;
 }
 
+void cPhenotype::Sterilize()
+{
+  is_fertile = false;
+}
 void cPhenotype::PrintStatus(ostream& fp) const
 {
   fp << "  MeritBase:"
-     << CalcSizeMerit()
-     << " Bonus:" << cur_bonus
-     << " Errors:" << cur_num_errors
-     << " Donates:" << cur_num_donates;
+  << CalcSizeMerit()
+  << " Bonus:" << cur_bonus
+  << " Errors:" << cur_num_errors
+  << " Donates:" << cur_num_donates;
   fp << endl;
   
   fp << "  Task Count (Quality):";
@@ -1326,48 +1330,48 @@
 {
   assert(genome_length > 0);
   assert(copied_size > 0);
-
+  
   int out_size;
-
+  
   switch (m_world->GetConfig().BASE_MERIT_METHOD.Get()) {
-  case BASE_MERIT_COPIED_SIZE:
-    out_size = copied_size;
-    break;
-  case BASE_MERIT_EXE_SIZE:
-    out_size = executed_size;
-    break;
-  case BASE_MERIT_FULL_SIZE:
-    out_size = genome_length;
-    break;
-  case BASE_MERIT_LEAST_SIZE:
-    out_size = genome_length;
-    if (out_size > copied_size) out_size = copied_size;
-    if (out_size > executed_size)    out_size = executed_size;
-    break;
-  case BASE_MERIT_SQRT_LEAST_SIZE:
-    out_size = genome_length;
-    if (out_size > copied_size) out_size = copied_size;
-    if (out_size > executed_size)    out_size = executed_size;
-    out_size = (int) sqrt((double) out_size);
-    break;
-  case BASE_MERIT_NUM_BONUS_INST:
-    if(m_world->GetConfig().FITNESS_VALLEY.Get()){
-      if (bonus_instruction_count >= m_world->GetConfig().FITNESS_VALLEY_START.Get() && 
-          bonus_instruction_count <= m_world->GetConfig().FITNESS_VALLEY_STOP.Get()){
-         out_size = 1;
-         break;
-      }            
-    }
-    if (m_world->GetConfig().MERIT_BONUS_EFFECT.Get()>0) {out_size = 1 + bonus_instruction_count;}
-    else if (m_world->GetConfig().MERIT_BONUS_EFFECT.Get()<0) {out_size = genome_length - (bonus_instruction_count -1);}
-    else {out_size = 1;}  //the extra 1 point in all these case is so the orgs are not jilted by the scheduler        
-    break;
-  case BASE_MERIT_CONST:
-  default:
-    out_size = m_world->GetConfig().BASE_CONST_MERIT.Get();
-    break;
+    case BASE_MERIT_COPIED_SIZE:
+      out_size = copied_size;
+      break;
+    case BASE_MERIT_EXE_SIZE:
+      out_size = executed_size;
+      break;
+    case BASE_MERIT_FULL_SIZE:
+      out_size = genome_length;
+      break;
+    case BASE_MERIT_LEAST_SIZE:
+      out_size = genome_length;
+      if (out_size > copied_size) out_size = copied_size;
+      if (out_size > executed_size)    out_size = executed_size;
+      break;
+    case BASE_MERIT_SQRT_LEAST_SIZE:
+      out_size = genome_length;
+      if (out_size > copied_size) out_size = copied_size;
+      if (out_size > executed_size)    out_size = executed_size;
+      out_size = (int) sqrt((double) out_size);
+      break;
+    case BASE_MERIT_NUM_BONUS_INST:
+      if(m_world->GetConfig().FITNESS_VALLEY.Get()){
+        if (bonus_instruction_count >= m_world->GetConfig().FITNESS_VALLEY_START.Get() && 
+            bonus_instruction_count <= m_world->GetConfig().FITNESS_VALLEY_STOP.Get()){
+          out_size = 1;
+          break;
+        }            
+      }
+      if (m_world->GetConfig().MERIT_BONUS_EFFECT.Get()>0) {out_size = 1 + bonus_instruction_count;}
+      else if (m_world->GetConfig().MERIT_BONUS_EFFECT.Get()<0) {out_size = genome_length - (bonus_instruction_count -1);}
+      else {out_size = 1;}  //the extra 1 point in all these case is so the orgs are not jilted by the scheduler        
+      break;
+    case BASE_MERIT_CONST:
+    default:
+      out_size = m_world->GetConfig().BASE_CONST_MERIT.Get();
+      break;
   }
-
+  
   return out_size;
 } 
 
@@ -1388,10 +1392,10 @@
   switch (m_world->GetConfig().FITNESS_METHOD.Get())
   {
     case 0: // Normal
-    assert(_gestation_time > 0);
-    out_fitness = _merit_base * _bonus / _gestation_time;
-    break;
-
+      assert(_gestation_time > 0);
+      out_fitness = _merit_base * _bonus / _gestation_time;
+      break;
+      
     case 1: // Sigmoidal returns (should be used with an additive reward)
     {
       assert(_gestation_time > 0);
@@ -1400,19 +1404,19 @@
       double converted_bonus = (_bonus - m_world->GetConfig().DEFAULT_BONUS.Get()) * m_world->GetConfig().FITNESS_COEFF_2.Get() / (1 + _bonus * m_world->GetConfig().FITNESS_COEFF_2.Get() ) ;
       out_fitness = _merit_base * exp(converted_bonus * log(m_world->GetConfig().FITNESS_COEFF_1.Get())) / _gestation_time;
     }
-    break;
-    
+      break;
+      
     case 2: //Activity of one enzyme in pathway altered (with diminishing returns and a cost for each executed instruction)
     {
       out_fitness = 0;
       double net_bonus = _bonus +  - m_world->GetConfig().DEFAULT_BONUS.Get();
       out_fitness = net_bonus / (net_bonus + 1)* exp (_gestation_time * log(1 - m_world->GetConfig().FITNESS_COEFF_1.Get())); 
     }
-    break;
-     
+      break;
+      
     default:
-    cout << "Unknown FITNESS_METHOD!" << endl;
-    exit(1);
+      cout << "Unknown FITNESS_METHOD!" << endl;
+      exit(1);
   }
   
   return out_fitness;
@@ -1440,7 +1444,7 @@
 
 
 /**
-Credit organism with energy reward, but only update energy store if APPLY_ENERGY_METHOD = "on task completion" (1)
+ Credit organism with energy reward, but only update energy store if APPLY_ENERGY_METHOD = "on task completion" (1)
  */
 void cPhenotype::RefreshEnergy() {
   if(cur_energy_bonus > 0) {
@@ -1476,7 +1480,7 @@
 
 void cPhenotype::ApplyDonatedEnergy() {
   double energy_cap = m_world->GetConfig().ENERGY_CAP.Get();
-
+  
   if((energy_store + energy_received_buffer) >= energy_cap) {
     IncreaseEnergyApplied(energy_cap - energy_store);
     SetEnergy(energy_store + (energy_cap - energy_received_buffer));
@@ -1524,7 +1528,7 @@
   assert(GetStoredEnergy()>0.0);
   // adjust energy in parent
   ReduceEnergy(child_energy - 2*energy_given_at_birth); // 2*energy_given_at_birth: 1 in child_energy & 1 for parent
-    
+  
   //TODO: add energy_given_at_birth to Stored_energy
   cMerit parentMerit(ConvertEnergyToMerit(GetStoredEnergy() * GetEnergyUsageRatio()));
 	if(parentMerit.GetDouble() > 0.0)
@@ -1547,7 +1551,7 @@
   cur_trial_fitnesses.Push(fitness);
   cur_trial_bonuses.Push(GetCurBonus());
   cur_trial_times_used.Push(trial_time_used);
-
+  
   //The rest of the function, resets the phenotype like DivideReset(), but without
   //incrementing the generation or child statistics.
   
@@ -1571,21 +1575,21 @@
   energy_store += cur_energy_bonus;
   energy_store = m_world->GetConfig().ENERGY_GIVEN_AT_BIRTH.Get(); // We reset to what they had at birth
   cur_energy_bonus = 0;
-      // to be perfectly accurate, this should be from a last_energy value??
-
+  // to be perfectly accurate, this should be from a last_energy value??
   
- // genome_length   = _genome.GetSize();  //No child! @JEB
+  
+  // genome_length   = _genome.GetSize();  //No child! @JEB
   (void) copied_size;          // Unchanged
   (void) executed_size;        // Unchanged
   gestation_time  = time_used - gestation_start;  //Keep gestation referring to actual replication time! @JEB
   gestation_start = time_used;                    //Keep gestation referring to actual replication time! @JEB
- // fitness         = merit.GetDouble() / gestation_time; //Use fitness measure that is per-trial @JEB
-
+  // fitness         = merit.GetDouble() / gestation_time; //Use fitness measure that is per-trial @JEB
+  
   // Lock in cur values as last values.
   last_merit_base           = cur_merit_base;
   last_bonus                = cur_bonus;
   last_cpu_cycles_used      = cpu_cycles_used;
-//TODO?  last_energy         = cur_energy_bonus;
+  //TODO?  last_energy         = cur_energy_bonus;
   last_num_errors           = cur_num_errors;
   last_num_donates          = cur_num_donates;
   last_task_count           = cur_task_count;
@@ -1600,7 +1604,7 @@
   last_reaction_add_reward  = cur_reaction_add_reward;
   last_inst_count           = cur_inst_count;
   last_sense_count          = cur_sense_count;
-
+  
   // Reset cur values.
   cur_bonus       = m_world->GetConfig().DEFAULT_BONUS.Get();
   cpu_cycles_used = 0;
@@ -1623,7 +1627,7 @@
   //cur_trial_fitnesses.Resize(0); Don't throw out the trial fitnesses! @JEB
   trial_time_used = 0;
   trial_cpu_cycles_used = 0;
-
+  
   // Setup other miscellaneous values...
   num_divides++;
   (void) generation;
@@ -1633,7 +1637,7 @@
   (void) neutral_metric;
   life_fitness = fitness; 
   
-
+  
   num_thresh_gb_donations_last = num_thresh_gb_donations;
   num_thresh_gb_donations = 0;
   num_quanta_thresh_gb_donations_last = num_quanta_thresh_gb_donations;
@@ -1696,11 +1700,11 @@
  * This function is run to reset an organism whose task counts (etc) have already been moved from cur to last
  * by another call (like NewTrial). It is a subset of DivideReset @JEB
  **/
- 
+
 void cPhenotype::TrialDivideReset(const cGenome & _genome)
 {
   int cur_merit_base = CalcSizeMerit();
-
+  
   // If we are resetting the current merit, do it here
   // and it will also be propagated to the child
   const int merit_default_bonus = m_world->GetConfig().MERIT_DEFAULT_BONUS.Get();
@@ -1708,17 +1712,17 @@
     cur_bonus = merit_default_bonus;
   }
   merit = cur_merit_base * cur_bonus;
-
+  
   SetEnergy(energy_store + cur_energy_bonus);
   m_world->GetStats().SumEnergyTestamentAcceptedByOrganisms().Add(energy_testament);
   energy_testament = 0.0;
-    
+  
   genome_length   = _genome.GetSize();
   gestation_start = time_used;
   cur_trial_fitnesses.Resize(0); 
   cur_trial_bonuses.Resize(0); 
   cur_trial_times_used.Resize(0); 
-
+  
   // Reset child info...
   (void) copy_true;
   (void) divide_sex;
@@ -1727,16 +1731,16 @@
   last_child_fertile = child_fertile;
   child_fertile     = true;
   (void) child_copied_size;
-
+  
   // A few final changes if the parent was supposed to be be considered
   // a second child on the divide.
-  if (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) {    
+  if ((m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_SPLIT) || (m_world->GetConfig().DIVIDE_METHOD.Get() == DIVIDE_METHOD_BIRTH)) {    
     gestation_start = 0;
     cpu_cycles_used = 0;
     time_used = 0;
     neutral_metric += m_world->GetRandom().GetRandNormal();
   }
-
+  
   if (m_world->GetConfig().GENERATION_INC_METHOD.Get() == GENERATION_INC_BOTH) generation++;
 }
 

Modified: branches/biounit/source/main/cPhenotype.h
===================================================================
--- branches/biounit/source/main/cPhenotype.h	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cPhenotype.h	2009-12-16 16:01:42 UTC (rev 3559)
@@ -276,6 +276,7 @@
 	
   bool OK();
 
+  void Sterilize();
   // Run when being setup *as* and offspring.
   void SetupOffspring(const cPhenotype & parent_phenotype, const cGenome & _genome);
 

Modified: branches/biounit/source/main/cPopulation.cc
===================================================================
--- branches/biounit/source/main/cPopulation.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cPopulation.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -122,7 +122,7 @@
       case nGeometry::PARTIAL: { cout << "Geometry: Partial" << endl; break; }
 			case nGeometry::RANDOM_CONNECTED: { cout << "Geometry: Random connected" << endl; break; }
       case nGeometry::SCALE_FREE: { cout << "Geometry: Scale-free" << endl; break; }
-
+        
       default:
         cout << "Unknown geometry!" << endl;
         assert(false);
@@ -221,10 +221,10 @@
 				break;
 			case nGeometry::SCALE_FREE:
 				build_scale_free(&cell_array.begin()[i], &cell_array.begin()[i+deme_size],
-													world->GetConfig().SCALE_FREE_M.Get(),
-													world->GetConfig().SCALE_FREE_ALPHA.Get(),
-													world->GetConfig().SCALE_FREE_ZERO_APPEAL.Get(),
-													m_world->GetRandom());
+                         world->GetConfig().SCALE_FREE_M.Get(),
+                         world->GetConfig().SCALE_FREE_ALPHA.Get(),
+                         world->GetConfig().SCALE_FREE_ZERO_APPEAL.Get(),
+                         m_world->GetRandom());
 				break;
       default:
         assert(false);
@@ -537,21 +537,103 @@
   assert(parent_id >= 0 && parent_id < cell_array.GetSize());
   cPopulationCell& parent_cell = cell_array[ parent_id ];
   
-  int num_neighbors = parent.GetNeighborhoodSize();
-  cOrganism* target_organism = 
-  parent_cell.ConnectionList().GetPos(m_world->GetRandom().GetUInt(num_neighbors))->GetOrganism();
+  cOrganism* target_organism = NULL;
   
+  if (m_world->GetConfig().BIRTH_METHOD.Get() ==  POSITION_OFFSPRING_FULL_SOUP_RANDOM)
+  {
+	target_organism = GetCell(m_world->GetRandom().GetUInt(cell_array.GetSize())).GetOrganism();
+  }
+  else
+  { 
+	target_organism = 
+		parent_cell.ConnectionList().GetPos(m_world->GetRandom().GetUInt(parent.GetNeighborhoodSize()))->GetOrganism();
+  }
+	      
   if (target_organism == NULL) return false;
   
   cHardwareBase& child_cpu = target_organism->GetHardware();
   
   if (child_cpu.GetNumThreads() == m_world->GetConfig().MAX_CPU_THREADS.Get()) return false;
   
+  tArray<int> task_counts = target_organism->GetPhenotype().GetCurTaskCount();
   
+  int random_int = m_world->GetRandom().GetUInt(100);
+  
+  if (m_world->GetConfig().INJECT_PROB_FROM_TASKS.Get())
+  {
+    
+    int last_task_count = target_organism->GetPhenotype().GetLastTaskCount()[0];
+    int total_count;
+    int task_count = last_task_count;
+    
+    if (task_count < task_counts[0])
+    {  
+      task_count = task_counts[0];
+    }
+    
+    total_count = task_count;
+        
+    if (total_count > 0)
+    {
+      if (m_world->GetConfig().INJECT_PROB_SIGMOID.Get())
+      {
+        switch (total_count) {
+          case 1:
+            if(random_int > 10)
+              return false;
+            break;
+          case  2:
+            if(random_int > 30)
+              return false;
+            break;
+          case 3:
+            if(random_int > 50)
+              return false;
+            break;
+          case 4:
+            if(random_int > 70)
+              return false;
+            break;
+          case 5:
+            if (random_int > 75)
+              return false;
+            break;
+          case 6:
+            if (random_int > 80)
+              return false;
+            break;
+          case  7:
+            if(random_int > 85)
+              return false;
+            break;
+          case 8:
+            if(random_int > 90)
+              return false;
+            break;
+          case 9:
+            if(random_int > 95)
+              return false;
+            break;
+          case 10:
+            break;
+        }
+      }
+      else
+      {
+        if (random_int > (total_count * 10))
+          return false;
+      }
+    }
+    
+    else
+      return false;
+    
+  }
+  
   if (target_organism->InjectHost(label, injected_code)) {
     cInjectGenotype* child_genotype = parent_genotype;
     
-    // If the parent genotype is not correct for the child, adjust it.
+	// If the parent genotype is not correct for the child, adjust it.
     if (parent_genotype == NULL || parent_genotype->GetGenome() != injected_code) {
       child_genotype = m_world->GetClassificationManager().GetInjectGenotype(injected_code, parent_genotype);
     }
@@ -560,6 +642,10 @@
     child_genotype->AddParasite();
     child_cpu.ThreadSetOwner(child_genotype);
     m_world->GetClassificationManager().AdjustInjectGenotype(*child_genotype);
+	
+	if(m_world->GetConfig().INJECT_STERILIZES_HOST.Get())
+		target_organism->GetPhenotype().Sterilize();
+	
   }
   else
     return false;
@@ -1338,7 +1424,7 @@
 			
 			// better have more than deme tournament size, otherwise something is *really* screwed up:
 			if(m_world->GetConfig().DEMES_TOURNAMENT_SIZE.Get() > static_cast<int>(deme_ids.size())) {
-				 m_world->GetDriver().RaiseFatalException(-1, "The number of demes that can participate in a tournament is less than the deme tournament size.");
+        m_world->GetDriver().RaiseFatalException(-1, "The number of demes that can participate in a tournament is less than the deme tournament size.");
 			}
 			
 			// Run the tournaments.
@@ -4830,7 +4916,7 @@
     /* depth */       cur_line.PopWord();
     cString name = cStringUtil::Stringf("org-%d", tmp.id_num);
     cGenome genome(cur_line.PopWord());
-        
+    
     // Process resident cell ids
     cString cellstr(cur_line.PopWord());
     while (cellstr.GetSize()) tmp.cells.Push(cellstr.Pop(',').AsInt());

Modified: branches/biounit/source/main/cPopulationInterface.cc
===================================================================
--- branches/biounit/source/main/cPopulationInterface.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cPopulationInterface.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -651,6 +651,10 @@
 			HGTTrimmedFragmentSelection(ctx, offspring, cell.GetFragments(), selected, location);
 			break;
 		}
+		case 2: { // random selection and random placement
+			HGTRandomFragmentPlacement(ctx, offspring, cell.GetFragments(), selected, location);
+			break;
+		}
 		default: { // error
 			m_world->GetDriver().RaiseFatalException(1, "HGT_FRAGMENT_SELECTION is set to an invalid value.");
 			break;
@@ -682,7 +686,7 @@
 																											substring_match& location) {
 	// randomly select the genome fragment for HGT:
 	selected=fragments.begin();
-	std::advance(selected, ctx.GetRandom().GetInt(fragments.size()));
+	std::advance(selected, ctx.GetRandom().GetUInt(fragments.size()));
 
 	// find the location within the offspring's genome that best matches the selected fragment:
 	location = cGenomeUtil::FindUnbiasedCircularMatch(ctx, offspring, *selected);
@@ -703,7 +707,7 @@
 																											 substring_match& location) {
 	// randomly select the genome fragment for HGT:
 	selected=fragments.begin();
-	std::advance(selected, ctx.GetRandom().GetInt(fragments.size()));
+	std::advance(selected, ctx.GetRandom().GetUInt(fragments.size()));
 	
 	// copy the selected fragment, trimming redundant instructions at the end:
 	cGenome trimmed(*selected);
@@ -714,3 +718,26 @@
 	// find the location within the offspring's genome that best matches the selected fragment:
 	location = cGenomeUtil::FindUnbiasedCircularMatch(ctx, offspring, trimmed);
 }
+
+
+/*! Random selection of the fragment used for HGT mutation, located at a random position.
+ 
+ Here we select a random fragment and a random location for that fragment within the offspring.
+ The beginning of the fragment location is selected at random, while the end is selected a
+ random distance (up to the length of the selected fragment * 2) instructions away.
+ */
+void cPopulationInterface::HGTRandomFragmentPlacement(cAvidaContext& ctx, const cGenome& offspring,
+																fragment_list_type& fragments, fragment_list_type::iterator& selected,
+																substring_match& location) {
+	// randomly select the genome fragment for HGT:
+	selected=fragments.begin();
+	std::advance(selected, ctx.GetRandom().GetUInt(fragments.size()));
+
+	// select a random location within the offspring's genome for this fragment to be
+	// inserted:
+	location.begin = ctx.GetRandom().GetUInt(offspring.GetSize());
+	location.end = location.begin + ctx.GetRandom().GetUInt(selected->GetSize()*2);
+	location.size = offspring.GetSize();
+	location.resize(offspring.GetSize());
+}
+

Modified: branches/biounit/source/main/cPopulationInterface.h
===================================================================
--- branches/biounit/source/main/cPopulationInterface.h	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/main/cPopulationInterface.h	2009-12-16 16:01:42 UTC (rev 3559)
@@ -148,8 +148,9 @@
 	typedef cGenomeUtil::substring_match substring_match;
 	//! Perform an HGT mutation on this offspring.
 	void DoHGTMutation(cAvidaContext& ctx, cGenome& offspring);
+
 protected:
-	//! Random selection of the fragment used for HGT mutation.
+	//! Random selection of the fragment used for HGT mutation, located at the best match.
 	void HGTRandomFragmentSelection(cAvidaContext& ctx, const cGenome& offspring,
 																	fragment_list_type& fragments, fragment_list_type::iterator& selected,
 																	substring_match& location);
@@ -157,6 +158,10 @@
 	void HGTTrimmedFragmentSelection(cAvidaContext& ctx, const cGenome& offspring,
 																	 fragment_list_type& fragments, fragment_list_type::iterator& selected,
 																	 substring_match& location);	
+	//! Random selection of the fragment used for HGT mutation, located at a random position.
+	void HGTRandomFragmentPlacement(cAvidaContext& ctx, const cGenome& offspring,
+																	fragment_list_type& fragments, fragment_list_type::iterator& selected,
+																	substring_match& location);	
 };
 
 

Modified: branches/biounit/source/targets/avida-viewer/cSymbolUtil.cc
===================================================================
--- branches/biounit/source/targets/avida-viewer/cSymbolUtil.cc	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/source/targets/avida-viewer/cSymbolUtil.cc	2009-12-16 16:01:42 UTC (rev 3559)
@@ -29,7 +29,7 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   cSpecies * cur_species = organism.GetGenotype()->GetSpecies();
   if (cur_species == NULL) return '.';    // no species
   return cur_species->GetSymbol();        // symbol!
@@ -39,13 +39,13 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   const bool modifier = organism.GetPhenotype().IsModifier();
   const bool modified = organism.GetPhenotype().IsModified();
-
+  
   // 'I' = Injector     'H' = Host (Injected into)
   // 'B' = Both         '-' = Neither
-
+  
   if (modifier == true && modified == true)  return 'B';
   if (modifier == true) return 'I'-6;
   if (modified == true) return 'H'-6;
@@ -63,14 +63,14 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   const int age = organism.GetPhenotype().GetAge();
   if (age < 0) return '-';
   if (age < 10) return (char) ('0' + age);
   if (age < 20) return 'X';
   if (age < 80) return 'L';
   if (age < 200) return 'C';
-
+  
   return '+';
 }
 
@@ -78,7 +78,7 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   if (organism.GetPhenotype().ParentTrue() == true) return '*';
   return '-';
 }
@@ -87,8 +87,8 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
-  if (organism.GetNumParasites()) return '*';
+  
+  if (organism.GetNumParasites()) return 'A';
   return '-';
 }
 
@@ -96,7 +96,7 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   if (organism.GetPhenotype().IsMutated() == true) return '*';
   return '-';
 }
@@ -111,7 +111,7 @@
 {
   if (cell.IsOccupied() == false) return ' ';
   const cOrganism & organism = *(cell.GetOrganism());
-
+  
   return 'A' + (organism.GetLineageLabel() % 12);
 }
 

Copied: branches/biounit/support/config/misc/Parasites (from rev 3558, branches/parasites/support/config/misc/Parasites)


Property changes on: branches/biounit/support/config/misc/Parasites
___________________________________________________________________
Name: svn:ignore
   + avida.cfg
default-smt.org
dominant-org.org
environment.cfg
events.cfg
instset-smt.cfg
parasite-smt.org


Deleted: branches/biounit/support/config/misc/Parasites/avida.cfg
===================================================================
--- branches/parasites/support/config/misc/Parasites/avida.cfg	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/avida.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,543 +0,0 @@
-#############################################################################
-# This file includes all the basic run-time defines for Avida.
-# For more information, see doc/config.html
-#############################################################################
-
-VERSION_ID 2.9.0   # Do not change this value.
-
-INJECT_PROB_FROM_TASKS 1
-INJECT_PROB_SIGMOID 1
-### GENERAL_GROUP ###
-# General Settings
-ANALYZE_MODE 0  # 0 = Disabled
-                # 1 = Enabled
-                # 2 = Interactive
-VIEW_MODE 1     # Initial viewer screen
-PAUSE_VIEWER_ON_START 0	#Pause the viewer on load 
-MERIT_INC_APPLY_IMMEDIATE 1
-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
-
-### ARCH_GROUP ###
-# Architecture Variables
-WORLD_X 60              # Width of the Avida world
-WORLD_Y 60              # Height of the Avida world
-WORLD_Z 1               # Depth of the Avida world
-WORLD_GEOMETRY 3       # 1 = Bounded Grid
-                        # 2 = Torus
-                        # 3 = Clique
-                        # 4 = Hexagonal grid
-                        # 5 = Lattice
-RANDOM_SEED 0           # Random number seed (0 for based on time)
-HARDWARE_TYPE 2         # 0 = Original CPUs
-                        # 1 = New SMT CPUs
-                        # 2 = Transitional SMT
-                        # 3 = Experimental CPU
-                        # 4 = Gene Expression CPU
-SPECULATIVE 1           # Enable speculative execution
-TRACE_EXECUTION 0       # Trace the execution of all organisms in the population (default=off,SLOW!)
-BCAST_HOPS 1            # Number of hops to broadcast an alarm
-ALARM_SELF 0            # Does sending an alarm move sender IP to alarm label?
-                        # 0=no
-                        # 1=yes
-IO_EXPIRE 1             # Is the expiration functionality of '-expire' I/O instructions enabled?
-INSTRUCTION_CONSTANT 3  # The Constant to add when the add-const instruction is called
-
-### CONFIG_FILE_GROUP ###
-# Configuration Files
-DATA_DIR data                       # Directory in which config files are found
-INST_SET instset-smt.cfg                          # 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
-START_CREATURE dominant-org.org  # Organism to seed the soup
-
-### DEME_GROUP ###
-# Demes and Germlines
-NUM_DEMES 1                             # Number of independent groups in the
-                                        # population (default=1).
-DEMES_USE_GERMLINE 0                    # Whether demes use a distinct germline (default=0).
-DEMES_PREVENT_STERILE 0                 # Whether to prevent sterile demes from
-                                        # replicating (default=0 or no).
-DEMES_RESET_RESOURCES 0                 # Reset resources in demes on replication. 
-                                        # 0 = reset both demes 
-                                        # 1 = reset target deme 
-                                        # 2 = deme resources remain unchanged
-DEMES_REPLICATE_SIZE 1                  # Number of identical organisms to create or copy from the
-                                        # source deme to the target deme (default=1).
-LOG_DEMES_REPLICATE 0                   # Log deme replications.  0/1 (off/on)
-DEMES_REPLICATE_LOG_START 0             # Update at which to start logging deme replications
-DEMES_PROB_ORG_TRANSFER 0.0             # Probablity of an organism being transferred from the
-                                        # source deme to the target deme (default=0.0).
-DEMES_ORGANISM_SELECTION 0              # How organisms are selected for transfer from
-                                        # source to target during deme replication.
-                                        # 0=random with replacement (default).
-                                        # 1=sequential.
-DEMES_ORGANISM_PLACEMENT 0              # How organisms are placed during deme replication.
-                                        # 0=cell-array middle (default).
-                                        # 1=deme center.
-                                        # 2=random placement.
-                                        # 3=sequential.
-DEMES_ORGANISM_FACING 0                 # How organisms are facing during deme replication.
-                                        # 0=unchanged (default).
-                                        # 1=northwest.
-                                        # 2=random.
-DEMES_MAX_AGE 500                       # The maximum age of a deme (in updates) to be
-                                        # used for age-based replication (default=500).
-DEMES_MAX_BIRTHS 100                    # The maximum number of births that can occur
-                                        # within a deme; used with birth-count
-                                        # replication (default=100).
-DEMES_MIM_EVENTS_KILLED_RATIO 0.7       # Minimum ratio of events killed required for event period to be a success.
-DEMES_MIM_SUCCESSFUL_EVENT_PERIODS 1    # Minimum number of consecutive event periods that must be a success.
-GERMLINE_COPY_MUT 0.0075                # Prob. of copy mutations occuring during
-                                        # germline replication (default=0.0075).
-GERMLINE_INS_MUT 0.05                   # Prob. of an insertion mutation occuring
-                                        # during germline replication (default=0.05).
-GERMLINE_DEL_MUT 0.05                   # Prob. of a deletion mutation occuring
-                                        # during germline replication (default=0.05).
-DEMES_REPLICATE_CPU_CYCLES 0.0          # Replicate a deme immediately after it has used
-                                        # this number of cpu cycles, normalized
-                                        # by number of orgs in deme (0 = OFF).
-DEMES_REPLICATE_TIME 0.0                # Replicate a deme immediately after it has used
-                                        # this number of cpu cycles, normalized
-                                        # by number of orgs in deme and organism merit (0 = OFF).
-DEMES_REPLICATE_BIRTHS 0                # Replicate a deme immediately after it has 
-                                        # produced this many offspring (0 = OFF).
-DEMES_REPLICATE_ORGS 0                  # Replicate a deme immediately once it reaches a
-                                        # certain number of organisms (0 = OFF).
-DEMES_REPLICATION_ONLY_RESETS 0         # Kin selection mode. Deme replication really:
-                                        # 1=resets deme resources
-                                        # 2=rests deme resources and re-injects organisms
-DEMES_MIGRATION_RATE 0.0                # Probability of an offspring being born in a different deme.
-DEMES_MIGRATION_METHOD 0                # How do we choose what demes an org may land in when it migrates?
-                                        # 0=all other demes
-                                        # 1=eight adjacent neighbors
-                                        # 2=two adjacent demes in list
-                                        # 3=proportional based on the number of points
-DEMES_NUM_X 0                           # Simulated number of demes in X dimension. Only used for migration. 
-DEMES_SEED_METHOD 0                     # Deme seeding method.
-                                        # 0=maintain old consistency
-                                        # 1=new method using genotypes
-DEMES_DIVIDE_METHOD 0                   # Deme divide method. Only works with DEMES_SEED_METHOD 1
-                                        # 0=replace and target demes
-                                        # 1= replace target deme, reset source deme to founders
-                                        # 2=replace target deme, leave source deme unchanged
-DEMES_DEFAULT_GERMLINE_PROPENSITY 0.0   # Default germline propensity of organisms in deme.
-                                        # For use with DEMES_DIVIDE_METHOD 2.
-DEMES_FOUNDER_GERMLINE_PROPENSITY -1.0  # Default germline propensity of founder organisms in deme.
-                                        # For use with DEMES_DIVIDE_METHOD 2.
-                                        #  <0 = OFF
-DEMES_PREFER_EMPTY 0                    # Give empty demes preference as targets of deme replication?
-DEMES_PROTECTION_POINTS 0               # The number of points a deme receives for each suicide.
-POINT_DECAY_PERCENT 0                   # The percentage of points decayed each time cActionDecayPoints is called.
-
-### 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 2           # 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)
-                          # 3 = Divide resets mother stats, but not state.
-                          # 4 = 3 + child inherits mother registers and stack values.
-EPIGENETIC_METHOD 0       # Inheritance of state information other than genome
-                          # 0 = none
-                          # 1 = offspring inherits registers and stacks of first thread
-                          # 1 = parent maintains registers and stacks of first thread
-                          # 
-                          # 1 = offspring and parent keep state information
-INJECT_METHOD 1           # 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.
-REPRO_METHOD 1            # Replace existing organism: 1=yes
-
-### RECOMBINATION_GROUP ###
-# Sexual Recombination and Modularity
-RECOMBINATION_PROB 1.0  # probability of recombination in div-sex
-MAX_BIRTH_WAIT_TIME -1  # Updates incipiant orgs can wait for crossover
-MODULE_NUM 0            # number of modules in the genome
-CONT_REC_REGS 1         # are (modular) recombination regions continuous
-CORESPOND_REC_REGS 1    # are (modular) recombination regions swapped randomly
-                        #  or with corresponding positions?
-TWO_FOLD_COST_SEX 0     # 1 = only one recombined offspring is born.
-                        # 2 = both offspring are born
-SAME_LENGTH_SEX 0       # 0 = recombine with any genome
-                        # 1 = only recombine w/ same length
-
-### DIVIDE_GROUP ###
-# Divide Restrictions
-CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes.
-                             # (Checked BEFORE mutations applied on divide.)
-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.
-MIN_GENOME_SIZE 30            # Minimum number of instructions allowed in a genome. 0 = OFF
-MAX_GENOME_SIZE 0           # Maximum number of instructions allowed in a genome. 0 = OFF
-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.
-REQUIRE_EXACT_COPY 0         # Require offspring to be an exact copy (only divide mutations allowed).
-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.
-IMPLICIT_REPRO_ENERGY 0.0    # Call Inst_Repro if organism accumulates this amount of energy.
-
-### MUTATION_GROUP ###
-# Mutations
-POINT_MUT_PROB 0.0       # Mutation rate (per-location per update)
-COPY_MUT_PROB 0.0075     # Mutation rate (per copy)
-COPY_INS_PROB 0.0        # Insertion rate (per copy)
-COPY_DEL_PROB 0.0        # Deletion rate (per copy)
-COPY_UNIFORM_PROB 0.0    # Uniform mutation probability (per copy)
-                         # - Randomly applies any of the three classes of mutations (ins, del, point).
-COPY_SLIP_PROB 0.0       # Slip rate (per copy)
-DIV_MUT_PROB 0.0         # Mutation rate (per site, applied on divide)
-DIV_INS_PROB 0.0         # Insertion rate (per site, applied on divide)
-DIV_DEL_PROB 0.0         # Deletion rate (per site, applied on divide)
-DIV_UNIFORM_PROB 0.0     # Uniform mutation probability (per site, applied on divide)
-                         # - Randomly applies any of the three classes of mutations (ins, del, point).
-DIV_SLIP_PROB 0.0        # Slip rate (per site, applied on divide)
-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_UNIFORM_PROB 0.0  # Uniform mutation probability (per divide)
-                         # - Randomly applies any of the three classes of mutations (ins, del, point).
-DIVIDE_SLIP_PROB 0.0     # Slip rate (per divide) - creates large deletions/duplications
-INJECT_INS_PROB 0.00#006    # Insertion rate (per site, applied on inject)
-INJECT_DEL_PROB 0.00#006      # Deletion rate (per site, applied on inject)
-INJECT_MUT_PROB 0.00#8      # Mutation rate (per site, applied on inject)
-SLIP_FILL_MODE 0         # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled, 4=nop-C
-SLIP_COPY_MODE 0         # How to handle 'on-copy' slip mutations:
-                         # 0 = actual read head slip
-                         # 1 = instant large mutation (obeys slip mode)
-PARENT_MUT_PROB 0.0      # Per-site, in parent, on divide
-SPECIAL_MUT_LINE -1      # If this is >= 0, ONLY this line is mutated
-META_COPY_MUT 0.0        # Prob. of copy mutation rate changing (per gen)
-META_STD_DEV 0.0         # Standard deviation of meta mutation size.
-MUT_RATE_SOURCE 1        # 1 = Mutation rates determined by environment.
-                         # 2 = Mutation rates inherited from parent.
-MIGRATION_RATE 0.0       # Uniform probability of offspring migrating to a new deme.
-
-### REVERSION_GROUP ###
-# Mutation Reversion
-# These slow down avida a lot, and should be set to 0.0 normally.
-REVERT_FATAL 0.0           # Should any mutations be reverted on birth?
-REVERT_DETRIMENTAL 0.0     #   0.0 to 1.0; Probability of reversion.
-REVERT_NEUTRAL 0.0         # 
-REVERT_BENEFICIAL 0.0      # 
-STERILIZE_FATAL 0.0        # Should any mutations clear (kill) the organism?
-STERILIZE_DETRIMENTAL 0.0  # 
-STERILIZE_NEUTRAL 0.0      # 
-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.
-
-### TIME_GROUP ###
-# Time Slicing
-AVE_TIME_SLICE 30           # Ave number of insts per org per update
-SLICING_METHOD 1            # 0 = CONSTANT: all organisms get default...
-                            # 1 = PROBABILISTIC: Run _prob_ proportional to merit.
-                            # 2 = INTEGRATED: Perfectly integrated deterministic.
-                            # 3 = DemeProbabalistic, each deme gets the same number of CPU cycles, which are awarded probabalistically within each deme.
-                            # 4 = ProbDemeProbabalistic, each deme gets CPU cycles proportional to its living population size, which are awarded probabalistically within each deme.
-                            # 5 = CONSTANT BURST: all organisms get default, in SLICING_BURST_SIZE chunks
-SLICING_BURST_SIZE 1        # Sets the scheduler burst size, when supported.
-BASE_MERIT_METHOD 4         # 0 = Constant (merit independent of size)
-                            # 1 = Merit proportional to copied size
-                            # 2 = Merit prop. to executed size
-                            # 3 = Merit prop. to full size
-                            # 4 = Merit prop. to min of executed or copied size
-                            # 5 = Merit prop. to sqrt of the minimum size
-                            # 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 1.0         # 1st FITNESS_METHOD parameter
-FITNESS_COEFF_2 1.0         # 2nd 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)
-MAX_CPU_THREADS 2           # 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
-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.
-FASTFORWARD_UPDATES 0       # Fast-forward if the average generation has not changed in this many updates. (0 = off)
-FASTFORWARD_NUM_ORGS 0      # Fast-forward if population is equal to this
-
-### GENEOLOGY_GROUP ###
-# Geneology
-TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?
-                      # 0=no, 1=yes, 2=yes,w/sexual population
-THRESHOLD 3           # Number of organisms in a genotype needed for it
-                      #   to be considered viable.
-GENOTYPE_PRINT 0      # 0/1 (off/on) Print out all threshold genotypes?
-GENOTYPE_PRINT_DOM 0  # Print out a genotype if it stays dominant for
-                      #   this many updates. (0 = off)
-SPECIES_THRESHOLD 2   # max failure count for organisms to be same species
-SPECIES_RECORDING 0   # 1 = full, 2 = limited search (parent only)
-SPECIES_PRINT 0       # 0/1 (off/on) Print out all species?
-TEST_CPU_TIME_MOD 20  # Time allocated in test CPUs (multiple of length)
-
-### LOG_GROUP ###
-# Log Files
-LOG_CREATURES 0  # 0/1 (off/on) toggle to print file.
-LOG_GENOTYPES 0  # 0 = off, 1 = print ALL, 2 = print threshold ONLY.
-LOG_THRESHOLD 0  # 0/1 (off/on) toggle to print file.
-LOG_SPECIES 0    # 0/1 (off/on) toggle to print file.
-
-### LINEAGE_GROUP ###
-# Lineage
-# NOTE: This should probably be called "Clade"
-# This one can slow down avida a lot. It is used to get an idea of how
-# often an advantageous mutation arises, and where it goes afterwards.
-# Lineage creation options are.  Works only when LOG_LINEAGES is set to 1.
-#   0 = manual creation (on inject, use successive integers as lineage labels).
-#   1 = when a child's (potential) fitness is higher than that of its parent.
-#   2 = when a child's (potential) fitness is higher than max in population.
-#   3 = when a child's (potential) fitness is higher than max in dom. lineage
-# *and* the child is in the dominant lineage, or (2)
-#   4 = when a child's (potential) fitness is higher than max in dom. lineage
-# (and that of its own lineage)
-#   5 = same as child's (potential) fitness is higher than that of the
-#       currently dominant organism, and also than that of any organism
-#       currently in the same lineage.
-#   6 = when a child's (potential) fitness is higher than any organism
-#       currently in the same lineage.
-#   7 = when a child's (potential) fitness is higher than that of any
-#       organism in its line of descent
-LOG_LINEAGES 0             # 
-LINEAGE_CREATION_METHOD 0  # 
-
-### ORGANISM_NETWORK_GROUP ###
-# Organism Network Communication
-NET_ENABLED 0      # Enable Network Communication Support
-NET_DROP_PROB 0.0  # Message drop rate
-NET_MUT_PROB 0.0   # Message corruption probability
-NET_MUT_TYPE 0     # Type of message corruption.  0 = Random Single Bit, 1 = Always Flip Last
-NET_STYLE 0        # Communication Style.  0 = Random Next, 1 = Receiver Facing
-
-### ORGANISM_MESSAGING_GROUP ###
-# Organism Message-Based Communication
-MESSAGE_TYPE 0                      # Messaging Style. 0=Receiver Facing, 1=Broadcast
-MESSAGE_BCAST_RADIUS 1              # Broadcast message radius (cells)
-ORGANISMS_REMEMBER_MESSAGES 1       # Does an organism remember all messages it has sent or received? 0=false, 1=true (default)
-MESSAGE_QUEUE_SIZE -1               # Maximum number of unretrieved messages an organism can store (-1 for no limit is the default)
-MESSAGE_QUEUE_BEHAVIOR_WHEN_FULL 0  # 0 = Drop incoming message (default), 1 = Drop oldest unretrieved message
-
-### BUY_SELL_GROUP ###
-# Buying and Selling Parameters
-SAVE_RECEIVED 0  # Enable storage of all inputs bought from other orgs
-BUY_PRICE 0      # price offered by organisms attempting to buy
-SELL_PRICE 0     # price offered by organisms attempting to sell
-
-### HOARD_RESOURCE_GROUP ###
-# Resource Hoarding Parameters
-USE_RESOURCE_BINS 0             # Enable resource bin use.  This serves as a guard on most resource hoarding code.
-ABSORB_RESOURCE_FRACTION .0025  # Fraction of available environmental resource an organism absorbs.
-MULTI_ABSORB_TYPE 0             # What to do if a collect instruction is called on a range of resources.
-                                #  0 = absorb a random resource in the range
-                                #  1 = absorb the first resource in the range
-                                #  2 = absorb the last resource in the range
-                                #  3 = absorb ABSORB_RESOURCE_FRACTION / (# of resources in range) of each resource in the range
-MAX_TOTAL_STORED -1             # Maximum total amount of all resources an organism can store.
-                                #  <0 = no maximum
-USE_STORED_FRACTION 1.0         # The fraction of stored resource to use.
-ENV_FRACTION_THRESHOLD 1.0      # The fraction of available environmental resource to compare available stored resource to when deciding whether to use stored resource.
-RETURN_STORED_ON_DEATH 1        # Return an organism's stored resources to the world when it dies?
-
-### 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
-
-### ENERGY_GROUP ###
-# Energy Settings
-ENERGY_ENABLED 0                              # Enable Energy Model. 0/1 (off/on)
-ENERGY_GIVEN_ON_INJECT 100.0                     # Energy given to organism upon injection.
-ENERGY_GIVEN_AT_BIRTH 10.0                      # Energy given to offspring upon birth.
-FRAC_PARENT_ENERGY_GIVEN_TO_ORG_AT_BIRTH 0.5   # Fraction of parent's energy given to offspring organism.
-FRAC_PARENT_ENERGY_GIVEN_TO_DEME_AT_BIRTH 0.5  # Fraction of parent's energy given to offspring deme.
-FRAC_ENERGY_DECAY_AT_ORG_BIRTH 0.0             # Fraction of energy lost due to decay during organism reproduction.
-FRAC_ENERGY_DECAY_AT_DEME_BIRTH 0.0            # Fraction of energy lost due to decay during deme reproduction.
-NUM_CYCLES_EXC_BEFORE_0_ENERGY 1000               # Number of virtual CPU cycles executed before energy is exhausted.
-ENERGY_CAP -1.0                                # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Double
-APPLY_ENERGY_METHOD 1                          # When should rewarded energy be applied to current energy?
-                                               # 0 = on divide
-                                               # 1 = on completion of task
-                                               # 2 = on sleep
-FIX_METABOLIC_RATE -1.0                        # Fix organism metobolic rate to value.  This value is static.  Feature disabled by default (value == -1)
-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.
-FRAC_ENERGY_RELINQUISH 1.0                     # Fraction of organisms energy to relinquish
-ENERGY_PASSED_ON_DEME_REPLICATION_METHOD 0     # Who get energy passed from a parent deme
-                                               # 0 = Energy divided among organisms injected to offspring deme
-                                               # 1 = Energy divided among cells in offspring deme
-INHERIT_EXE_RATE 0                             # Inherit energy rate from parent? 0=no  1=yes
-ATTACK_DECAY_RATE 0.0                          # Percent of cell's energy decayed by attack
-ENERGY_THRESH_LOW .33                          # Threshold percent below which energy level is considered low.  Requires ENERGY_CAP.
-ENERGY_THRESH_HIGH .75                         # Threshold percent above which energy level is considered high.  Requires ENERGY_CAP.
-ENERGY_COMPARISON_EPSILON 0.0                  # Percent difference (relative to executing organism) required in energy level comparisons
-
-### ENERGY_SHARING_GROUP ###
-# Energy Sharing Settings
-ENERGY_SHARING_METHOD 0            # Method for sharing energy.  0=receiver must actively receive/request, 1=energy pushed on receiver
-ENERGY_SHARING_PCT 0.0             # Percent of energy to share
-ENERGY_SHARING_INCREMENT 0.01      # Amount to change percent energy shared
-ENERGY_SHARING_LOSS 0.0            # Percent of shared energy lost in transfer
-ENERGY_SHARING_UPDATE_METABOLIC 0  # 0/1 (off/on) - Whether to update an organism's metabolic rate on donate or reception/application of energy
-LOG_ENERGY_SHARING 0               # Whether or not to log energy shares.  0/1 (off/on)
-
-### 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 1        # Number of cells to move Avidian on move instruction
-BIOMIMETIC_MOVEMENT_LOG 0         # Log detailed movement information (WARNING: large data file)
-BIOMIMETIC_MOVEMENT_FACTOR 1.0    # Scale merit bonus due to movement (m<1.0 applies a cost)
-BIOMIMETIC_EVAL_ON_MOVEMENT 0     # Force task evaluation on each movement step
-BIOMIMETIC_K 0                    # Carrying capacity in number of organisms
-
-### PHEROMONE_GROUP ###
-# Pheromone Settings
-PHEROMONE_ENABLED 0        # Enable pheromone usage. 0/1 (off/on)
-PHEROMONE_AMOUNT 1.0       # Amount of pheromone to add per drop
-PHEROMONE_DROP_MODE 0      # Where to drop pheromone
-                           # 0 = Half amount at src, half at dest
-                           # 1 = All at source
-                           # 2 = All at dest
-EXPLOIT_EXPLORE_PROB 0.00  # Probability of random exploration
-                           # instead of pheromone trail following
-LOG_PHEROMONE 0            # Log pheromone drops.  0/1 (off/on)
-PHEROMONE_LOG_START 0      # Update at which to start logging pheromone drops
-EXPLOIT_LOG_START 0        # Update at which to start logging exploit moves
-EXPLORE_LOG_START 0        # Update at which to start logging explore moves
-MOVETARGET_LOG_START 0     # Update at which to start logging movetarget moves
-LOG_INJECT 0               # Log injection of organisms.  0/1 (off/on)
-INJECT_LOG_START 0         # Update at which to start logging injection of
-                           # organisms
-
-### SYNCHRONIZATION_GROUP ###
-# Synchronization settings
-SYNC_FITNESS_WINDOW 100     # Number of updates over which to calculate fitness (default=100).
-SYNC_FLASH_LOSSRATE 0.0     # P() to lose a flash send (0.0==off).
-SYNC_TEST_FLASH_ARRIVAL -1  # CPU cycle at which an organism will receive a flash (off=-1, default=-1, analyze mode only.)

Copied: branches/biounit/support/config/misc/Parasites/avida.cfg (from rev 3558, branches/parasites/support/config/misc/Parasites/avida.cfg)
===================================================================
--- branches/biounit/support/config/misc/Parasites/avida.cfg	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/avida.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,543 @@
+#############################################################################
+# This file includes all the basic run-time defines for Avida.
+# For more information, see doc/config.html
+#############################################################################
+
+VERSION_ID 2.9.0   # Do not change this value.
+
+INJECT_PROB_FROM_TASKS 1
+INJECT_PROB_SIGMOID 1
+### GENERAL_GROUP ###
+# General Settings
+ANALYZE_MODE 0  # 0 = Disabled
+                # 1 = Enabled
+                # 2 = Interactive
+VIEW_MODE 1     # Initial viewer screen
+PAUSE_VIEWER_ON_START 0	#Pause the viewer on load 
+MERIT_INC_APPLY_IMMEDIATE 1
+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
+
+### ARCH_GROUP ###
+# Architecture Variables
+WORLD_X 60              # Width of the Avida world
+WORLD_Y 60              # Height of the Avida world
+WORLD_Z 1               # Depth of the Avida world
+WORLD_GEOMETRY 3       # 1 = Bounded Grid
+                        # 2 = Torus
+                        # 3 = Clique
+                        # 4 = Hexagonal grid
+                        # 5 = Lattice
+RANDOM_SEED 0           # Random number seed (0 for based on time)
+HARDWARE_TYPE 2         # 0 = Original CPUs
+                        # 1 = New SMT CPUs
+                        # 2 = Transitional SMT
+                        # 3 = Experimental CPU
+                        # 4 = Gene Expression CPU
+SPECULATIVE 1           # Enable speculative execution
+TRACE_EXECUTION 0       # Trace the execution of all organisms in the population (default=off,SLOW!)
+BCAST_HOPS 1            # Number of hops to broadcast an alarm
+ALARM_SELF 0            # Does sending an alarm move sender IP to alarm label?
+                        # 0=no
+                        # 1=yes
+IO_EXPIRE 1             # Is the expiration functionality of '-expire' I/O instructions enabled?
+INSTRUCTION_CONSTANT 3  # The Constant to add when the add-const instruction is called
+
+### CONFIG_FILE_GROUP ###
+# Configuration Files
+DATA_DIR data                       # Directory in which config files are found
+INST_SET instset-smt.cfg                          # 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
+START_CREATURE dominant-org.org  # Organism to seed the soup
+
+### DEME_GROUP ###
+# Demes and Germlines
+NUM_DEMES 1                             # Number of independent groups in the
+                                        # population (default=1).
+DEMES_USE_GERMLINE 0                    # Whether demes use a distinct germline (default=0).
+DEMES_PREVENT_STERILE 0                 # Whether to prevent sterile demes from
+                                        # replicating (default=0 or no).
+DEMES_RESET_RESOURCES 0                 # Reset resources in demes on replication. 
+                                        # 0 = reset both demes 
+                                        # 1 = reset target deme 
+                                        # 2 = deme resources remain unchanged
+DEMES_REPLICATE_SIZE 1                  # Number of identical organisms to create or copy from the
+                                        # source deme to the target deme (default=1).
+LOG_DEMES_REPLICATE 0                   # Log deme replications.  0/1 (off/on)
+DEMES_REPLICATE_LOG_START 0             # Update at which to start logging deme replications
+DEMES_PROB_ORG_TRANSFER 0.0             # Probablity of an organism being transferred from the
+                                        # source deme to the target deme (default=0.0).
+DEMES_ORGANISM_SELECTION 0              # How organisms are selected for transfer from
+                                        # source to target during deme replication.
+                                        # 0=random with replacement (default).
+                                        # 1=sequential.
+DEMES_ORGANISM_PLACEMENT 0              # How organisms are placed during deme replication.
+                                        # 0=cell-array middle (default).
+                                        # 1=deme center.
+                                        # 2=random placement.
+                                        # 3=sequential.
+DEMES_ORGANISM_FACING 0                 # How organisms are facing during deme replication.
+                                        # 0=unchanged (default).
+                                        # 1=northwest.
+                                        # 2=random.
+DEMES_MAX_AGE 500                       # The maximum age of a deme (in updates) to be
+                                        # used for age-based replication (default=500).
+DEMES_MAX_BIRTHS 100                    # The maximum number of births that can occur
+                                        # within a deme; used with birth-count
+                                        # replication (default=100).
+DEMES_MIM_EVENTS_KILLED_RATIO 0.7       # Minimum ratio of events killed required for event period to be a success.
+DEMES_MIM_SUCCESSFUL_EVENT_PERIODS 1    # Minimum number of consecutive event periods that must be a success.
+GERMLINE_COPY_MUT 0.0075                # Prob. of copy mutations occuring during
+                                        # germline replication (default=0.0075).
+GERMLINE_INS_MUT 0.05                   # Prob. of an insertion mutation occuring
+                                        # during germline replication (default=0.05).
+GERMLINE_DEL_MUT 0.05                   # Prob. of a deletion mutation occuring
+                                        # during germline replication (default=0.05).
+DEMES_REPLICATE_CPU_CYCLES 0.0          # Replicate a deme immediately after it has used
+                                        # this number of cpu cycles, normalized
+                                        # by number of orgs in deme (0 = OFF).
+DEMES_REPLICATE_TIME 0.0                # Replicate a deme immediately after it has used
+                                        # this number of cpu cycles, normalized
+                                        # by number of orgs in deme and organism merit (0 = OFF).
+DEMES_REPLICATE_BIRTHS 0                # Replicate a deme immediately after it has 
+                                        # produced this many offspring (0 = OFF).
+DEMES_REPLICATE_ORGS 0                  # Replicate a deme immediately once it reaches a
+                                        # certain number of organisms (0 = OFF).
+DEMES_REPLICATION_ONLY_RESETS 0         # Kin selection mode. Deme replication really:
+                                        # 1=resets deme resources
+                                        # 2=rests deme resources and re-injects organisms
+DEMES_MIGRATION_RATE 0.0                # Probability of an offspring being born in a different deme.
+DEMES_MIGRATION_METHOD 0                # How do we choose what demes an org may land in when it migrates?
+                                        # 0=all other demes
+                                        # 1=eight adjacent neighbors
+                                        # 2=two adjacent demes in list
+                                        # 3=proportional based on the number of points
+DEMES_NUM_X 0                           # Simulated number of demes in X dimension. Only used for migration. 
+DEMES_SEED_METHOD 0                     # Deme seeding method.
+                                        # 0=maintain old consistency
+                                        # 1=new method using genotypes
+DEMES_DIVIDE_METHOD 0                   # Deme divide method. Only works with DEMES_SEED_METHOD 1
+                                        # 0=replace and target demes
+                                        # 1= replace target deme, reset source deme to founders
+                                        # 2=replace target deme, leave source deme unchanged
+DEMES_DEFAULT_GERMLINE_PROPENSITY 0.0   # Default germline propensity of organisms in deme.
+                                        # For use with DEMES_DIVIDE_METHOD 2.
+DEMES_FOUNDER_GERMLINE_PROPENSITY -1.0  # Default germline propensity of founder organisms in deme.
+                                        # For use with DEMES_DIVIDE_METHOD 2.
+                                        #  <0 = OFF
+DEMES_PREFER_EMPTY 0                    # Give empty demes preference as targets of deme replication?
+DEMES_PROTECTION_POINTS 0               # The number of points a deme receives for each suicide.
+POINT_DECAY_PERCENT 0                   # The percentage of points decayed each time cActionDecayPoints is called.
+
+### 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 2           # 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)
+                          # 3 = Divide resets mother stats, but not state.
+                          # 4 = 3 + child inherits mother registers and stack values.
+EPIGENETIC_METHOD 0       # Inheritance of state information other than genome
+                          # 0 = none
+                          # 1 = offspring inherits registers and stacks of first thread
+                          # 1 = parent maintains registers and stacks of first thread
+                          # 
+                          # 1 = offspring and parent keep state information
+INJECT_METHOD 1           # 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.
+REPRO_METHOD 1            # Replace existing organism: 1=yes
+
+### RECOMBINATION_GROUP ###
+# Sexual Recombination and Modularity
+RECOMBINATION_PROB 1.0  # probability of recombination in div-sex
+MAX_BIRTH_WAIT_TIME -1  # Updates incipiant orgs can wait for crossover
+MODULE_NUM 0            # number of modules in the genome
+CONT_REC_REGS 1         # are (modular) recombination regions continuous
+CORESPOND_REC_REGS 1    # are (modular) recombination regions swapped randomly
+                        #  or with corresponding positions?
+TWO_FOLD_COST_SEX 0     # 1 = only one recombined offspring is born.
+                        # 2 = both offspring are born
+SAME_LENGTH_SEX 0       # 0 = recombine with any genome
+                        # 1 = only recombine w/ same length
+
+### DIVIDE_GROUP ###
+# Divide Restrictions
+CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes.
+                             # (Checked BEFORE mutations applied on divide.)
+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.
+MIN_GENOME_SIZE 30            # Minimum number of instructions allowed in a genome. 0 = OFF
+MAX_GENOME_SIZE 0           # Maximum number of instructions allowed in a genome. 0 = OFF
+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.
+REQUIRE_EXACT_COPY 0         # Require offspring to be an exact copy (only divide mutations allowed).
+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.
+IMPLICIT_REPRO_ENERGY 0.0    # Call Inst_Repro if organism accumulates this amount of energy.
+
+### MUTATION_GROUP ###
+# Mutations
+POINT_MUT_PROB 0.0       # Mutation rate (per-location per update)
+COPY_MUT_PROB 0.0075     # Mutation rate (per copy)
+COPY_INS_PROB 0.0        # Insertion rate (per copy)
+COPY_DEL_PROB 0.0        # Deletion rate (per copy)
+COPY_UNIFORM_PROB 0.0    # Uniform mutation probability (per copy)
+                         # - Randomly applies any of the three classes of mutations (ins, del, point).
+COPY_SLIP_PROB 0.0       # Slip rate (per copy)
+DIV_MUT_PROB 0.0         # Mutation rate (per site, applied on divide)
+DIV_INS_PROB 0.0         # Insertion rate (per site, applied on divide)
+DIV_DEL_PROB 0.0         # Deletion rate (per site, applied on divide)
+DIV_UNIFORM_PROB 0.0     # Uniform mutation probability (per site, applied on divide)
+                         # - Randomly applies any of the three classes of mutations (ins, del, point).
+DIV_SLIP_PROB 0.0        # Slip rate (per site, applied on divide)
+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_UNIFORM_PROB 0.0  # Uniform mutation probability (per divide)
+                         # - Randomly applies any of the three classes of mutations (ins, del, point).
+DIVIDE_SLIP_PROB 0.0     # Slip rate (per divide) - creates large deletions/duplications
+INJECT_INS_PROB 0.00#006    # Insertion rate (per site, applied on inject)
+INJECT_DEL_PROB 0.00#006      # Deletion rate (per site, applied on inject)
+INJECT_MUT_PROB 0.00#8      # Mutation rate (per site, applied on inject)
+SLIP_FILL_MODE 0         # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled, 4=nop-C
+SLIP_COPY_MODE 0         # How to handle 'on-copy' slip mutations:
+                         # 0 = actual read head slip
+                         # 1 = instant large mutation (obeys slip mode)
+PARENT_MUT_PROB 0.0      # Per-site, in parent, on divide
+SPECIAL_MUT_LINE -1      # If this is >= 0, ONLY this line is mutated
+META_COPY_MUT 0.0        # Prob. of copy mutation rate changing (per gen)
+META_STD_DEV 0.0         # Standard deviation of meta mutation size.
+MUT_RATE_SOURCE 1        # 1 = Mutation rates determined by environment.
+                         # 2 = Mutation rates inherited from parent.
+MIGRATION_RATE 0.0       # Uniform probability of offspring migrating to a new deme.
+
+### REVERSION_GROUP ###
+# Mutation Reversion
+# These slow down avida a lot, and should be set to 0.0 normally.
+REVERT_FATAL 0.0           # Should any mutations be reverted on birth?
+REVERT_DETRIMENTAL 0.0     #   0.0 to 1.0; Probability of reversion.
+REVERT_NEUTRAL 0.0         # 
+REVERT_BENEFICIAL 0.0      # 
+STERILIZE_FATAL 0.0        # Should any mutations clear (kill) the organism?
+STERILIZE_DETRIMENTAL 0.0  # 
+STERILIZE_NEUTRAL 0.0      # 
+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.
+
+### TIME_GROUP ###
+# Time Slicing
+AVE_TIME_SLICE 30           # Ave number of insts per org per update
+SLICING_METHOD 1            # 0 = CONSTANT: all organisms get default...
+                            # 1 = PROBABILISTIC: Run _prob_ proportional to merit.
+                            # 2 = INTEGRATED: Perfectly integrated deterministic.
+                            # 3 = DemeProbabalistic, each deme gets the same number of CPU cycles, which are awarded probabalistically within each deme.
+                            # 4 = ProbDemeProbabalistic, each deme gets CPU cycles proportional to its living population size, which are awarded probabalistically within each deme.
+                            # 5 = CONSTANT BURST: all organisms get default, in SLICING_BURST_SIZE chunks
+SLICING_BURST_SIZE 1        # Sets the scheduler burst size, when supported.
+BASE_MERIT_METHOD 4         # 0 = Constant (merit independent of size)
+                            # 1 = Merit proportional to copied size
+                            # 2 = Merit prop. to executed size
+                            # 3 = Merit prop. to full size
+                            # 4 = Merit prop. to min of executed or copied size
+                            # 5 = Merit prop. to sqrt of the minimum size
+                            # 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 1.0         # 1st FITNESS_METHOD parameter
+FITNESS_COEFF_2 1.0         # 2nd 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)
+MAX_CPU_THREADS 2           # 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
+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.
+FASTFORWARD_UPDATES 0       # Fast-forward if the average generation has not changed in this many updates. (0 = off)
+FASTFORWARD_NUM_ORGS 0      # Fast-forward if population is equal to this
+
+### GENEOLOGY_GROUP ###
+# Geneology
+TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?
+                      # 0=no, 1=yes, 2=yes,w/sexual population
+THRESHOLD 3           # Number of organisms in a genotype needed for it
+                      #   to be considered viable.
+GENOTYPE_PRINT 0      # 0/1 (off/on) Print out all threshold genotypes?
+GENOTYPE_PRINT_DOM 0  # Print out a genotype if it stays dominant for
+                      #   this many updates. (0 = off)
+SPECIES_THRESHOLD 2   # max failure count for organisms to be same species
+SPECIES_RECORDING 0   # 1 = full, 2 = limited search (parent only)
+SPECIES_PRINT 0       # 0/1 (off/on) Print out all species?
+TEST_CPU_TIME_MOD 20  # Time allocated in test CPUs (multiple of length)
+
+### LOG_GROUP ###
+# Log Files
+LOG_CREATURES 0  # 0/1 (off/on) toggle to print file.
+LOG_GENOTYPES 0  # 0 = off, 1 = print ALL, 2 = print threshold ONLY.
+LOG_THRESHOLD 0  # 0/1 (off/on) toggle to print file.
+LOG_SPECIES 0    # 0/1 (off/on) toggle to print file.
+
+### LINEAGE_GROUP ###
+# Lineage
+# NOTE: This should probably be called "Clade"
+# This one can slow down avida a lot. It is used to get an idea of how
+# often an advantageous mutation arises, and where it goes afterwards.
+# Lineage creation options are.  Works only when LOG_LINEAGES is set to 1.
+#   0 = manual creation (on inject, use successive integers as lineage labels).
+#   1 = when a child's (potential) fitness is higher than that of its parent.
+#   2 = when a child's (potential) fitness is higher than max in population.
+#   3 = when a child's (potential) fitness is higher than max in dom. lineage
+# *and* the child is in the dominant lineage, or (2)
+#   4 = when a child's (potential) fitness is higher than max in dom. lineage
+# (and that of its own lineage)
+#   5 = same as child's (potential) fitness is higher than that of the
+#       currently dominant organism, and also than that of any organism
+#       currently in the same lineage.
+#   6 = when a child's (potential) fitness is higher than any organism
+#       currently in the same lineage.
+#   7 = when a child's (potential) fitness is higher than that of any
+#       organism in its line of descent
+LOG_LINEAGES 0             # 
+LINEAGE_CREATION_METHOD 0  # 
+
+### ORGANISM_NETWORK_GROUP ###
+# Organism Network Communication
+NET_ENABLED 0      # Enable Network Communication Support
+NET_DROP_PROB 0.0  # Message drop rate
+NET_MUT_PROB 0.0   # Message corruption probability
+NET_MUT_TYPE 0     # Type of message corruption.  0 = Random Single Bit, 1 = Always Flip Last
+NET_STYLE 0        # Communication Style.  0 = Random Next, 1 = Receiver Facing
+
+### ORGANISM_MESSAGING_GROUP ###
+# Organism Message-Based Communication
+MESSAGE_TYPE 0                      # Messaging Style. 0=Receiver Facing, 1=Broadcast
+MESSAGE_BCAST_RADIUS 1              # Broadcast message radius (cells)
+ORGANISMS_REMEMBER_MESSAGES 1       # Does an organism remember all messages it has sent or received? 0=false, 1=true (default)
+MESSAGE_QUEUE_SIZE -1               # Maximum number of unretrieved messages an organism can store (-1 for no limit is the default)
+MESSAGE_QUEUE_BEHAVIOR_WHEN_FULL 0  # 0 = Drop incoming message (default), 1 = Drop oldest unretrieved message
+
+### BUY_SELL_GROUP ###
+# Buying and Selling Parameters
+SAVE_RECEIVED 0  # Enable storage of all inputs bought from other orgs
+BUY_PRICE 0      # price offered by organisms attempting to buy
+SELL_PRICE 0     # price offered by organisms attempting to sell
+
+### HOARD_RESOURCE_GROUP ###
+# Resource Hoarding Parameters
+USE_RESOURCE_BINS 0             # Enable resource bin use.  This serves as a guard on most resource hoarding code.
+ABSORB_RESOURCE_FRACTION .0025  # Fraction of available environmental resource an organism absorbs.
+MULTI_ABSORB_TYPE 0             # What to do if a collect instruction is called on a range of resources.
+                                #  0 = absorb a random resource in the range
+                                #  1 = absorb the first resource in the range
+                                #  2 = absorb the last resource in the range
+                                #  3 = absorb ABSORB_RESOURCE_FRACTION / (# of resources in range) of each resource in the range
+MAX_TOTAL_STORED -1             # Maximum total amount of all resources an organism can store.
+                                #  <0 = no maximum
+USE_STORED_FRACTION 1.0         # The fraction of stored resource to use.
+ENV_FRACTION_THRESHOLD 1.0      # The fraction of available environmental resource to compare available stored resource to when deciding whether to use stored resource.
+RETURN_STORED_ON_DEATH 1        # Return an organism's stored resources to the world when it dies?
+
+### 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
+
+### ENERGY_GROUP ###
+# Energy Settings
+ENERGY_ENABLED 0                              # Enable Energy Model. 0/1 (off/on)
+ENERGY_GIVEN_ON_INJECT 100.0                     # Energy given to organism upon injection.
+ENERGY_GIVEN_AT_BIRTH 10.0                      # Energy given to offspring upon birth.
+FRAC_PARENT_ENERGY_GIVEN_TO_ORG_AT_BIRTH 0.5   # Fraction of parent's energy given to offspring organism.
+FRAC_PARENT_ENERGY_GIVEN_TO_DEME_AT_BIRTH 0.5  # Fraction of parent's energy given to offspring deme.
+FRAC_ENERGY_DECAY_AT_ORG_BIRTH 0.0             # Fraction of energy lost due to decay during organism reproduction.
+FRAC_ENERGY_DECAY_AT_DEME_BIRTH 0.0            # Fraction of energy lost due to decay during deme reproduction.
+NUM_CYCLES_EXC_BEFORE_0_ENERGY 1000               # Number of virtual CPU cycles executed before energy is exhausted.
+ENERGY_CAP -1.0                                # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Double
+APPLY_ENERGY_METHOD 1                          # When should rewarded energy be applied to current energy?
+                                               # 0 = on divide
+                                               # 1 = on completion of task
+                                               # 2 = on sleep
+FIX_METABOLIC_RATE -1.0                        # Fix organism metobolic rate to value.  This value is static.  Feature disabled by default (value == -1)
+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.
+FRAC_ENERGY_RELINQUISH 1.0                     # Fraction of organisms energy to relinquish
+ENERGY_PASSED_ON_DEME_REPLICATION_METHOD 0     # Who get energy passed from a parent deme
+                                               # 0 = Energy divided among organisms injected to offspring deme
+                                               # 1 = Energy divided among cells in offspring deme
+INHERIT_EXE_RATE 0                             # Inherit energy rate from parent? 0=no  1=yes
+ATTACK_DECAY_RATE 0.0                          # Percent of cell's energy decayed by attack
+ENERGY_THRESH_LOW .33                          # Threshold percent below which energy level is considered low.  Requires ENERGY_CAP.
+ENERGY_THRESH_HIGH .75                         # Threshold percent above which energy level is considered high.  Requires ENERGY_CAP.
+ENERGY_COMPARISON_EPSILON 0.0                  # Percent difference (relative to executing organism) required in energy level comparisons
+
+### ENERGY_SHARING_GROUP ###
+# Energy Sharing Settings
+ENERGY_SHARING_METHOD 0            # Method for sharing energy.  0=receiver must actively receive/request, 1=energy pushed on receiver
+ENERGY_SHARING_PCT 0.0             # Percent of energy to share
+ENERGY_SHARING_INCREMENT 0.01      # Amount to change percent energy shared
+ENERGY_SHARING_LOSS 0.0            # Percent of shared energy lost in transfer
+ENERGY_SHARING_UPDATE_METABOLIC 0  # 0/1 (off/on) - Whether to update an organism's metabolic rate on donate or reception/application of energy
+LOG_ENERGY_SHARING 0               # Whether or not to log energy shares.  0/1 (off/on)
+
+### 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 1        # Number of cells to move Avidian on move instruction
+BIOMIMETIC_MOVEMENT_LOG 0         # Log detailed movement information (WARNING: large data file)
+BIOMIMETIC_MOVEMENT_FACTOR 1.0    # Scale merit bonus due to movement (m<1.0 applies a cost)
+BIOMIMETIC_EVAL_ON_MOVEMENT 0     # Force task evaluation on each movement step
+BIOMIMETIC_K 0                    # Carrying capacity in number of organisms
+
+### PHEROMONE_GROUP ###
+# Pheromone Settings
+PHEROMONE_ENABLED 0        # Enable pheromone usage. 0/1 (off/on)
+PHEROMONE_AMOUNT 1.0       # Amount of pheromone to add per drop
+PHEROMONE_DROP_MODE 0      # Where to drop pheromone
+                           # 0 = Half amount at src, half at dest
+                           # 1 = All at source
+                           # 2 = All at dest
+EXPLOIT_EXPLORE_PROB 0.00  # Probability of random exploration
+                           # instead of pheromone trail following
+LOG_PHEROMONE 0            # Log pheromone drops.  0/1 (off/on)
+PHEROMONE_LOG_START 0      # Update at which to start logging pheromone drops
+EXPLOIT_LOG_START 0        # Update at which to start logging exploit moves
+EXPLORE_LOG_START 0        # Update at which to start logging explore moves
+MOVETARGET_LOG_START 0     # Update at which to start logging movetarget moves
+LOG_INJECT 0               # Log injection of organisms.  0/1 (off/on)
+INJECT_LOG_START 0         # Update at which to start logging injection of
+                           # organisms
+
+### SYNCHRONIZATION_GROUP ###
+# Synchronization settings
+SYNC_FITNESS_WINDOW 100     # Number of updates over which to calculate fitness (default=100).
+SYNC_FLASH_LOSSRATE 0.0     # P() to lose a flash send (0.0==off).
+SYNC_TEST_FLASH_ARRIVAL -1  # CPU cycle at which an organism will receive a flash (off=-1, default=-1, analyze mode only.)

Deleted: branches/biounit/support/config/misc/Parasites/default-smt.org
===================================================================
--- branches/parasites/support/config/misc/Parasites/default-smt.org	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/default-smt.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,160 +0,0 @@
-Search       #  1:  Find organism end.
-Nop-C        #  2:  - Match CB:AD
-Nop-B
-Push-Prev    #  5:  Move end position to Stack-A
-SetMemory    #  6:  Place FLOW-head in memory space for offspring
-Nop-B        #      - Memory space labeled Nop-A Nop-A Nop-A
-Head-Move    #  7:  Move Write head to flow head position
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C
-Search       #  9:  Drop flow head at start of copy loop
-Inst-Read    # 10:
-Inst-Write   # 11: 
-Head-Push    # 12:  Get current position of...
-Nop-C        # 13:  - Read-Head
-If-Equal     # 14:  Test if we are done copying...
-Divide       # 15:  ...If so, divide.
-Head-Move    # 16:  ...If not, continue with loop.
-Nop-A        # 17:
-Nop-D		
\ No newline at end of file

Copied: branches/biounit/support/config/misc/Parasites/default-smt.org (from rev 3558, branches/parasites/support/config/misc/Parasites/default-smt.org)
===================================================================
--- branches/biounit/support/config/misc/Parasites/default-smt.org	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/default-smt.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,160 @@
+Search       #  1:  Find organism end.
+Nop-C        #  2:  - Match CB:AD
+Nop-B
+Push-Prev    #  5:  Move end position to Stack-A
+SetMemory    #  6:  Place FLOW-head in memory space for offspring
+Nop-B        #      - Memory space labeled Nop-A Nop-A Nop-A
+Head-Move    #  7:  Move Write head to flow head position
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C
+Search       #  9:  Drop flow head at start of copy loop
+Inst-Read    # 10:
+Inst-Write   # 11: 
+Head-Push    # 12:  Get current position of...
+Nop-C        # 13:  - Read-Head
+If-Equal     # 14:  Test if we are done copying...
+Divide       # 15:  ...If so, divide.
+Head-Move    # 16:  ...If not, continue with loop.
+Nop-A        # 17:
+Nop-D		
\ No newline at end of file

Deleted: branches/biounit/support/config/misc/Parasites/dominant-org.org
===================================================================
--- branches/parasites/support/config/misc/Parasites/dominant-org.org	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/dominant-org.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,176 +0,0 @@
-# Thu Sep 24 20:03:43 2009
-# Filename........: 155-aabmh
-# Update Output...: N/A
-# Is Viable.......: 1
-# Repro Cycle Size: 0
-# Depth to Viable.: 0
-# 
-# Generation: 0
-# Merit...........: 4672.000000
-# Gestation Time..: 996
-# Fitness.........: 4.690763
-# Errors..........: 0
-# Genome Size.....: 155
-# Copied Size.....: 155
-# Executed Size...: 146
-# Offspring.......: SELF
-# 
-# Tasks Performed:
-# not 10 (10.000000)
-
-
-Search
-Nop-C
-Nop-B
-Push-Prev
-SetMemory
-Nop-B
-Head-Move
-Nop-C
-Nop-C
-If-Not-Equal
-Val-Inc
-Nop-C
-Push-Comp
-Nop-C
-Val-Nand
-Nop-C
-Val-Add
-If-Equal
-Nop-C
-Inst-Write
-Val-Shift-L
-Val-Sub
-Val-Dec
-Nop-C
-Val-Dec
-If-Less
-Search
-Nop-C
-Val-Mult
-IO
-Nop-B
-Val-Delete
-IO
-Nop-C
-Nop-C
-Val-Div
-Val-Inc
-IO
-If-Equal
-Search
-Nop-C
-Nop-C
-Val-Dec
-Val-Nand
-Nop-C
-Nop-C
-Nop-C
-IO
-Nop-C
-Val-Delete
-Search
-Val-Shift-R
-Push-Comp
-Nop-C
-SetMemory
-Nop-C
-Search
-Val-Copy
-Nop-C
-Push-Comp
-Nop-C
-IO
-IO
-Nop-C
-Val-Mod
-Nop-C
-SetMemory
-Val-Mult
-IO
-Nop-C
-Nop-D
-Search
-Val-Shift-R
-Val-Shift-L
-SetMemory
-Nop-D
-If-Less
-Val-Inc
-If-Not-Equal
-Val-Div
-Val-Nand
-Push-Comp
-Nop-C
-Val-Inc
-Val-Div
-Nop-C
-If-Less
-Val-Shift-L
-Val-Nand
-Nop-C
-Val-Shift-R
-Nop-C
-SetMemory
-Nop-C
-SetMemory
-Val-Inc
-Nop-C
-Inst-Read
-Nop-C
-Nop-C
-Val-Nand
-Nop-C
-If-Less
-Head-Move
-Val-Div
-Nop-C
-If-Less
-Nop-A
-Inst-Write
-Val-Add
-Val-Delete
-Nop-C
-Val-Sub
-Val-Mult
-Search
-Val-Nand
-SetMemory
-IO
-Nop-C
-Nop-D
-Nop-C
-Nop-C
-Val-Sub
-Nop-C
-SetMemory
-Nop-D
-Nop-C
-Nop-C
-If-Greater
-Nop-A
-IO
-Nop-C
-Push-Comp
-Nop-C
-Push-Next
-Nop-C
-Val-Add
-Nop-C
-Search
-Head-Push
-IO
-Nop-B
-Nop-C
-Val-Copy
-Nop-C
-Search
-Inst-Read
-Inst-Write
-Head-Push
-Nop-C
-If-Equal
-Divide
-Head-Move
-Nop-A
-Nop-D

Copied: branches/biounit/support/config/misc/Parasites/dominant-org.org (from rev 3558, branches/parasites/support/config/misc/Parasites/dominant-org.org)
===================================================================
--- branches/biounit/support/config/misc/Parasites/dominant-org.org	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/dominant-org.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,176 @@
+# Thu Sep 24 20:03:43 2009
+# Filename........: 155-aabmh
+# Update Output...: N/A
+# Is Viable.......: 1
+# Repro Cycle Size: 0
+# Depth to Viable.: 0
+# 
+# Generation: 0
+# Merit...........: 4672.000000
+# Gestation Time..: 996
+# Fitness.........: 4.690763
+# Errors..........: 0
+# Genome Size.....: 155
+# Copied Size.....: 155
+# Executed Size...: 146
+# Offspring.......: SELF
+# 
+# Tasks Performed:
+# not 10 (10.000000)
+
+
+Search
+Nop-C
+Nop-B
+Push-Prev
+SetMemory
+Nop-B
+Head-Move
+Nop-C
+Nop-C
+If-Not-Equal
+Val-Inc
+Nop-C
+Push-Comp
+Nop-C
+Val-Nand
+Nop-C
+Val-Add
+If-Equal
+Nop-C
+Inst-Write
+Val-Shift-L
+Val-Sub
+Val-Dec
+Nop-C
+Val-Dec
+If-Less
+Search
+Nop-C
+Val-Mult
+IO
+Nop-B
+Val-Delete
+IO
+Nop-C
+Nop-C
+Val-Div
+Val-Inc
+IO
+If-Equal
+Search
+Nop-C
+Nop-C
+Val-Dec
+Val-Nand
+Nop-C
+Nop-C
+Nop-C
+IO
+Nop-C
+Val-Delete
+Search
+Val-Shift-R
+Push-Comp
+Nop-C
+SetMemory
+Nop-C
+Search
+Val-Copy
+Nop-C
+Push-Comp
+Nop-C
+IO
+IO
+Nop-C
+Val-Mod
+Nop-C
+SetMemory
+Val-Mult
+IO
+Nop-C
+Nop-D
+Search
+Val-Shift-R
+Val-Shift-L
+SetMemory
+Nop-D
+If-Less
+Val-Inc
+If-Not-Equal
+Val-Div
+Val-Nand
+Push-Comp
+Nop-C
+Val-Inc
+Val-Div
+Nop-C
+If-Less
+Val-Shift-L
+Val-Nand
+Nop-C
+Val-Shift-R
+Nop-C
+SetMemory
+Nop-C
+SetMemory
+Val-Inc
+Nop-C
+Inst-Read
+Nop-C
+Nop-C
+Val-Nand
+Nop-C
+If-Less
+Head-Move
+Val-Div
+Nop-C
+If-Less
+Nop-A
+Inst-Write
+Val-Add
+Val-Delete
+Nop-C
+Val-Sub
+Val-Mult
+Search
+Val-Nand
+SetMemory
+IO
+Nop-C
+Nop-D
+Nop-C
+Nop-C
+Val-Sub
+Nop-C
+SetMemory
+Nop-D
+Nop-C
+Nop-C
+If-Greater
+Nop-A
+IO
+Nop-C
+Push-Comp
+Nop-C
+Push-Next
+Nop-C
+Val-Add
+Nop-C
+Search
+Head-Push
+IO
+Nop-B
+Nop-C
+Val-Copy
+Nop-C
+Search
+Inst-Read
+Inst-Write
+Head-Push
+Nop-C
+If-Equal
+Divide
+Head-Move
+Nop-A
+Nop-D

Deleted: branches/biounit/support/config/misc/Parasites/environment.cfg
===================================================================
--- branches/parasites/support/config/misc/Parasites/environment.cfg	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/environment.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,18 +0,0 @@
-##############################################################################
-#
-# This is the setup file for the task/resource system.  From here, you can
-# setup the available resources (including their inflow and outflow rates) as
-# well as the reactions that the organisms can trigger by performing tasks.
-#
-# This file is currently setup to reward 9 tasks, all of which use the
-# "infinite" resource, which is undepletable.
-#
-# For information on how to use this file, see:  doc/environment.html
-# For other sample environments, see:  source/support/config/ 
-#
-##############################################################################
-
-
-REACTION  NOT not process:value=0.15:type=pow requisite:max_count=10
-#REACTION  NAND nand process:value=0.9:type=mult requisite:max_count=10
-

Copied: branches/biounit/support/config/misc/Parasites/environment.cfg (from rev 3558, branches/parasites/support/config/misc/Parasites/environment.cfg)
===================================================================
--- branches/biounit/support/config/misc/Parasites/environment.cfg	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/environment.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,18 @@
+##############################################################################
+#
+# This is the setup file for the task/resource system.  From here, you can
+# setup the available resources (including their inflow and outflow rates) as
+# well as the reactions that the organisms can trigger by performing tasks.
+#
+# This file is currently setup to reward 9 tasks, all of which use the
+# "infinite" resource, which is undepletable.
+#
+# For information on how to use this file, see:  doc/environment.html
+# For other sample environments, see:  source/support/config/ 
+#
+##############################################################################
+
+
+REACTION  NOT not process:value=0.15:type=pow requisite:max_count=10
+#REACTION  NAND nand process:value=0.9:type=mult requisite:max_count=10
+

Deleted: branches/biounit/support/config/misc/Parasites/events.cfg
===================================================================
--- branches/parasites/support/config/misc/Parasites/events.cfg	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/events.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,56 +0,0 @@
-##############################################################################
-#
-# This is the setup file for the events system.  From here, you can
-# configure any actions that you want to have happen during the course of
-# an experiment, including setting the times for data collection.
-#
-# basic syntax: [trigger] [start:interval:stop] [action/event] [arguments...]
-#
-# This file is currently setup to record key information every 100 updates.
-#
-# For information on how to use this file, see:  doc/events.html
-# For other sample event configurations, see:  support/config/
-#
-##############################################################################
-
-# Print all of the standard data files...
-#u 0 InjectAll dominant-org.org
-#u 20:20 dump_genotype_grid
-u 700 InjectParasite parasite-smt.org ADC 0 400
-
-#i ZeroMuts
-u 0:100:end PrintAverageData       # Save info about they average genotypes
-u 0:100:end PrintDominantData      # Save info about most abundant genotypes
-u 0:100:end PrintStatsData         # Collect satistics about entire pop.
-u 0:100:end PrintParasiteData ParasiteData.dat
-u 0:100:end PrintCountData         # Count organisms, genotypes, species, etc.
-u 0:100:end PrintTasksData         # Save organisms counts for each task.
-u 0:100:end PrintTimeData          # Track time conversion (generations, etc.)
-u 0:100:end PrintResourceData      # Track resource abundance.
-
-# A few data files not printed by default
-# u 0:100 PrintDominantGenotype      # Save the most abundant genotypes
-# u 100:100:end PrintErrorData       # Std. Error on averages.
-# u 100:100:end PrintVarianceData    # Variance on averages.
-# u 100:100:end PrintTotalsData      # Total counts over entire run.
-# u 100:100:end PrintTasksExeData    # Num. times tasks have been executed.
-# u 100:100:end PrintTasksQualData   # Task quality information
-
-u 2000 ChangeEnvironment "REACTION  NOT not process:value=0.08:type=pow requisite:max_count=10"
-u 4000 ChangeEnvironment "REACTION  NOT not process:value=0.15:type=pow requisite:max_count=10"
-u 6000 ChangeEnvironment "REACTION  NOT not process:value=0.08:type=pow requisite:max_count=10" 
-# Setup the exit time and full population data collection.
-u 5000:5000 SavePopulation         # Save current state of population.
-#u 5000:5000 SaveParasitePopulation
-u 5000:5000 SaveHistoricPopulation # Save ancestors of current population.
-u 5000:5000 SaveParasitePopulation
-u 5000 PrintParasiteData
-
-u 5000 PrintDominantGenotype dominant-genotype.50k.dat
-u 5000 PrintDominantParasiteGenotype dominant-parasite.50k.dat
-
-u 10000 PrintDominantGenotype dominant-genotype.dat
-u 10000 PrintDominantParasiteGenotype dominant-parasite.dat
-
-
-u 100000 exit

Copied: branches/biounit/support/config/misc/Parasites/events.cfg (from rev 3558, branches/parasites/support/config/misc/Parasites/events.cfg)
===================================================================
--- branches/biounit/support/config/misc/Parasites/events.cfg	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/events.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,56 @@
+##############################################################################
+#
+# This is the setup file for the events system.  From here, you can
+# configure any actions that you want to have happen during the course of
+# an experiment, including setting the times for data collection.
+#
+# basic syntax: [trigger] [start:interval:stop] [action/event] [arguments...]
+#
+# This file is currently setup to record key information every 100 updates.
+#
+# For information on how to use this file, see:  doc/events.html
+# For other sample event configurations, see:  support/config/
+#
+##############################################################################
+
+# Print all of the standard data files...
+#u 0 InjectAll dominant-org.org
+#u 20:20 dump_genotype_grid
+u 700 InjectParasite parasite-smt.org ADC 0 400
+
+#i ZeroMuts
+u 0:100:end PrintAverageData       # Save info about they average genotypes
+u 0:100:end PrintDominantData      # Save info about most abundant genotypes
+u 0:100:end PrintStatsData         # Collect satistics about entire pop.
+u 0:100:end PrintParasiteData ParasiteData.dat
+u 0:100:end PrintCountData         # Count organisms, genotypes, species, etc.
+u 0:100:end PrintTasksData         # Save organisms counts for each task.
+u 0:100:end PrintTimeData          # Track time conversion (generations, etc.)
+u 0:100:end PrintResourceData      # Track resource abundance.
+
+# A few data files not printed by default
+# u 0:100 PrintDominantGenotype      # Save the most abundant genotypes
+# u 100:100:end PrintErrorData       # Std. Error on averages.
+# u 100:100:end PrintVarianceData    # Variance on averages.
+# u 100:100:end PrintTotalsData      # Total counts over entire run.
+# u 100:100:end PrintTasksExeData    # Num. times tasks have been executed.
+# u 100:100:end PrintTasksQualData   # Task quality information
+
+u 2000 ChangeEnvironment "REACTION  NOT not process:value=0.08:type=pow requisite:max_count=10"
+u 4000 ChangeEnvironment "REACTION  NOT not process:value=0.15:type=pow requisite:max_count=10"
+u 6000 ChangeEnvironment "REACTION  NOT not process:value=0.08:type=pow requisite:max_count=10" 
+# Setup the exit time and full population data collection.
+u 5000:5000 SavePopulation         # Save current state of population.
+#u 5000:5000 SaveParasitePopulation
+u 5000:5000 SaveHistoricPopulation # Save ancestors of current population.
+u 5000:5000 SaveParasitePopulation
+u 5000 PrintParasiteData
+
+u 5000 PrintDominantGenotype dominant-genotype.50k.dat
+u 5000 PrintDominantParasiteGenotype dominant-parasite.50k.dat
+
+u 10000 PrintDominantGenotype dominant-genotype.dat
+u 10000 PrintDominantParasiteGenotype dominant-parasite.dat
+
+
+u 100000 exit

Deleted: branches/biounit/support/config/misc/Parasites/instset-smt.cfg
===================================================================
--- branches/parasites/support/config/misc/Parasites/instset-smt.cfg	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/instset-smt.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,50 +0,0 @@
-# Core Instruction Set
-Nop-A         1#1(a)	
-Nop-B         1#2  (b)
-Nop-C         1#3  (c)
-Nop-D         1#4  (d)
-Val-Shift-R   1#5  (e)
-Val-Shift-L   1#6  (f)
-Val-Nand      1#7  (g)
-Val-Add       1#8  (h)
-Val-Sub       1#9  (i)
-Val-Mult      1#10 (j)
-Val-Div       1#11 (k)
-Val-Mod       1#12 (l)
-Val-Inc       1#13 (m)
-Val-Dec       1#14 (n)
-SetMemory     1#15 (o)
-Divide        1#16 (p)
-Inst-Read     1#17 (q)
-Inst-Write    1#18 (r)
-If-Equal      1#19 (s)
-If-Not-Equal  1#20 (t)
-If-Less       1#21 (u)
-If-Greater    1#22 (v)
-Head-Push     1#23 (w)
-Head-Pop      1#24 (x)
-Head-Move     1#25 (y)
-Search        1#26 (z)
-Push-Next     1#27 (A)
-Push-Prev     1#28 (B)
-Push-Comp     1#29 (C)
-Val-Delete    1#30 (D)
-Val-Copy      1#31 (E)
-IO            1#32 (F)
-
-# Additional Instructions - Disabled by Default
-Nop-X         0#33 ()
-#Thread-Create 1#34 ()
-#Thread-Cancel 1#35 ()
-#Thread-Kill   1#36 ()
-Inject		   0#37 ()
-#Apoptosis     1#38 ()
-#Net-Get       1#39 ()
-#Net-Send      1#40 ()
-#Net-Receive   1#41 ()
-#Net-Last      1#42 ()
-#Rotate-Left   1#43 ()
-#Rotate-Right  1#44 ()
-#Call-Flow     1#45 ()
-#Call-Label    1#46 ()
-#Return        1#47 ()

Copied: branches/biounit/support/config/misc/Parasites/instset-smt.cfg (from rev 3558, branches/parasites/support/config/misc/Parasites/instset-smt.cfg)
===================================================================
--- branches/biounit/support/config/misc/Parasites/instset-smt.cfg	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/instset-smt.cfg	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,50 @@
+# Core Instruction Set
+Nop-A         1#1(a)	
+Nop-B         1#2  (b)
+Nop-C         1#3  (c)
+Nop-D         1#4  (d)
+Val-Shift-R   1#5  (e)
+Val-Shift-L   1#6  (f)
+Val-Nand      1#7  (g)
+Val-Add       1#8  (h)
+Val-Sub       1#9  (i)
+Val-Mult      1#10 (j)
+Val-Div       1#11 (k)
+Val-Mod       1#12 (l)
+Val-Inc       1#13 (m)
+Val-Dec       1#14 (n)
+SetMemory     1#15 (o)
+Divide        1#16 (p)
+Inst-Read     1#17 (q)
+Inst-Write    1#18 (r)
+If-Equal      1#19 (s)
+If-Not-Equal  1#20 (t)
+If-Less       1#21 (u)
+If-Greater    1#22 (v)
+Head-Push     1#23 (w)
+Head-Pop      1#24 (x)
+Head-Move     1#25 (y)
+Search        1#26 (z)
+Push-Next     1#27 (A)
+Push-Prev     1#28 (B)
+Push-Comp     1#29 (C)
+Val-Delete    1#30 (D)
+Val-Copy      1#31 (E)
+IO            1#32 (F)
+
+# Additional Instructions - Disabled by Default
+Nop-X         0#33 ()
+#Thread-Create 1#34 ()
+#Thread-Cancel 1#35 ()
+#Thread-Kill   1#36 ()
+Inject		   0#37 ()
+#Apoptosis     1#38 ()
+#Net-Get       1#39 ()
+#Net-Send      1#40 ()
+#Net-Receive   1#41 ()
+#Net-Last      1#42 ()
+#Rotate-Left   1#43 ()
+#Rotate-Right  1#44 ()
+#Call-Flow     1#45 ()
+#Call-Label    1#46 ()
+#Return        1#47 ()

Deleted: branches/biounit/support/config/misc/Parasites/parasite-smt.org
===================================================================
--- branches/parasites/support/config/misc/Parasites/parasite-smt.org	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/support/config/misc/Parasites/parasite-smt.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -1,36 +0,0 @@
-Search       #  1:  Find organism end.
-Nop-C        #  2:  - Match CD:AB
-Nop-D
-Push-Prev    #  5:  Move end position to Stack-A
-SetMemory    #  6:  Place FLOW-head in memory space for offspring
-Nop-D
-Nop-A
-Head-Move    #  7:  Move Write head to flow head position
-Nop-C        #  8:
-Nop-C
-Nop-C        #  8:
-Nop-C #IO
-Nop-C      #  8:
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C #IO
-Nop-C        #  8:
-Nop-C
-Nop-C        #  8:
-Nop-C #Val-Nand
-Nop-C
-Nop-C        #  8:
-Nop-C        #  8:
-Nop-C
-Search       #  9:  Drop flow head at start of copy loop
-Inst-Read    # 10:
-Inst-Write   # 11: 
-Head-Push    # 12:  Get current position of...
-Nop-C        # 13:  - Read-Head
-If-Equal     # 14:  Test if we are done copying...
-Inject
-Nop-D
-Nop-C
-Head-Move    # 16:  ...If not, continue with loop.
-Nop-A        # 17:
-Nop-B

Copied: branches/biounit/support/config/misc/Parasites/parasite-smt.org (from rev 3558, branches/parasites/support/config/misc/Parasites/parasite-smt.org)
===================================================================
--- branches/biounit/support/config/misc/Parasites/parasite-smt.org	                        (rev 0)
+++ branches/biounit/support/config/misc/Parasites/parasite-smt.org	2009-12-16 16:01:42 UTC (rev 3559)
@@ -0,0 +1,36 @@
+Search       #  1:  Find organism end.
+Nop-C        #  2:  - Match CD:AB
+Nop-D
+Push-Prev    #  5:  Move end position to Stack-A
+SetMemory    #  6:  Place FLOW-head in memory space for offspring
+Nop-D
+Nop-A
+Head-Move    #  7:  Move Write head to flow head position
+Nop-C        #  8:
+Nop-C
+Nop-C        #  8:
+Nop-C #IO
+Nop-C      #  8:
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C #IO
+Nop-C        #  8:
+Nop-C
+Nop-C        #  8:
+Nop-C #Val-Nand
+Nop-C
+Nop-C        #  8:
+Nop-C        #  8:
+Nop-C
+Search       #  9:  Drop flow head at start of copy loop
+Inst-Read    # 10:
+Inst-Write   # 11: 
+Head-Push    # 12:  Get current position of...
+Nop-C        # 13:  - Read-Head
+If-Equal     # 14:  Test if we are done copying...
+Inject
+Nop-D
+Nop-C
+Head-Move    # 16:  ...If not, continue with loop.
+Nop-A        # 17:
+Nop-B

Modified: branches/biounit/tests/default_transsmt_100u/test_list
===================================================================
--- branches/biounit/tests/default_transsmt_100u/test_list	2009-12-16 15:51:37 UTC (rev 3558)
+++ branches/biounit/tests/default_transsmt_100u/test_list	2009-12-16 16:01:42 UTC (rev 3559)
@@ -12,7 +12,7 @@
 email = brysonda at egr.msu.edu ; Email address for the test's creator
 
 [consistency]
-enabled = yes            ; Is this test a consistency test?
+enabled = no            ; Is this test a consistency test?
 long = no                ; Is this test a long test?
 
 [performance]




More information about the Avida-cvs mailing list