[Avida-SVN] r3229 - in branches/goings: source/cpu support/config

goingssh at myxo.css.msu.edu goingssh at myxo.css.msu.edu
Wed May 6 19:30:42 PDT 2009


Author: goingssh
Date: 2009-05-06 22:30:42 -0400 (Wed, 06 May 2009)
New Revision: 3229

Modified:
   branches/goings/source/cpu/cHardwareBase.cc
   branches/goings/support/config/analyze.cfg
   branches/goings/support/config/environment.cfg
Log:


Modified: branches/goings/source/cpu/cHardwareBase.cc
===================================================================
--- branches/goings/source/cpu/cHardwareBase.cc	2009-05-05 01:44:46 UTC (rev 3228)
+++ branches/goings/source/cpu/cHardwareBase.cc	2009-05-07 02:30:42 UTC (rev 3229)
@@ -533,7 +533,7 @@
       }
 	  // check if child has lost any tasks parent had AND not gained any new tasks
 	  if (ctx.GetRandom().P(m_organism->GetRevertTaskLoss())) {
-	    const tArray<int>& childtasks = test_info.GetTestPhenotype().GetCurTaskCount();
+	    const tArray<int>& childtasks = test_info.GetTestPhenotype().GetLastTaskCount();
 	    bool del = false;
 	    bool added = false;
 	    for (int i=0; i<childtasks.GetSize(); i++)
@@ -541,9 +541,10 @@
 		added = true;
 		break;
 	      }
-	      else if (childtasks[i] < parenttasks[i])
+	      else if (childtasks[i] < parenttasks[i]) {
 		del = true;
-	    revert = (del && !added);
+	      }
+	    revert = (del & !added);
 	  }
       
       // Ideally, we won't have reversions and sterilizations turned on at the
@@ -619,7 +620,7 @@
   }
   // check if child has lost any tasks parent had AND not gained any new tasks
   if (ctx.GetRandom().P(m_organism->GetRevertTaskLoss())) {
-	  const tArray<int>& childtasks = test_info.GetTestPhenotype().GetCurTaskCount();
+	  const tArray<int>& childtasks = test_info.GetTestPhenotype().GetLastTaskCount();
 	  bool del = false;
 	  bool added = false;
 	  for (int i=0; i<childtasks.GetSize(); i++)
@@ -627,9 +628,10 @@
 			  added = true;
 			  break;
 		  }
-		  else if (childtasks[i] < parenttasks[i])
+		  else if (childtasks[i] < parenttasks[i]) {
 			  del = true;
-	  revert = (del && !added);
+		  }
+	  revert = (del & !added);
   }
  
   // Ideally, we won't have reversions and sterilizations turned on at the

Modified: branches/goings/support/config/analyze.cfg
===================================================================
--- branches/goings/support/config/analyze.cfg	2009-05-05 01:44:46 UTC (rev 3228)
+++ branches/goings/support/config/analyze.cfg	2009-05-07 02:30:42 UTC (rev 3229)
@@ -8,8 +8,8 @@
 #
 #############################################################################
 
-LOAD data2/detail-1000.pop
-LOAD data2/historic-1000.pop
+LOAD data/detail-4000.pop
+LOAD data/historic-4000.pop
 
     FIND_LINEAGE 
     RECALCULATE

Modified: branches/goings/support/config/environment.cfg
===================================================================
--- branches/goings/support/config/environment.cfg	2009-05-05 01:44:46 UTC (rev 3228)
+++ branches/goings/support/config/environment.cfg	2009-05-07 02:30:42 UTC (rev 3229)
@@ -4,20 +4,37 @@
 # 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.
+# This environmental setup is that of a chemostat with 9 resources, each
+# with a unique task corresponding to them.  All resources have a set inflow
+# of 100, and outflow rate of 0.01, setting their an equilibrium level at
+# 10,000.  Given a maximum population size of 3600 and neighborhood size of
+# 9, the fraction of the resource absorbable in each reaction is simply
+# 9/3600 or 0.0025.
 #
+# Bonus value and type correspond with those in the default environment.cfg;
+# likewise, tasks are rewarded only once.
+#
 # 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=1.0:type=pow  requisite:max_count=1
-REACTION  NAND nand  process:value=1.0:type=pow  requisite:max_count=1
-REACTION  AND  and   process:value=2.0:type=pow  requisite:max_count=1
-REACTION  ORN  orn   process:value=2.0:type=pow  requisite:max_count=1
-REACTION  OR   or    process:value=3.0:type=pow  requisite:max_count=1
-REACTION  ANDN andn  process:value=3.0:type=pow  requisite:max_count=1
-REACTION  NOR  nor   process:value=4.0:type=pow  requisite:max_count=1
-REACTION  XOR  xor   process:value=4.0:type=pow  requisite:max_count=1
-REACTION  EQU  equ   process:value=5.0:type=pow  requisite:max_count=1
+RESOURCE  resNOT:inflow=100:outflow=0.01   
+RESOURCE  resNAND:inflow=100:outflow=0.01
+RESOURCE  resAND:inflow=100:outflow=0.01   
+RESOURCE  resORN:inflow=100:outflow=0.01
+RESOURCE  resOR:inflow=100:outflow=0.01    
+RESOURCE  resANDN:inflow=100:outflow=0.01
+RESOURCE  resNOR:inflow=100:outflow=0.01   
+RESOURCE  resXOR:inflow=100:outflow=0.01
+RESOURCE  resEQU:inflow=100:outflow=0.01
+
+REACTION  NOT  not   process:resource=resNOT:value=1.0:type=pow:frac=0.0025:max=1   requisite:max_count=1
+REACTION  NAND nand  process:resource=resNAND:value=1.0:type=pow:frac=0.0025:max=1  requisite:max_count=1
+REACTION  AND  and   process:resource=resAND:value=2.0:type=pow:frac=0.0025:max=1   requisite:max_count=1
+REACTION  ORN  orn   process:resource=resORN:value=2.0:type=pow:frac=0.0025:max=1   requisite:max_count=1
+REACTION  OR   or    process:resource=resOR:value=3.0:type=pow:frac=0.0025:max=1    requisite:max_count=1
+REACTION  ANDN andn  process:resource=resANDN:value=3.0:type=pow:frac=0.0025:max=1  requisite:max_count=1
+REACTION  NOR  nor   process:resource=resNOR:value=4.0:type=pow:frac=0.0025:max=1   requisite:max_count=1
+REACTION  XOR  xor   process:resource=resXOR:value=4.0:type=pow:frac=0.0025:max=1   requisite:max_count=1
+REACTION  EQU  equ   process:resource=resEQU:value=5.0:type=pow:frac=0.0025:max=1   requisite:max_count=1




More information about the Avida-cvs mailing list