[Avida-SVN] r2230 - / branches/matt/FuncOverlap/source/analyze branches/matt/FuncOverlap/source/main branches/matt/FuncOverlap/source/tools development/source/analyze extras/source/testsuites extras/source/tools

kaben at myxo.css.msu.edu kaben at myxo.css.msu.edu
Wed Dec 19 12:28:31 PST 2007


Author: kaben
Date: 2007-12-19 15:28:31 -0500 (Wed, 19 Dec 2007)
New Revision: 2230

Added:
   extras/source/testsuites/nAnalyzeTestFixture.cpp
   extras/source/testsuites/nTreeStats.cpp
   extras/source/tools/cAnalyzeTestFixture.cpp
   extras/source/tools/cAnalyzeTestFixture.h
Modified:
   /
   branches/matt/FuncOverlap/source/analyze/cAnalyze.cc
   branches/matt/FuncOverlap/source/analyze/cAnalyze.h
   branches/matt/FuncOverlap/source/main/avida.cc
   branches/matt/FuncOverlap/source/main/avida.h
   branches/matt/FuncOverlap/source/tools/cRandom.h
   development/source/analyze/cAnalyze.cc
   development/source/analyze/cAnalyze.h
   extras/source/testsuites/nAGenotype.cpp
   extras/source/testsuites/nAnalyze.cpp
   extras/source/testsuites/nAnalyzeGenotype.cpp
   extras/source/testsuites/nChangeList.cpp
   extras/source/testsuites/nConsoleCatcher.cpp
   extras/source/testsuites/nDataEntry.cpp
   extras/source/testsuites/nDataFile.cpp
   extras/source/testsuites/nFile.cpp
   extras/source/testsuites/nFixedCoords.cpp
   extras/source/testsuites/nInitFile.cpp
   extras/source/testsuites/nMemTracker.cpp
   extras/source/testsuites/nRandom.cpp
   extras/source/testsuites/nString.cpp
   extras/source/testsuites/nStringList.cpp
   extras/source/testsuites/nTemplate.cpp
   extras/source/testsuites/nTestDriver.cpp
   extras/source/testsuites/nTestLib.cpp
   extras/source/testsuites/nTestSettings.cpp
Log:
 r2228 at vallista:  kaben | 2007-11-14 19:28:11 -0800
 Refactored to add cAnalyzeTestFixture and associated unit tests.



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - 079b078a-dbed-46b9-b3da-37668d4295ca:/avida/xcode-test:1653
c457ea80-0a68-11dc-9323-a45eea2efad5:/private:2191
   + 079b078a-dbed-46b9-b3da-37668d4295ca:/avida/xcode-test:1653
c457ea80-0a68-11dc-9323-a45eea2efad5:/private:2228

Modified: branches/matt/FuncOverlap/source/analyze/cAnalyze.cc
===================================================================
--- branches/matt/FuncOverlap/source/analyze/cAnalyze.cc	2007-12-19 20:23:02 UTC (rev 2229)
+++ branches/matt/FuncOverlap/source/analyze/cAnalyze.cc	2007-12-19 20:28:31 UTC (rev 2230)
@@ -7544,7 +7544,7 @@
 
 
 /*
- kgn at FIXME
+ FIXME at kgn
  Must categorize COMPETE command.
  */
 /* Arguments to COMPETE: */
@@ -7612,7 +7612,7 @@
   cCPUTestInfo test_info;
   
   /*
-   kgn at FIXME
+   FIXME at kgn
    This should be settable by an optional argument.
    */
   test_info.UseRandomInputs(true); 
@@ -7623,13 +7623,13 @@
     genotype->Recalculate(m_world->GetDefaultContext(), &test_info, NULL);
     if(genotype->GetViable()){
       /*
-       kgn at FIXME
+       FIXME at kgn
        - HACK : multiplication by 1000 because merits less than 1 are truncated
        to zero.
        */
       fitness_array[array_pos] = genotype->GetFitness() * 1000.;
       /*
-       kgn at FIXME
+       FIXME at kgn
        - Need to note somewhere that we are using first descendent of the
        parent, if the parent is viable, so that genome of first descendent may
        differ from that of parent.

Modified: branches/matt/FuncOverlap/source/analyze/cAnalyze.h
===================================================================
--- branches/matt/FuncOverlap/source/analyze/cAnalyze.h	2007-12-19 20:23:02 UTC (rev 2229)
+++ branches/matt/FuncOverlap/source/analyze/cAnalyze.h	2007-12-19 20:28:31 UTC (rev 2230)
@@ -84,7 +84,9 @@
 #if USE_tMemTrack
   tMemTrack<cAnalyze> mt;
 #endif
-private:
+// FIXME at kaben : must switch back to private. 3 Nov 2007.
+public:
+//private:
   int cur_batch;
 
   /*

Modified: branches/matt/FuncOverlap/source/main/avida.cc
===================================================================
--- branches/matt/FuncOverlap/source/main/avida.cc	2007-12-19 20:23:02 UTC (rev 2229)
+++ branches/matt/FuncOverlap/source/main/avida.cc	2007-12-19 20:28:31 UTC (rev 2230)
@@ -29,6 +29,7 @@
 #include "cAvidaConfig.h"
 #include "cDriverManager.h"
 #include "cString.h"
+#include "cStringIterator.h"
 #include "tDictionary.h"
 
 
@@ -119,14 +120,19 @@
   cout << "----------------------------------------------------------------------" << endl << endl;
 }
 
-
-void ProcessCmdLineArgs(int argc, char* argv[], cAvidaConfig* cfg)
+void ProcessArgs(cStringList &argv, cAvidaConfig* cfg)
 {
+  int argc = argv.GetSize();
   int arg_num = 1;              // Argument number being looked at.
   
   // Load all of the args into string objects for ease of access.
   cString* args = new cString[argc];
-  for (int i = 0; i < argc; i++) args[i] = argv[i];
+  //for (int i = 0; i < argc; i++) args[i] = argv[i];
+  cStringIterator list_it(argv);
+  for (int i = 0; (i < argc) && (list_it.AtEnd() == false); i++) {
+    list_it.Next();
+    args[i] = list_it.Get();
+  }
   
   cString config_filename = "avida.cfg";
   bool crash_if_not_found = false;
@@ -275,6 +281,14 @@
   
 }
 
+void ProcessCmdLineArgs(int argc, char* argv[], cAvidaConfig* cfg)
+{
+  cStringList sl;
+  for(int i=0; i<argc; i++){
+    sl.PushRear(argv[i]);
+  }
+  ProcessArgs(sl, cfg);
+}
 
 void Exit(int exit_code)
 {

Modified: branches/matt/FuncOverlap/source/main/avida.h
===================================================================
--- branches/matt/FuncOverlap/source/main/avida.h	2007-12-19 20:23:02 UTC (rev 2229)
+++ branches/matt/FuncOverlap/source/main/avida.h	2007-12-19 20:28:31 UTC (rev 2230)
@@ -28,13 +28,14 @@
 
 class cAvidaConfig;
 class cString;
+class cStringList;
 
-
 namespace Avida
 {
   cString GetVersion();
   void PrintVersionBanner();
   
+  void ProcessArgs(cStringList &argv, cAvidaConfig* cfg);
   void ProcessCmdLineArgs(int argc, char* argv[], cAvidaConfig* cfg);
 
   //! This function properly shuts down the Avida program.

Modified: branches/matt/FuncOverlap/source/tools/cRandom.h
===================================================================
--- branches/matt/FuncOverlap/source/tools/cRandom.h	2007-12-19 20:23:02 UTC (rev 2229)
+++ branches/matt/FuncOverlap/source/tools/cRandom.h	2007-12-19 20:28:31 UTC (rev 2230)
@@ -36,7 +36,9 @@
 #if USE_tMemTrack
   tMemTrack<cRandom> mt;
 #endif
-protected:
+// FIXME at kaben : must switch back to protected. 3 Nov 2007.
+public:
+//protected:
   // Internal members
   int seed;
   int original_seed;

Modified: development/source/analyze/cAnalyze.cc
===================================================================

Modified: development/source/analyze/cAnalyze.h
===================================================================

Modified: extras/source/testsuites/nAGenotype.cpp
===================================================================
--- extras/source/testsuites/nAGenotype.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nAGenotype.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nAGenotype.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cAnalyzeGenotype.h"
 
 #include "cTestLib.h"

Modified: extras/source/testsuites/nAnalyze.cpp
===================================================================
--- extras/source/testsuites/nAnalyze.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nAnalyze.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,26 @@
+/*
+ *  nAnalyze.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
 
 #include "cAnalyze.h"
 
@@ -3817,6 +3840,8 @@
     cout << "XXX This is a test demo. It needs filling-in. @kgn" << endl;
   cAddTestSuite t("cAnalyze_UnitTest_cAvidaConfigDestruction", testsuite);
 }
+  cAddTestSuite t("cAnalyze_UnitTest_cAvidaConfigDestruction", testsuite);
+}
 
     char * argv[] = {
       "cAnalyze_UnitTest_Destructor",

Modified: extras/source/testsuites/nAnalyzeGenotype.cpp
===================================================================
--- extras/source/testsuites/nAnalyzeGenotype.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nAnalyzeGenotype.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nAnalyzeGenotype.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cAnalyzeGenotype.h"
 
 #include "Avida.h"

Added: extras/source/testsuites/nAnalyzeTestFixture.cpp
===================================================================
--- extras/source/testsuites/nAnalyzeTestFixture.cpp	                        (rev 0)
+++ extras/source/testsuites/nAnalyzeTestFixture.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -0,0 +1,654 @@
+/*
+ *  nAnalyzeTestFixture.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.14.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#include "cAnalyzeTestFixture.h"
+
+#include "avida.h"
+#include "cAvidaConfig.h"
+#include "cAnalyzeTestFixture.h"
+#include "cConsoleCatcher.h"
+#include "cDefaultAnalyzeDriver.h"
+#include "cDriverManager.h"
+#include "cMemTracker.h"
+#if ENABLE_SERIALIZATION
+#  include "cXMLArchive.h"
+#endif // ENABLE_SERIALIZATION
+#include "cWorld.h"
+
+#if USE_tMemTrack
+# ifndef tMemTrack_h
+#  include "tMemTrack.h"
+# endif
+#endif
+
+
+#include <iostream>
+#include <fstream>
+
+#include <assert.h>
+
+using namespace std;
+
+namespace nAnalyzeTestFixture {
+  void GenerateStandardCfgs(const cString &avida_cfg_filename, const cString &analyze_cfg_filename){
+    std::ofstream avida_cfg_file(avida_cfg_filename);
+
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "# This file includes all the basic run-time defines for Avida." << endl;
+    avida_cfg_file << "# For more information, see doc/config.html" << endl;
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "VERSION_ID 2.7.0   # Do not change this value." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GENERAL_GROUP ###" << endl;
+    avida_cfg_file << "# General Settings" << endl;
+    avida_cfg_file << "ANALYZE_MODE 0  # 0 = Disabled" << endl;
+    avida_cfg_file << "                # 1 = Enabled" << endl;
+    avida_cfg_file << "                # 2 = Interactive" << endl;
+    avida_cfg_file << "VIEW_MODE 1     # Initial viewer screen" << endl;
+    avida_cfg_file << "CLONE_FILE -    # Clone file to load" << endl;
+    avida_cfg_file << "VERBOSITY 1     # 0 = No output at all" << endl;
+    avida_cfg_file << "                # 1=Normal output" << endl;
+    avida_cfg_file << "                # 2 = Verbose output, detailing progress" << endl;
+    avida_cfg_file << "                # 3 = High level of details, as available" << endl;
+    avida_cfg_file << "                # 4 = Print Debug Information, as applicable" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ARCH_GROUP ###" << endl;
+    avida_cfg_file << "# Architecture Variables" << endl;
+    avida_cfg_file << "WORLD_X 60        # Width of the Avida world" << endl;
+    avida_cfg_file << "WORLD_Y 60        # Height of the Avida world" << endl;
+    avida_cfg_file << "WORLD_GEOMETRY 2  # 1 = Bounded Grid" << endl;
+    avida_cfg_file << "                  # 2 = Torus" << endl;
+    avida_cfg_file << "                  # 3 = Clique" << endl;
+    avida_cfg_file << "RANDOM_SEED 0     # Random number seed (0 for based on time)" << endl;
+    avida_cfg_file << "HARDWARE_TYPE 0   # 0 = Original CPUs" << endl;
+    avida_cfg_file << "                  # 1 = New SMT CPUs" << endl;
+    avida_cfg_file << "                  # 2 = Transitional SMT" << endl;
+    avida_cfg_file << "                  # 3 = Experimental CPU" << endl;
+    avida_cfg_file << "                  # 4 = Gene Expression CPU" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### CONFIG_FILE_GROUP ###" << endl;
+    avida_cfg_file << "# Configuration Files" << endl;
+    avida_cfg_file << "DATA_DIR data                       # Directory in which config files are found" << endl;
+    avida_cfg_file << "INST_SET -                          # File containing instruction set" << endl;
+    avida_cfg_file << "INST_SET_FORMAT 0                   # Instruction set file format." << endl;
+    avida_cfg_file << "                                    # 0 = Default" << endl;
+    avida_cfg_file << "                                    # 1 = New Style" << endl;
+    avida_cfg_file << "EVENT_FILE events.cfg               # File containing list of events during run" << endl;
+    avida_cfg_file << "ANALYZE_FILE analyze.cfg            # File used for analysis mode" << endl;
+    avida_cfg_file << "ENVIRONMENT_FILE environment.cfg    # File that describes the environment" << endl;
+    avida_cfg_file << "START_CREATURE default-classic.org  # Organism to seed the soup" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### DEME_GROUP ###" << endl;
+    avida_cfg_file << "# Demes and Germlines" << endl;
+    avida_cfg_file << "NUM_DEMES 1                  # Number of independent groups in the population." << endl;
+    avida_cfg_file << "DEMES_USE_GERMLINE 0         # Whether demes use a distinct germline; 0=off" << endl;
+    avida_cfg_file << "DEMES_HAVE_MERIT 0           # Whether demes have merit; 0=no" << endl;
+    avida_cfg_file << "GERMLINE_COPY_MUT 0.0075     # Prob. of copy mutations occuring during" << endl;
+    avida_cfg_file << "                             # germline replication." << endl;
+    avida_cfg_file << "GERMLINE_REPLACES_SOURCE 0   # Whether the source germline is updated" << endl;
+    avida_cfg_file << "                             # on replication; 0=no." << endl;
+    avida_cfg_file << "GERMLINE_RANDOM_PLACEMENT 0  # Defines how the seed for a germline is placed" << endl;
+    avida_cfg_file << "                             #  within the deme;" << endl;
+    avida_cfg_file << "                             # 0 = organisms is placed in center of deme, no orientation" << endl;
+    avida_cfg_file << "                             # 1 = organisms is placed in center of deme and oriented" << endl;
+    avida_cfg_file << "                             # 2 = organism is randomly placed in deme, no orientation" << endl;
+    avida_cfg_file << "MAX_DEME_AGE 500             # The maximum age of a deme (in updates) to be" << endl;
+    avida_cfg_file << "                             # used for age-based replication (default=500)." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### REPRODUCTION_GROUP ###" << endl;
+    avida_cfg_file << "# Birth and Death" << endl;
+    avida_cfg_file << "BIRTH_METHOD 0            # Which organism should be replaced on birth?" << endl;
+    avida_cfg_file << "                          # 0 = Random organism in neighborhood" << endl;
+    avida_cfg_file << "                          # 1 = Oldest in neighborhood" << endl;
+    avida_cfg_file << "                          # 2 = Largest Age/Merit in neighborhood" << endl;
+    avida_cfg_file << "                          # 3 = None (use only empty cells in neighborhood)" << endl;
+    avida_cfg_file << "                          # 4 = Random from population (Mass Action)" << endl;
+    avida_cfg_file << "                          # 5 = Oldest in entire population" << endl;
+    avida_cfg_file << "                          # 6 = Random within deme" << endl;
+    avida_cfg_file << "                          # 7 = Organism faced by parent" << endl;
+    avida_cfg_file << "                          # 8 = Next grid cell (id+1)" << endl;
+    avida_cfg_file << "                          # 9 = Largest energy used in entire population" << endl;
+    avida_cfg_file << "                          # 10 = Largest energy used in neighborhood" << endl;
+    avida_cfg_file << "PREFER_EMPTY 1            # Give empty cells preference in offsping placement?" << endl;
+    avida_cfg_file << "ALLOW_PARENT 1            # Allow births to replace the parent organism?" << endl;
+    avida_cfg_file << "DEATH_METHOD 2            # 0 = Never die of old age." << endl;
+    avida_cfg_file << "                          # 1 = Die when inst executed = AGE_LIMIT (+deviation)" << endl;
+    avida_cfg_file << "                          # 2 = Die when inst executed = length*AGE_LIMIT (+dev)" << endl;
+    avida_cfg_file << "AGE_LIMIT 20              # Modifies DEATH_METHOD" << endl;
+    avida_cfg_file << "AGE_DEVIATION 0           # Creates a distribution around AGE_LIMIT" << endl;
+    avida_cfg_file << "ALLOC_METHOD 0            # (Orignal CPU Only)" << endl;
+    avida_cfg_file << "                          # 0 = Allocated space is set to default instruction." << endl;
+    avida_cfg_file << "                          # 1 = Set to section of dead genome (Necrophilia)" << endl;
+    avida_cfg_file << "                          # 2 = Allocated space is set to random instruction." << endl;
+    avida_cfg_file << "DIVIDE_METHOD 1           # 0 = Divide leaves state of mother untouched." << endl;
+    avida_cfg_file << "                          # 1 = Divide resets state of mother" << endl;
+    avida_cfg_file << "                          #     (after the divide, we have 2 children)" << endl;
+    avida_cfg_file << "                          # 2 = Divide resets state of current thread only" << endl;
+    avida_cfg_file << "                          #     (does not touch possible parasite threads)" << endl;
+    avida_cfg_file << "INJECT_METHOD 0           # 0 = Leaves the parasite thread state untouched." << endl;
+    avida_cfg_file << "                          # 1 = Resets the calling thread state on inject" << endl;
+    avida_cfg_file << "GENERATION_INC_METHOD 1   # 0 = Only the generation of the child is" << endl;
+    avida_cfg_file << "                          #     increased on divide." << endl;
+    avida_cfg_file << "                          # 1 = Both the generation of the mother and child are" << endl;
+    avida_cfg_file << "                          #     increased on divide (good with DIVIDE_METHOD 1)." << endl;
+    avida_cfg_file << "RESET_INPUTS_ON_DIVIDE 0  # Reset environment inputs of parent upon successful divide." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### RECOMBINATION_GROUP ###" << endl;
+    avida_cfg_file << "# Sexual Recombination and Modularity" << endl;
+    avida_cfg_file << "RECOMBINATION_PROB 1.0  # probability of recombination in div-sex" << endl;
+    avida_cfg_file << "MAX_BIRTH_WAIT_TIME -1  # Updates incipiant orgs can wait for crossover" << endl;
+    avida_cfg_file << "MODULE_NUM 0            # number of modules in the genome" << endl;
+    avida_cfg_file << "CONT_REC_REGS 1         # are (modular) recombination regions continuous" << endl;
+    avida_cfg_file << "CORESPOND_REC_REGS 1    # are (modular) recombination regions swapped randomly" << endl;
+    avida_cfg_file << "                        #  or with corresponding positions?" << endl;
+    avida_cfg_file << "TWO_FOLD_COST_SEX 0     # 1 = only one recombined offspring is born." << endl;
+    avida_cfg_file << "                        # 2 = both offspring are born" << endl;
+    avida_cfg_file << "SAME_LENGTH_SEX 0       # 0 = recombine with any genome" << endl;
+    avida_cfg_file << "                        # 1 = only recombine w/ same length" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### DIVIDE_GROUP ###" << endl;
+    avida_cfg_file << "# Divide Restrictions" << endl;
+    avida_cfg_file << "CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes." << endl;
+    avida_cfg_file << "MIN_COPIED_LINES 0.5         # Code fraction which must be copied before divide." << endl;
+    avida_cfg_file << "MIN_EXE_LINES 0.5            # Code fraction which must be executed before divide." << endl;
+    avida_cfg_file << "REQUIRE_ALLOCATE 1           # (Original CPU Only) Require allocate before divide?" << endl;
+    avida_cfg_file << "REQUIRED_TASK -1             # Task ID required for successful divide." << endl;
+    avida_cfg_file << "IMMUNITY_TASK -1             # Task providing immunity from the required task." << endl;
+    avida_cfg_file << "REQUIRED_REACTION -1         # Reaction ID required for successful divide." << endl;
+    avida_cfg_file << "REQUIRED_BONUS 0.0           # Required bonus to divide." << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_BONUS 0       # Call Inst_Repro to divide upon achieving this bonus. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_CPU_CYCLES 0  # Call Inst_Repro after this many cpu cycles. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_TIME 0        # Call Inst_Repro after this time used. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_END 0         # Call Inst_Repro after executing the last instruction in the genome." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### MUTATION_GROUP ###" << endl;
+    avida_cfg_file << "# Mutations" << endl;
+    avida_cfg_file << "POINT_MUT_PROB 0.0    # Mutation rate (per-location per update)" << endl;
+    avida_cfg_file << "COPY_MUT_PROB 0.0075  # Mutation rate (per copy)" << endl;
+    avida_cfg_file << "COPY_SLIP_PROB 0.0    # Slip rate (per copy)" << endl;
+    avida_cfg_file << "INS_MUT_PROB 0.0      # Insertion rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "DEL_MUT_PROB 0.0      # Deletion rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "DIV_MUT_PROB 0.0      # Mutation rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "UNIFORM_MUT_PROB 0.0  # Uniform mutation probability (per site, applied on divide)" << endl;
+    avida_cfg_file << "                      # - Randomly applies any of the three classes of mutations (ins, del, point)." << endl;
+    avida_cfg_file << "DIVIDE_MUT_PROB 0.0   # Mutation rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_INS_PROB 0.05  # Insertion rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_DEL_PROB 0.05  # Deletion rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_SLIP_PROB 0.0  # Slip rate (per divide) - creates large deletions/duplications" << endl;
+    avida_cfg_file << "SLIP_FILL_MODE 0      # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled" << endl;
+    avida_cfg_file << "PARENT_MUT_PROB 0.0   # Per-site, in parent, on divide" << endl;
+    avida_cfg_file << "SPECIAL_MUT_LINE -1   # If this is >= 0, ONLY this line is mutated" << endl;
+    avida_cfg_file << "INJECT_INS_PROB 0.0   # Insertion rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "INJECT_DEL_PROB 0.0   # Deletion rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "INJECT_MUT_PROB 0.0   # Mutation rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "META_COPY_MUT 0.0     # Prob. of copy mutation rate changing (per gen)" << endl;
+    avida_cfg_file << "META_STD_DEV 0.0      # Standard deviation of meta mutation size." << endl;
+    avida_cfg_file << "MUT_RATE_SOURCE 1     # 1 = Mutation rates determined by environment." << endl;
+    avida_cfg_file << "                      # 2 = Mutation rates inherited from parent." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### REVERSION_GROUP ###" << endl;
+    avida_cfg_file << "# Mutation Reversion" << endl;
+    avida_cfg_file << "# These slow down avida a lot, and should be set to 0.0 normally." << endl;
+    avida_cfg_file << "REVERT_FATAL 0.0           # Should any mutations be reverted on birth?" << endl;
+    avida_cfg_file << "REVERT_DETRIMENTAL 0.0     #   0.0 to 1.0; Probability of reversion." << endl;
+    avida_cfg_file << "REVERT_NEUTRAL 0.0         # " << endl;
+    avida_cfg_file << "REVERT_BENEFICIAL 0.0      # " << endl;
+    avida_cfg_file << "STERILIZE_FATAL 0.0        # Should any mutations clear (kill) the organism?" << endl;
+    avida_cfg_file << "STERILIZE_DETRIMENTAL 0.0  # " << endl;
+    avida_cfg_file << "STERILIZE_NEUTRAL 0.0      # " << endl;
+    avida_cfg_file << "STERILIZE_BENEFICIAL 0.0   # " << endl;
+    avida_cfg_file << "FAIL_IMPLICIT 0            # Should copies that failed *not* due to mutations" << endl;
+    avida_cfg_file << "                           # be eliminated?" << endl;
+    avida_cfg_file << "NEUTRAL_MAX 0.0            # The percent benifical change from parent fitness" << endl;
+    avida_cfg_file << "                           # to be considered neutral." << endl;
+    avida_cfg_file << "NEUTRAL_MIN 0.0            # The percent deleterious change from parent fitness" << endl;
+    avida_cfg_file << "                           # to be considered neutral." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### TIME_GROUP ###" << endl;
+    avida_cfg_file << "# Time Slicing" << endl;
+    avida_cfg_file << "AVE_TIME_SLICE 30           # Ave number of insts per org per update" << endl;
+    avida_cfg_file << "SLICING_METHOD 1            # 0 = CONSTANT: all organisms get default..." << endl;
+    avida_cfg_file << "                            # 1 = PROBABILISTIC: Run _prob_ proportional to merit." << endl;
+    avida_cfg_file << "                            # 2 = INTEGRATED: Perfectly integrated deterministic." << endl;
+    avida_cfg_file << "BASE_MERIT_METHOD 4         # 0 = Constant (merit independent of size)" << endl;
+    avida_cfg_file << "                            # 1 = Merit proportional to copied size" << endl;
+    avida_cfg_file << "                            # 2 = Merit prop. to executed size" << endl;
+    avida_cfg_file << "                            # 3 = Merit prop. to full size" << endl;
+    avida_cfg_file << "                            # 4 = Merit prop. to min of executed or copied size" << endl;
+    avida_cfg_file << "                            # 5 = Merit prop. to sqrt of the minimum size" << endl;
+    avida_cfg_file << "                            # 6 = Merit prop. to num times MERIT_BONUS_INST is in genome." << endl;
+    avida_cfg_file << "BASE_CONST_MERIT 100        # Base merit when BASE_MERIT_METHOD set to 0" << endl;
+    avida_cfg_file << "DEFAULT_BONUS 1.0           # Initial bonus before any tasks" << endl;
+    avida_cfg_file << "MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by this default bonus" << endl;
+    avida_cfg_file << "                            # rather than the accumulated bonus of the parent? 0 = off" << endl;
+    avida_cfg_file << "MERIT_BONUS_INST 0          # in BASE_MERIT_METHOD 6, this sets which instruction counts" << endl;
+    avida_cfg_file << "                            # (-1 = none, 0 = First in INST_SET.)" << endl;
+    avida_cfg_file << "MERIT_BONUS_EFFECT 0        # in BASE_MERIT_METHOD 6, this sets how much merit is earned" << endl;
+    avida_cfg_file << "                            # per instruction (-1 = penalty, 0 = no effect.)" << endl;
+    avida_cfg_file << "FITNESS_METHOD 0            # 0 = default, >1 = experimental" << endl;
+    avida_cfg_file << "FITNESS_COEFF 1.0           # A FITNESS_METHOD parameter" << endl;
+    avida_cfg_file << "FITNESS_VALLEY 0            # in BASE_MERIT_METHOD 6, this creates valleys from" << endl;
+    avida_cfg_file << "                            # FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # (0 = off, 1 = on)" << endl;
+    avida_cfg_file << "FITNESS_VALLEY_START 0      # if FITNESS_VALLEY = 1, orgs with num_key_instructions" << endl;
+    avida_cfg_file << "                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # get fitness 1 (lowest)" << endl;
+    avida_cfg_file << "FITNESS_VALLEY_STOP 0       # if FITNESS_VALLEY = 1, orgs with num_key_instructions" << endl;
+    avida_cfg_file << "                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # get fitness 1 (lowest)" << endl;
+    avida_cfg_file << "MAX_CPU_THREADS 1           # Number of Threads a CPU can spawn" << endl;
+    avida_cfg_file << "THREAD_SLICING_METHOD 0     # Formula for and organism's thread slicing" << endl;
+    avida_cfg_file << "                            #   (num_threads-1) * THREAD_SLICING_METHOD + 1" << endl;
+    avida_cfg_file << "                            # 0 = One thread executed per time slice." << endl;
+    avida_cfg_file << "                            # 1 = All threads executed each time slice." << endl;
+    avida_cfg_file << "NO_CPU_CYCLE_TIME 0         # Don't count each CPU cycle as part of gestation time" << endl;
+    avida_cfg_file << "MAX_LABEL_EXE_SIZE 1        # Max nops marked as executed when labels are used" << endl;
+    avida_cfg_file << "MERIT_GIVEN 0.0             # Fraction of merit donated with 'donate' command" << endl;
+    avida_cfg_file << "MERIT_RECEIVED 0.0          # Multiplier of merit given with 'donate' command" << endl;
+    avida_cfg_file << "MAX_DONATE_KIN_DIST -1      # Limit on distance of relation for donate; -1=no max" << endl;
+    avida_cfg_file << "MAX_DONATE_EDIT_DIST -1     # Limit on genetic (edit) distance for donate; -1=no max" << endl;
+    avida_cfg_file << "MIN_GB_DONATE_THRESHOLD -1  # threshold green beard donates only to orgs above this" << endl;
+    avida_cfg_file << "                            # donation attempt threshold; -1=no thresh" << endl;
+    avida_cfg_file << "DONATE_THRESH_QUANTA 10     # The size of steps between quanta donate thresholds" << endl;
+    avida_cfg_file << "MAX_DONATES 1000000         # Limit on number of donates organisms are allowed." << endl;
+    avida_cfg_file << "PRECALC_PHENOTYPE 0         # 0 = Disabled" << endl;
+    avida_cfg_file << "                            #  1 = Assign precalculated merit at birth (unlimited resources only)" << endl;
+    avida_cfg_file << "                            #  2 = Assign precalculated gestation time" << endl;
+    avida_cfg_file << "                            #  3 = Assign precalculated merit AND gestation time." << endl;
+    avida_cfg_file << "                            # Fitness will be evaluated for organism based on these settings." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GENEOLOGY_GROUP ###" << endl;
+    avida_cfg_file << "# Geneology" << endl;
+    avida_cfg_file << "TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?" << endl;
+    avida_cfg_file << "                      # 0=no, 1=yes, 2=yes,w/sexual population" << endl;
+    avida_cfg_file << "THRESHOLD 3           # Number of organisms in a genotype needed for it" << endl;
+    avida_cfg_file << "                      #   to be considered viable." << endl;
+    avida_cfg_file << "GENOTYPE_PRINT 0      # 0/1 (off/on) Print out all threshold genotypes?" << endl;
+    avida_cfg_file << "GENOTYPE_PRINT_DOM 0  # Print out a genotype if it stays dominant for" << endl;
+    avida_cfg_file << "                      #   this many updates. (0 = off)" << endl;
+    avida_cfg_file << "SPECIES_THRESHOLD 2   # max failure count for organisms to be same species" << endl;
+    avida_cfg_file << "SPECIES_RECORDING 0   # 1 = full, 2 = limited search (parent only)" << endl;
+    avida_cfg_file << "SPECIES_PRINT 0       # 0/1 (off/on) Print out all species?" << endl;
+    avida_cfg_file << "TEST_CPU_TIME_MOD 20  # Time allocated in test CPUs (multiple of length)" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### LOG_GROUP ###" << endl;
+    avida_cfg_file << "# Log Files" << endl;
+    avida_cfg_file << "LOG_CREATURES 0  # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "LOG_GENOTYPES 0  # 0 = off, 1 = print ALL, 2 = print threshold ONLY." << endl;
+    avida_cfg_file << "LOG_THRESHOLD 0  # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "LOG_SPECIES 0    # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### LINEAGE_GROUP ###" << endl;
+    avida_cfg_file << "# Lineage" << endl;
+    avida_cfg_file << "# NOTE: This should probably be called \"Clade\"" << endl;
+    avida_cfg_file << "# This one can slow down avida a lot. It is used to get an idea of how" << endl;
+    avida_cfg_file << "# often an advantageous mutation arises, and where it goes afterwards." << endl;
+    avida_cfg_file << "# Lineage creation options are.  Works only when LOG_LINEAGES is set to 1." << endl;
+    avida_cfg_file << "#   0 = manual creation (on inject, use successive integers as lineage labels)." << endl;
+    avida_cfg_file << "#   1 = when a child's (potential) fitness is higher than that of its parent." << endl;
+    avida_cfg_file << "#   2 = when a child's (potential) fitness is higher than max in population." << endl;
+    avida_cfg_file << "#   3 = when a child's (potential) fitness is higher than max in dom. lineage" << endl;
+    avida_cfg_file << "# *and* the child is in the dominant lineage, or (2)" << endl;
+    avida_cfg_file << "#   4 = when a child's (potential) fitness is higher than max in dom. lineage" << endl;
+    avida_cfg_file << "# (and that of its own lineage)" << endl;
+    avida_cfg_file << "#   5 = same as child's (potential) fitness is higher than that of the" << endl;
+    avida_cfg_file << "#       currently dominant organism, and also than that of any organism" << endl;
+    avida_cfg_file << "#       currently in the same lineage." << endl;
+    avida_cfg_file << "#   6 = when a child's (potential) fitness is higher than any organism" << endl;
+    avida_cfg_file << "#       currently in the same lineage." << endl;
+    avida_cfg_file << "#   7 = when a child's (potential) fitness is higher than that of any" << endl;
+    avida_cfg_file << "#       organism in its line of descent" << endl;
+    avida_cfg_file << "LOG_LINEAGES 0             # " << endl;
+    avida_cfg_file << "LINEAGE_CREATION_METHOD 0  # " << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ORGANISM_NETWORK_GROUP ###" << endl;
+    avida_cfg_file << "# Organism Network Communication" << endl;
+    avida_cfg_file << "NET_ENABLED 0      # Enable Network Communication Support" << endl;
+    avida_cfg_file << "NET_DROP_PROB 0.0  # Message drop rate" << endl;
+    avida_cfg_file << "NET_MUT_PROB 0.0   # Message corruption probability" << endl;
+    avida_cfg_file << "NET_MUT_TYPE 0     # Type of message corruption.  0 = Random Single Bit, 1 = Always Flip Last" << endl;
+    avida_cfg_file << "NET_STYLE 0        # Communication Style.  0 = Random Next, 1 = Receiver Facing" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### BUY_SELL_GROUP ###" << endl;
+    avida_cfg_file << "# Buying and Selling Parameters" << endl;
+    avida_cfg_file << "SAVE_RECEIVED 0  # Enable storage of all inputs bought from other orgs" << endl;
+    avida_cfg_file << "BUY_PRICE 0      # price offered by organisms attempting to buy" << endl;
+    avida_cfg_file << "SELL_PRICE 0     # price offered by organisms attempting to sell" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ANALYZE_GROUP ###" << endl;
+    avida_cfg_file << "# Analysis Settings" << endl;
+    avida_cfg_file << "MAX_CONCURRENCY -1  # Maximum number of analyze threads, -1 == use all available." << endl;
+    avida_cfg_file << "ANALYZE_OPTION_1    # String variable accessible from analysis scripts" << endl;
+    avida_cfg_file << "ANALYZE_OPTION_2    # String variable accessible from analysis scripts" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ENERGY_GROUP ###" << endl;
+    avida_cfg_file << "# Energy Settings" << endl;
+    avida_cfg_file << "ENERGY_ENABLED 0                       # Enable Energy Model. 0/1 (off/on)" << endl;
+    avida_cfg_file << "ENERGY_GIVEN_ON_INJECT 0               # Energy given to organism upon injection." << endl;
+    avida_cfg_file << "ENERGY_GIVEN_AT_BIRTH 0                # Energy given to offspring upon birth." << endl;
+    avida_cfg_file << "FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH 0.5  # Fraction of perent's energy given to offspring." << endl;
+    avida_cfg_file << "FRAC_ENERGY_DECAY_AT_BIRTH 0.0         # Fraction of energy lost due to decay during reproduction." << endl;
+    avida_cfg_file << "NUM_INST_EXC_BEFORE_0_ENERGY 0         # Number of instructions executed before energy is exhausted." << endl;
+    avida_cfg_file << "ENERGY_CAP -1                          # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int" << endl;
+    avida_cfg_file << "APPLY_ENERGY_METHOD 0                  # When should rewarded energy be applied to current energy?" << endl;
+    avida_cfg_file << "                                       # 0 = on divide" << endl;
+    avida_cfg_file << "                                       # 1 = on completion of task" << endl;
+    avida_cfg_file << "                                       # 2 = on sleep" << endl;
+    avida_cfg_file << "FRAC_ENERGY_TRANSFER 0.0               # Fraction of replaced organism's energy take by new resident" << endl;
+    avida_cfg_file << "LOG_SLEEP_TIMES 0                      # Log sleep start and end times. 0/1 (off/on)" << endl;
+    avida_cfg_file << "                                       # WARNING: may use lots of memory." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### SECOND_PASS_GROUP ###" << endl;
+    avida_cfg_file << "# Tracking metrics known after the running experiment previously" << endl;
+    avida_cfg_file << "TRACK_CCLADES 0                    # Enable tracking of coalescence clades" << endl;
+    avida_cfg_file << "TRACK_CCLADES_IDS coalescence.ids  # File storing coalescence IDs" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GX_GROUP ###" << endl;
+    avida_cfg_file << "# Gene Expression CPU Settings" << endl;
+    avida_cfg_file << "MAX_PROGRAMIDS 16                # Maximum number of programids an organism can create." << endl;
+    avida_cfg_file << "MAX_PROGRAMID_AGE 2000           # Max number of CPU cycles a programid executes before it is removed." << endl;
+    avida_cfg_file << "IMPLICIT_GENE_EXPRESSION 0       # Create executable programids from the genome without explicit allocation and copying?" << endl;
+    avida_cfg_file << "IMPLICIT_BG_PROMOTER_RATE 0.0    # Relative rate of non-promoter sites creating programids." << endl;
+    avida_cfg_file << "IMPLICIT_TURNOVER_RATE 0.0       # Number of programids recycled per CPU cycle. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_MAX_PROGRAMID_LENGTH 0  # Creation of an executable programid terminates after this many instructions. 0 = disabled" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### PROMOTER_GROUP ###" << endl;
+    avida_cfg_file << "# Promoters" << endl;
+    avida_cfg_file << "PROMOTERS_ENABLED 0             # Use the promoter/terminator execution scheme." << endl;
+    avida_cfg_file << "                                # Certain instructions must also be included." << endl;
+    avida_cfg_file << "PROMOTER_INST_MAX 0             # Maximum number of instructions to execute before terminating. 0 = off" << endl;
+    avida_cfg_file << "PROMOTER_PROCESSIVITY 1.0       # Chance of not terminating after each cpu cycle." << endl;
+    avida_cfg_file << "PROMOTER_PROCESSIVITY_INST 1.0  # Chance of not terminating after each instruction." << endl;
+    avida_cfg_file << "PROMOTER_TO_REGISTER 0          # Place a promoter's base bit code in register BX when starting execution from it?" << endl;
+    avida_cfg_file << "TERMINATION_RESETS 0            # Does termination reset the thread's state?" << endl;
+    avida_cfg_file << "NO_ACTIVE_PROMOTER_EFFECT 0     # What happens when there are no active promoters?" << endl;
+    avida_cfg_file << "                                # 0 = Start execution at the beginning of the genome." << endl;
+    avida_cfg_file << "                                # 1 = Kill the organism." << endl;
+    avida_cfg_file << "                                # 2 = Stop the organism from executing any further instructions." << endl;
+    avida_cfg_file << "PROMOTER_CODE_SIZE 24           # Size of a promoter code in bits. (Maximum value is 32)" << endl;
+    avida_cfg_file << "PROMOTER_EXE_LENGTH 3           # Length of promoter windows used to determine execution." << endl;
+    avida_cfg_file << "PROMOTER_EXE_THRESHOLD 2        # Minimum number of bits that must be set in a promoter window to allow execution." << endl;
+    avida_cfg_file << "INST_CODE_LENGTH 3              # Instruction binary code length (number of bits)" << endl;
+    avida_cfg_file << "INST_CODE_DEFAULT_TYPE 0        # Default value of instruction binary code value." << endl;
+    avida_cfg_file << "                                # 0 = All zeros" << endl;
+    avida_cfg_file << "                                # 1 = Based off the instruction number" << endl;
+    avida_cfg_file << "CONSTITUTIVE_REGULATION 0       # Sense a new regulation value before each CPU cycle?" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### COLORS_GROUP ###" << endl;
+    avida_cfg_file << "# Output colors for when data files are printed in HTML mode." << endl;
+    avida_cfg_file << "# There are two sets of these; the first are for lineages," << endl;
+    avida_cfg_file << "# and the second are for mutation tests." << endl;
+    avida_cfg_file << "COLOR_DIFF CCCCFF        # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_SAME FFFFFF        # Color to flag stat that has NOT changed since parent." << endl;
+    avida_cfg_file << "COLOR_NEG2 FF0000        # Color to flag stat that is significantly worse than parent." << endl;
+    avida_cfg_file << "COLOR_NEG1 FFCCCC        # Color to flag stat that is minorly worse than parent." << endl;
+    avida_cfg_file << "COLOR_POS1 CCFFCC        # Color to flag stat that is minorly better than parent." << endl;
+    avida_cfg_file << "COLOR_POS2 00FF00        # Color to flag stat that is significantly better than parent." << endl;
+    avida_cfg_file << "COLOR_MUT_POS 00FF00     # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_NEUT FFFFFF    # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_NEG FFFF00     # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_LETHAL FF0000  # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### BIOMIMETIC_GROUP ###" << endl;
+    avida_cfg_file << "# Biomimetic Features Settings" << endl;
+    avida_cfg_file << "BIOMIMETIC_REFRACTORY_PERIOD 0.0  # Number of updates affected by refractory period" << endl;
+    avida_cfg_file << "BIOMIMETIC_MOVEMENT_STEP 0        # Number of cells to move Avidian on move instruction" << endl;
+    avida_cfg_file << "BIOMIMETIC_K 0                    # Carrying capacity in number of organisms" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file.close();
+
+    std::ofstream analyze_cfg_file(analyze_cfg_filename);
+
+    analyze_cfg_file << "#############################################################################" << endl;
+    analyze_cfg_file << "# This file is used to setup avida when it is in analysis-only mode (by" << endl;
+    analyze_cfg_file << "# running \"avida -a\".  It allows variety of methods to load organisms" << endl;
+    analyze_cfg_file << "# (specifying the type of each) and analyze them once loaded." << endl;
+    analyze_cfg_file << "#" << endl;
+    analyze_cfg_file << "# See the documentation in doc/analyze_mode.html for usage, or the file" << endl;
+    analyze_cfg_file << "# doc/analyze_samples.html for guidelines on writing programs." << endl;
+    analyze_cfg_file << "#" << endl;
+    analyze_cfg_file << "#############################################################################" << endl;
+    analyze_cfg_file << "" << endl;
+
+    analyze_cfg_file.close();
+  }
+}
+
+namespace cAnalyzeTestFixture_UnitTest_Instantiation {
+  void testsuite(){
+    cAnalyzeTestFixture atf;
+
+    /* Driver Manager is initialized ? */
+    
+    /* m_args is empty ? */
+    TEST(0 == atf.m_args.GetSize());
+    /* m_cfg is null ? */
+    TEST(0 == atf.m_cfg);
+    /* m_world is null ? */
+    TEST(0 == atf.m_world);
+    /* m_driver is null ? */
+    TEST(0 == atf.m_driver);
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_Instantiation", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_AddArgs {
+  void testsuite(){
+    cAnalyzeTestFixture atf;
+
+    /* After several AddArgs: */
+    /* m_args is complete ? */
+    /* order of m_args contents is correct ? */
+
+    /* m_args is initially empty ? */
+    TEST(0 == atf.m_args.GetSize());
+    
+    atf.AddArg("blah1");
+    TEST(1 == atf.m_args.GetSize());
+
+    atf.AddArg("blah2");
+    TEST(2 == atf.m_args.GetSize());
+
+    atf.AddArg("blah3");
+    TEST(3 == atf.m_args.GetSize());
+    
+    TEST(atf.m_args.Pop() == "blah1");
+    TEST(atf.m_args.Pop() == "blah2");
+    TEST(atf.m_args.Pop() == "blah3");
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_AddArgs", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_ResetArgs {
+  void testsuite(){
+    cAnalyzeTestFixture atf;
+
+    atf.AddArg("blah1");
+    atf.AddArg("blah2");
+    atf.AddArg("blah3");
+    
+    TEST(3 == atf.m_args.GetSize());
+
+    /* After ResetArgs, m_args is empty ? */
+    atf.ResetArgs();
+    TEST(0 == atf.m_args.GetSize());
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_ResetArgs", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_StartStop {
+  void testsuite(){
+    cAnalyzeTestFixture atf;
+
+    atf.AddArg("cAnalyze_Brainstorm_CumulativeStemminess");
+    atf.AddArg("-s");
+    atf.AddArg("100");
+
+#if USE_tMemTrack
+    cMemTracker mt;
+    REGISTER_INSTANCE_TRACKER(mt, cActionLibrary);
+    REGISTER_INSTANCE_TRACKER(mt, cAnalyze);
+    REGISTER_INSTANCE_TRACKER(mt, cAvidaConfig);
+    REGISTER_INSTANCE_TRACKER(mt, cAvidaContext);
+    REGISTER_INSTANCE_TRACKER(mt, cClassificationManager);
+    REGISTER_INSTANCE_TRACKER(mt, cDataFileManager);
+    REGISTER_INSTANCE_TRACKER(mt, cDefaultAnalyzeDriver);
+    REGISTER_INSTANCE_TRACKER(mt, cEnvironment);
+    REGISTER_INSTANCE_TRACKER(mt, cEventList);
+    REGISTER_INSTANCE_TRACKER(mt, cHardwareManager);
+    REGISTER_INSTANCE_TRACKER(mt, cPopulation);
+    REGISTER_INSTANCE_TRACKER(mt, cRandom);
+    REGISTER_INSTANCE_TRACKER(mt, cStats);
+    REGISTER_INSTANCE_TRACKER(mt, cWorld);
+    REGISTER_INSTANCE_TRACKER(mt, cWorldDriver);
+
+    mt.MarkAll();
+#endif
+
+    atf.Start();
+    
+    /* After Start: */
+    /* m_args has correct length ? */
+    TEST(3 == atf.m_args.GetSize());
+    /* m_cfg is non-null ? */
+    TEST(0 != atf.m_cfg);
+    /* m_world is non-null ? */
+    TEST(0 != atf.m_world);
+    /* m_driver is non-null ? */
+    TEST(0 != atf.m_driver);
+
+    atf.Stop();
+    
+    /*
+    After Stop:
+    */
+    /* m_args is empty ? */
+    TEST(0 == atf.m_args.GetSize());
+    /* m_cfg is null ? */
+    TEST(0 == atf.m_cfg);
+    /* m_world is null ? */
+    TEST(0 == atf.m_world);
+    /* m_driver is null ? */
+    TEST(0 == atf.m_driver);
+#if USE_tMemTrack
+    /* Verify instance counts. */
+    TEST(mt.Verify());
+    //mt.Report();
+#endif
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_StartStop", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_GetAnalyze {
+  void testsuite(){
+    cAnalyzeTestFixture atf;
+
+    /* GetAnalyze() returns null before Start() or after Stop()? */
+    TEST(0 == atf.GetAnalyze());
+    atf.Start();
+    atf.Stop();
+    TEST(0 == atf.GetAnalyze());
+
+    /* GetAnalyze() returns non-null after Start() and before Stop()? */
+    atf.Start();
+    TEST(0 != atf.GetAnalyze());
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_GetAnalyze", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_Send {
+  void testsuite(){
+    cString avida_cfg_filename("./cAnalyzeTestFixture_UnitTest_Send_avida.cfg");
+    cString analyze_cfg_filename("./cAnalyzeTestFixture_UnitTest_Send_analyze.cfg");
+    nAnalyzeTestFixture::GenerateStandardCfgs(avida_cfg_filename, analyze_cfg_filename);
+
+    cAnalyzeTestFixture atf;
+    atf.AddArg("cAnalyze_Brainstorm_GabeYedidGammaStatistic");
+    atf.AddArg("-c");
+    atf.AddArg(avida_cfg_filename);
+    atf.AddArg("-set");
+    atf.AddArg("ANALYZE_FILE");
+    atf.AddArg(analyze_cfg_filename);
+
+    cConsoleCatcher cc;
+
+    /* Before Start() or after Stop(), Send("ECHO blah") reaches console? */
+    cc.Capture(cout);
+    atf.Send("ECHO blah");
+    TEST(0 > cc.Release().Find("blah"));
+    atf.Start();
+    atf.Stop();
+    cc.Capture(cout);
+    atf.Send("ECHO blah");
+    TEST(0 > cc.Release().Find("blah"));
+
+    /* After Start() and before Stop(), Send("ECHO blah") reaches console? */
+    cc.Capture(cout);
+    atf.Start();
+    atf.Send("ECHO blah");
+    atf.Stop();
+    TEST(0 <= cc.Release().Find("blah"));
+
+    std::remove(avida_cfg_filename);
+    std::remove(analyze_cfg_filename);
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_Send", testsuite);
+}
+
+namespace cAnalyzeTestFixture_UnitTest_Destruction {
+  void testsuite(){
+    /* Verify instance counts. */
+#if USE_tMemTrack
+    cMemTracker mt;
+    REGISTER_INSTANCE_TRACKER(mt, cActionLibrary);
+    REGISTER_INSTANCE_TRACKER(mt, cAnalyze);
+    REGISTER_INSTANCE_TRACKER(mt, cAvidaConfig);
+    REGISTER_INSTANCE_TRACKER(mt, cAvidaContext);
+    REGISTER_INSTANCE_TRACKER(mt, cClassificationManager);
+    REGISTER_INSTANCE_TRACKER(mt, cDataFileManager);
+    REGISTER_INSTANCE_TRACKER(mt, cDefaultAnalyzeDriver);
+    REGISTER_INSTANCE_TRACKER(mt, cEnvironment);
+    REGISTER_INSTANCE_TRACKER(mt, cEventList);
+    REGISTER_INSTANCE_TRACKER(mt, cHardwareManager);
+    REGISTER_INSTANCE_TRACKER(mt, cPopulation);
+    REGISTER_INSTANCE_TRACKER(mt, cRandom);
+    REGISTER_INSTANCE_TRACKER(mt, cStats);
+    REGISTER_INSTANCE_TRACKER(mt, cWorld);
+    REGISTER_INSTANCE_TRACKER(mt, cWorldDriver);
+
+    mt.MarkAll();
+#endif
+
+    { cAnalyzeTestFixture atf; }
+
+#if USE_tMemTrack
+    /* Verify instance counts. */
+    TEST(mt.Verify());
+    //mt.Report();
+#endif
+  }
+  cAddTestSuite t("cAnalyzeTestFixture_UnitTest_Destruction", testsuite);
+}

Modified: extras/source/testsuites/nChangeList.cpp
===================================================================
--- extras/source/testsuites/nChangeList.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nChangeList.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nChangeList.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cChangeList.h"
 
 #include "cFile.h"

Modified: extras/source/testsuites/nConsoleCatcher.cpp
===================================================================
--- extras/source/testsuites/nConsoleCatcher.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nConsoleCatcher.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nConsoleCatcher.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cConsoleCatcher.h"
 
 #include "cTestLib.h"

Modified: extras/source/testsuites/nDataEntry.cpp
===================================================================
--- extras/source/testsuites/nDataEntry.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nDataEntry.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nDataEntry.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cDataEntry.h"
 
 #include "cTestLib.h"

Modified: extras/source/testsuites/nDataFile.cpp
===================================================================
--- extras/source/testsuites/nDataFile.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nDataFile.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nDataFile.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cDataFile.h"
 
 #include "cFile.h"

Modified: extras/source/testsuites/nFile.cpp
===================================================================
--- extras/source/testsuites/nFile.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nFile.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nFile.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cFile.h"
 
 #include "cFile.h"

Modified: extras/source/testsuites/nFixedCoords.cpp
===================================================================
--- extras/source/testsuites/nFixedCoords.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nFixedCoords.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nFixedCoords.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cFixedCoords.h"
 
 #include "cTestLib.h"

Modified: extras/source/testsuites/nInitFile.cpp
===================================================================
--- extras/source/testsuites/nInitFile.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nInitFile.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nInitFile.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cInitFile.h"
 
 #include "cFile.h"

Modified: extras/source/testsuites/nMemTracker.cpp
===================================================================
--- extras/source/testsuites/nMemTracker.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nMemTracker.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -194,4 +194,4 @@
 #endif
   }
   cAddTestSuite t("cMemTracker_UnitTest", testsuite);
-}
\ No newline at end of file
+}==== ORIGINAL VERSION extras/source/testsuites/nMemTracker.cpp 119809609638385

Modified: extras/source/testsuites/nRandom.cpp
===================================================================
--- extras/source/testsuites/nRandom.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nRandom.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nRandom.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cRandom.h"
 
 #include "cTestLib.h"

Modified: extras/source/testsuites/nString.cpp
===================================================================
--- extras/source/testsuites/nString.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nString.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nString.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cString.h"
 
 #include "cTestLib.h"
@@ -50,6 +74,8 @@
 
   void PhysicalLink(){}
 }
+  cAddTestSuite t("cString_FunctionalTest_StringManip", testsuite);
+}
 
 /* Unit tests. */
 namespace cString_FunctionalTest_StringManip {

Modified: extras/source/testsuites/nStringList.cpp
===================================================================
--- extras/source/testsuites/nStringList.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nStringList.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nStringList.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cStringList.h"
 #include "cStringIterator.h"
 

Modified: extras/source/testsuites/nTemplate.cpp
===================================================================
--- extras/source/testsuites/nTemplate.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nTemplate.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nTemplate.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cTestLib.h"
 #if ENABLE_SERIALIZATION
 #  include "cXMLArchive.h"

Modified: extras/source/testsuites/nTestDriver.cpp
===================================================================
--- extras/source/testsuites/nTestDriver.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nTestDriver.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nTestDriver.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cTestDriver.h"
 
 #include "cConsoleCatcher.h"

Modified: extras/source/testsuites/nTestLib.cpp
===================================================================
--- extras/source/testsuites/nTestLib.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nTestLib.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nTestLib.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cTestLib.h"
 
 #include <iostream>

Modified: extras/source/testsuites/nTestSettings.cpp
===================================================================
--- extras/source/testsuites/nTestSettings.cpp	2007-12-19 20:23:02 UTC (rev 2229)
+++ extras/source/testsuites/nTestSettings.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -1,3 +1,27 @@
+/*
+ *  nTestSettings.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
 #include "cTestSettings.h"
 
 #include "cTestLib.h"

Added: extras/source/testsuites/nTreeStats.cpp
===================================================================
--- extras/source/testsuites/nTreeStats.cpp	                        (rev 0)
+++ extras/source/testsuites/nTreeStats.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -0,0 +1,463 @@
+/*
+ *  nTreeStats.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.13.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#include "cAnalyze.h"
+
+#include "cAnalyzeTestFixture.h"
+#include "cTestLib.h"
+
+#if USE_tMemTrack
+# ifndef tMemTrack_h
+#  include "tMemTrack.h"
+# endif
+#endif
+
+#include <iostream>
+#include <fstream>
+
+#include <assert.h>
+
+using namespace std;
+
+
+namespace nTreeStats {
+  void GenerateStandardCfgs(const cString &avida_cfg_filename, const cString &analyze_cfg_filename){
+    std::ofstream avida_cfg_file(avida_cfg_filename);
+
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "# This file includes all the basic run-time defines for Avida." << endl;
+    avida_cfg_file << "# For more information, see doc/config.html" << endl;
+    avida_cfg_file << "#############################################################################" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "VERSION_ID 2.7.0   # Do not change this value." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GENERAL_GROUP ###" << endl;
+    avida_cfg_file << "# General Settings" << endl;
+    avida_cfg_file << "ANALYZE_MODE 0  # 0 = Disabled" << endl;
+    avida_cfg_file << "                # 1 = Enabled" << endl;
+    avida_cfg_file << "                # 2 = Interactive" << endl;
+    avida_cfg_file << "VIEW_MODE 1     # Initial viewer screen" << endl;
+    avida_cfg_file << "CLONE_FILE -    # Clone file to load" << endl;
+    avida_cfg_file << "VERBOSITY 1     # 0 = No output at all" << endl;
+    avida_cfg_file << "                # 1=Normal output" << endl;
+    avida_cfg_file << "                # 2 = Verbose output, detailing progress" << endl;
+    avida_cfg_file << "                # 3 = High level of details, as available" << endl;
+    avida_cfg_file << "                # 4 = Print Debug Information, as applicable" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ARCH_GROUP ###" << endl;
+    avida_cfg_file << "# Architecture Variables" << endl;
+    avida_cfg_file << "WORLD_X 60        # Width of the Avida world" << endl;
+    avida_cfg_file << "WORLD_Y 60        # Height of the Avida world" << endl;
+    avida_cfg_file << "WORLD_GEOMETRY 2  # 1 = Bounded Grid" << endl;
+    avida_cfg_file << "                  # 2 = Torus" << endl;
+    avida_cfg_file << "                  # 3 = Clique" << endl;
+    avida_cfg_file << "RANDOM_SEED 0     # Random number seed (0 for based on time)" << endl;
+    avida_cfg_file << "HARDWARE_TYPE 0   # 0 = Original CPUs" << endl;
+    avida_cfg_file << "                  # 1 = New SMT CPUs" << endl;
+    avida_cfg_file << "                  # 2 = Transitional SMT" << endl;
+    avida_cfg_file << "                  # 3 = Experimental CPU" << endl;
+    avida_cfg_file << "                  # 4 = Gene Expression CPU" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### CONFIG_FILE_GROUP ###" << endl;
+    avida_cfg_file << "# Configuration Files" << endl;
+    avida_cfg_file << "DATA_DIR data                       # Directory in which config files are found" << endl;
+    avida_cfg_file << "INST_SET -                          # File containing instruction set" << endl;
+    avida_cfg_file << "INST_SET_FORMAT 0                   # Instruction set file format." << endl;
+    avida_cfg_file << "                                    # 0 = Default" << endl;
+    avida_cfg_file << "                                    # 1 = New Style" << endl;
+    avida_cfg_file << "EVENT_FILE events.cfg               # File containing list of events during run" << endl;
+    avida_cfg_file << "ANALYZE_FILE analyze.cfg            # File used for analysis mode" << endl;
+    avida_cfg_file << "ENVIRONMENT_FILE environment.cfg    # File that describes the environment" << endl;
+    avida_cfg_file << "START_CREATURE default-classic.org  # Organism to seed the soup" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### DEME_GROUP ###" << endl;
+    avida_cfg_file << "# Demes and Germlines" << endl;
+    avida_cfg_file << "NUM_DEMES 1                  # Number of independent groups in the population." << endl;
+    avida_cfg_file << "DEMES_USE_GERMLINE 0         # Whether demes use a distinct germline; 0=off" << endl;
+    avida_cfg_file << "DEMES_HAVE_MERIT 0           # Whether demes have merit; 0=no" << endl;
+    avida_cfg_file << "GERMLINE_COPY_MUT 0.0075     # Prob. of copy mutations occuring during" << endl;
+    avida_cfg_file << "                             # germline replication." << endl;
+    avida_cfg_file << "GERMLINE_REPLACES_SOURCE 0   # Whether the source germline is updated" << endl;
+    avida_cfg_file << "                             # on replication; 0=no." << endl;
+    avida_cfg_file << "GERMLINE_RANDOM_PLACEMENT 0  # Defines how the seed for a germline is placed" << endl;
+    avida_cfg_file << "                             #  within the deme;" << endl;
+    avida_cfg_file << "                             # 0 = organisms is placed in center of deme, no orientation" << endl;
+    avida_cfg_file << "                             # 1 = organisms is placed in center of deme and oriented" << endl;
+    avida_cfg_file << "                             # 2 = organism is randomly placed in deme, no orientation" << endl;
+    avida_cfg_file << "MAX_DEME_AGE 500             # The maximum age of a deme (in updates) to be" << endl;
+    avida_cfg_file << "                             # used for age-based replication (default=500)." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### REPRODUCTION_GROUP ###" << endl;
+    avida_cfg_file << "# Birth and Death" << endl;
+    avida_cfg_file << "BIRTH_METHOD 0            # Which organism should be replaced on birth?" << endl;
+    avida_cfg_file << "                          # 0 = Random organism in neighborhood" << endl;
+    avida_cfg_file << "                          # 1 = Oldest in neighborhood" << endl;
+    avida_cfg_file << "                          # 2 = Largest Age/Merit in neighborhood" << endl;
+    avida_cfg_file << "                          # 3 = None (use only empty cells in neighborhood)" << endl;
+    avida_cfg_file << "                          # 4 = Random from population (Mass Action)" << endl;
+    avida_cfg_file << "                          # 5 = Oldest in entire population" << endl;
+    avida_cfg_file << "                          # 6 = Random within deme" << endl;
+    avida_cfg_file << "                          # 7 = Organism faced by parent" << endl;
+    avida_cfg_file << "                          # 8 = Next grid cell (id+1)" << endl;
+    avida_cfg_file << "                          # 9 = Largest energy used in entire population" << endl;
+    avida_cfg_file << "                          # 10 = Largest energy used in neighborhood" << endl;
+    avida_cfg_file << "PREFER_EMPTY 1            # Give empty cells preference in offsping placement?" << endl;
+    avida_cfg_file << "ALLOW_PARENT 1            # Allow births to replace the parent organism?" << endl;
+    avida_cfg_file << "DEATH_METHOD 2            # 0 = Never die of old age." << endl;
+    avida_cfg_file << "                          # 1 = Die when inst executed = AGE_LIMIT (+deviation)" << endl;
+    avida_cfg_file << "                          # 2 = Die when inst executed = length*AGE_LIMIT (+dev)" << endl;
+    avida_cfg_file << "AGE_LIMIT 20              # Modifies DEATH_METHOD" << endl;
+    avida_cfg_file << "AGE_DEVIATION 0           # Creates a distribution around AGE_LIMIT" << endl;
+    avida_cfg_file << "ALLOC_METHOD 0            # (Orignal CPU Only)" << endl;
+    avida_cfg_file << "                          # 0 = Allocated space is set to default instruction." << endl;
+    avida_cfg_file << "                          # 1 = Set to section of dead genome (Necrophilia)" << endl;
+    avida_cfg_file << "                          # 2 = Allocated space is set to random instruction." << endl;
+    avida_cfg_file << "DIVIDE_METHOD 1           # 0 = Divide leaves state of mother untouched." << endl;
+    avida_cfg_file << "                          # 1 = Divide resets state of mother" << endl;
+    avida_cfg_file << "                          #     (after the divide, we have 2 children)" << endl;
+    avida_cfg_file << "                          # 2 = Divide resets state of current thread only" << endl;
+    avida_cfg_file << "                          #     (does not touch possible parasite threads)" << endl;
+    avida_cfg_file << "INJECT_METHOD 0           # 0 = Leaves the parasite thread state untouched." << endl;
+    avida_cfg_file << "                          # 1 = Resets the calling thread state on inject" << endl;
+    avida_cfg_file << "GENERATION_INC_METHOD 1   # 0 = Only the generation of the child is" << endl;
+    avida_cfg_file << "                          #     increased on divide." << endl;
+    avida_cfg_file << "                          # 1 = Both the generation of the mother and child are" << endl;
+    avida_cfg_file << "                          #     increased on divide (good with DIVIDE_METHOD 1)." << endl;
+    avida_cfg_file << "RESET_INPUTS_ON_DIVIDE 0  # Reset environment inputs of parent upon successful divide." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### RECOMBINATION_GROUP ###" << endl;
+    avida_cfg_file << "# Sexual Recombination and Modularity" << endl;
+    avida_cfg_file << "RECOMBINATION_PROB 1.0  # probability of recombination in div-sex" << endl;
+    avida_cfg_file << "MAX_BIRTH_WAIT_TIME -1  # Updates incipiant orgs can wait for crossover" << endl;
+    avida_cfg_file << "MODULE_NUM 0            # number of modules in the genome" << endl;
+    avida_cfg_file << "CONT_REC_REGS 1         # are (modular) recombination regions continuous" << endl;
+    avida_cfg_file << "CORESPOND_REC_REGS 1    # are (modular) recombination regions swapped randomly" << endl;
+    avida_cfg_file << "                        #  or with corresponding positions?" << endl;
+    avida_cfg_file << "TWO_FOLD_COST_SEX 0     # 1 = only one recombined offspring is born." << endl;
+    avida_cfg_file << "                        # 2 = both offspring are born" << endl;
+    avida_cfg_file << "SAME_LENGTH_SEX 0       # 0 = recombine with any genome" << endl;
+    avida_cfg_file << "                        # 1 = only recombine w/ same length" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### DIVIDE_GROUP ###" << endl;
+    avida_cfg_file << "# Divide Restrictions" << endl;
+    avida_cfg_file << "CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes." << endl;
+    avida_cfg_file << "MIN_COPIED_LINES 0.5         # Code fraction which must be copied before divide." << endl;
+    avida_cfg_file << "MIN_EXE_LINES 0.5            # Code fraction which must be executed before divide." << endl;
+    avida_cfg_file << "REQUIRE_ALLOCATE 1           # (Original CPU Only) Require allocate before divide?" << endl;
+    avida_cfg_file << "REQUIRED_TASK -1             # Task ID required for successful divide." << endl;
+    avida_cfg_file << "IMMUNITY_TASK -1             # Task providing immunity from the required task." << endl;
+    avida_cfg_file << "REQUIRED_REACTION -1         # Reaction ID required for successful divide." << endl;
+    avida_cfg_file << "REQUIRED_BONUS 0.0           # Required bonus to divide." << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_BONUS 0       # Call Inst_Repro to divide upon achieving this bonus. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_CPU_CYCLES 0  # Call Inst_Repro after this many cpu cycles. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_TIME 0        # Call Inst_Repro after this time used. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_REPRO_END 0         # Call Inst_Repro after executing the last instruction in the genome." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### MUTATION_GROUP ###" << endl;
+    avida_cfg_file << "# Mutations" << endl;
+    avida_cfg_file << "POINT_MUT_PROB 0.0    # Mutation rate (per-location per update)" << endl;
+    avida_cfg_file << "COPY_MUT_PROB 0.0075  # Mutation rate (per copy)" << endl;
+    avida_cfg_file << "COPY_SLIP_PROB 0.0    # Slip rate (per copy)" << endl;
+    avida_cfg_file << "INS_MUT_PROB 0.0      # Insertion rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "DEL_MUT_PROB 0.0      # Deletion rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "DIV_MUT_PROB 0.0      # Mutation rate (per site, applied on divide)" << endl;
+    avida_cfg_file << "UNIFORM_MUT_PROB 0.0  # Uniform mutation probability (per site, applied on divide)" << endl;
+    avida_cfg_file << "                      # - Randomly applies any of the three classes of mutations (ins, del, point)." << endl;
+    avida_cfg_file << "DIVIDE_MUT_PROB 0.0   # Mutation rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_INS_PROB 0.05  # Insertion rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_DEL_PROB 0.05  # Deletion rate (per divide)" << endl;
+    avida_cfg_file << "DIVIDE_SLIP_PROB 0.0  # Slip rate (per divide) - creates large deletions/duplications" << endl;
+    avida_cfg_file << "SLIP_FILL_MODE 0      # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled" << endl;
+    avida_cfg_file << "PARENT_MUT_PROB 0.0   # Per-site, in parent, on divide" << endl;
+    avida_cfg_file << "SPECIAL_MUT_LINE -1   # If this is >= 0, ONLY this line is mutated" << endl;
+    avida_cfg_file << "INJECT_INS_PROB 0.0   # Insertion rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "INJECT_DEL_PROB 0.0   # Deletion rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "INJECT_MUT_PROB 0.0   # Mutation rate (per site, applied on inject)" << endl;
+    avida_cfg_file << "META_COPY_MUT 0.0     # Prob. of copy mutation rate changing (per gen)" << endl;
+    avida_cfg_file << "META_STD_DEV 0.0      # Standard deviation of meta mutation size." << endl;
+    avida_cfg_file << "MUT_RATE_SOURCE 1     # 1 = Mutation rates determined by environment." << endl;
+    avida_cfg_file << "                      # 2 = Mutation rates inherited from parent." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### REVERSION_GROUP ###" << endl;
+    avida_cfg_file << "# Mutation Reversion" << endl;
+    avida_cfg_file << "# These slow down avida a lot, and should be set to 0.0 normally." << endl;
+    avida_cfg_file << "REVERT_FATAL 0.0           # Should any mutations be reverted on birth?" << endl;
+    avida_cfg_file << "REVERT_DETRIMENTAL 0.0     #   0.0 to 1.0; Probability of reversion." << endl;
+    avida_cfg_file << "REVERT_NEUTRAL 0.0         # " << endl;
+    avida_cfg_file << "REVERT_BENEFICIAL 0.0      # " << endl;
+    avida_cfg_file << "STERILIZE_FATAL 0.0        # Should any mutations clear (kill) the organism?" << endl;
+    avida_cfg_file << "STERILIZE_DETRIMENTAL 0.0  # " << endl;
+    avida_cfg_file << "STERILIZE_NEUTRAL 0.0      # " << endl;
+    avida_cfg_file << "STERILIZE_BENEFICIAL 0.0   # " << endl;
+    avida_cfg_file << "FAIL_IMPLICIT 0            # Should copies that failed *not* due to mutations" << endl;
+    avida_cfg_file << "                           # be eliminated?" << endl;
+    avida_cfg_file << "NEUTRAL_MAX 0.0            # The percent benifical change from parent fitness" << endl;
+    avida_cfg_file << "                           # to be considered neutral." << endl;
+    avida_cfg_file << "NEUTRAL_MIN 0.0            # The percent deleterious change from parent fitness" << endl;
+    avida_cfg_file << "                           # to be considered neutral." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### TIME_GROUP ###" << endl;
+    avida_cfg_file << "# Time Slicing" << endl;
+    avida_cfg_file << "AVE_TIME_SLICE 30           # Ave number of insts per org per update" << endl;
+    avida_cfg_file << "SLICING_METHOD 1            # 0 = CONSTANT: all organisms get default..." << endl;
+    avida_cfg_file << "                            # 1 = PROBABILISTIC: Run _prob_ proportional to merit." << endl;
+    avida_cfg_file << "                            # 2 = INTEGRATED: Perfectly integrated deterministic." << endl;
+    avida_cfg_file << "BASE_MERIT_METHOD 4         # 0 = Constant (merit independent of size)" << endl;
+    avida_cfg_file << "                            # 1 = Merit proportional to copied size" << endl;
+    avida_cfg_file << "                            # 2 = Merit prop. to executed size" << endl;
+    avida_cfg_file << "                            # 3 = Merit prop. to full size" << endl;
+    avida_cfg_file << "                            # 4 = Merit prop. to min of executed or copied size" << endl;
+    avida_cfg_file << "                            # 5 = Merit prop. to sqrt of the minimum size" << endl;
+    avida_cfg_file << "                            # 6 = Merit prop. to num times MERIT_BONUS_INST is in genome." << endl;
+    avida_cfg_file << "BASE_CONST_MERIT 100        # Base merit when BASE_MERIT_METHOD set to 0" << endl;
+    avida_cfg_file << "DEFAULT_BONUS 1.0           # Initial bonus before any tasks" << endl;
+    avida_cfg_file << "MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by this default bonus" << endl;
+    avida_cfg_file << "                            # rather than the accumulated bonus of the parent? 0 = off" << endl;
+    avida_cfg_file << "MERIT_BONUS_INST 0          # in BASE_MERIT_METHOD 6, this sets which instruction counts" << endl;
+    avida_cfg_file << "                            # (-1 = none, 0 = First in INST_SET.)" << endl;
+    avida_cfg_file << "MERIT_BONUS_EFFECT 0        # in BASE_MERIT_METHOD 6, this sets how much merit is earned" << endl;
+    avida_cfg_file << "                            # per instruction (-1 = penalty, 0 = no effect.)" << endl;
+    avida_cfg_file << "FITNESS_METHOD 0            # 0 = default, >1 = experimental" << endl;
+    avida_cfg_file << "FITNESS_COEFF 1.0           # A FITNESS_METHOD parameter" << endl;
+    avida_cfg_file << "FITNESS_VALLEY 0            # in BASE_MERIT_METHOD 6, this creates valleys from" << endl;
+    avida_cfg_file << "                            # FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # (0 = off, 1 = on)" << endl;
+    avida_cfg_file << "FITNESS_VALLEY_START 0      # if FITNESS_VALLEY = 1, orgs with num_key_instructions" << endl;
+    avida_cfg_file << "                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # get fitness 1 (lowest)" << endl;
+    avida_cfg_file << "FITNESS_VALLEY_STOP 0       # if FITNESS_VALLEY = 1, orgs with num_key_instructions" << endl;
+    avida_cfg_file << "                            # from FITNESS_VALLEY_START to FITNESS_VALLEY_STOP" << endl;
+    avida_cfg_file << "                            # get fitness 1 (lowest)" << endl;
+    avida_cfg_file << "MAX_CPU_THREADS 1           # Number of Threads a CPU can spawn" << endl;
+    avida_cfg_file << "THREAD_SLICING_METHOD 0     # Formula for and organism's thread slicing" << endl;
+    avida_cfg_file << "                            #   (num_threads-1) * THREAD_SLICING_METHOD + 1" << endl;
+    avida_cfg_file << "                            # 0 = One thread executed per time slice." << endl;
+    avida_cfg_file << "                            # 1 = All threads executed each time slice." << endl;
+    avida_cfg_file << "NO_CPU_CYCLE_TIME 0         # Don't count each CPU cycle as part of gestation time" << endl;
+    avida_cfg_file << "MAX_LABEL_EXE_SIZE 1        # Max nops marked as executed when labels are used" << endl;
+    avida_cfg_file << "MERIT_GIVEN 0.0             # Fraction of merit donated with 'donate' command" << endl;
+    avida_cfg_file << "MERIT_RECEIVED 0.0          # Multiplier of merit given with 'donate' command" << endl;
+    avida_cfg_file << "MAX_DONATE_KIN_DIST -1      # Limit on distance of relation for donate; -1=no max" << endl;
+    avida_cfg_file << "MAX_DONATE_EDIT_DIST -1     # Limit on genetic (edit) distance for donate; -1=no max" << endl;
+    avida_cfg_file << "MIN_GB_DONATE_THRESHOLD -1  # threshold green beard donates only to orgs above this" << endl;
+    avida_cfg_file << "                            # donation attempt threshold; -1=no thresh" << endl;
+    avida_cfg_file << "DONATE_THRESH_QUANTA 10     # The size of steps between quanta donate thresholds" << endl;
+    avida_cfg_file << "MAX_DONATES 1000000         # Limit on number of donates organisms are allowed." << endl;
+    avida_cfg_file << "PRECALC_PHENOTYPE 0         # 0 = Disabled" << endl;
+    avida_cfg_file << "                            #  1 = Assign precalculated merit at birth (unlimited resources only)" << endl;
+    avida_cfg_file << "                            #  2 = Assign precalculated gestation time" << endl;
+    avida_cfg_file << "                            #  3 = Assign precalculated merit AND gestation time." << endl;
+    avida_cfg_file << "                            # Fitness will be evaluated for organism based on these settings." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GENEOLOGY_GROUP ###" << endl;
+    avida_cfg_file << "# Geneology" << endl;
+    avida_cfg_file << "TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?" << endl;
+    avida_cfg_file << "                      # 0=no, 1=yes, 2=yes,w/sexual population" << endl;
+    avida_cfg_file << "THRESHOLD 3           # Number of organisms in a genotype needed for it" << endl;
+    avida_cfg_file << "                      #   to be considered viable." << endl;
+    avida_cfg_file << "GENOTYPE_PRINT 0      # 0/1 (off/on) Print out all threshold genotypes?" << endl;
+    avida_cfg_file << "GENOTYPE_PRINT_DOM 0  # Print out a genotype if it stays dominant for" << endl;
+    avida_cfg_file << "                      #   this many updates. (0 = off)" << endl;
+    avida_cfg_file << "SPECIES_THRESHOLD 2   # max failure count for organisms to be same species" << endl;
+    avida_cfg_file << "SPECIES_RECORDING 0   # 1 = full, 2 = limited search (parent only)" << endl;
+    avida_cfg_file << "SPECIES_PRINT 0       # 0/1 (off/on) Print out all species?" << endl;
+    avida_cfg_file << "TEST_CPU_TIME_MOD 20  # Time allocated in test CPUs (multiple of length)" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### LOG_GROUP ###" << endl;
+    avida_cfg_file << "# Log Files" << endl;
+    avida_cfg_file << "LOG_CREATURES 0  # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "LOG_GENOTYPES 0  # 0 = off, 1 = print ALL, 2 = print threshold ONLY." << endl;
+    avida_cfg_file << "LOG_THRESHOLD 0  # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "LOG_SPECIES 0    # 0/1 (off/on) toggle to print file." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### LINEAGE_GROUP ###" << endl;
+    avida_cfg_file << "# Lineage" << endl;
+    avida_cfg_file << "# NOTE: This should probably be called \"Clade\"" << endl;
+    avida_cfg_file << "# This one can slow down avida a lot. It is used to get an idea of how" << endl;
+    avida_cfg_file << "# often an advantageous mutation arises, and where it goes afterwards." << endl;
+    avida_cfg_file << "# Lineage creation options are.  Works only when LOG_LINEAGES is set to 1." << endl;
+    avida_cfg_file << "#   0 = manual creation (on inject, use successive integers as lineage labels)." << endl;
+    avida_cfg_file << "#   1 = when a child's (potential) fitness is higher than that of its parent." << endl;
+    avida_cfg_file << "#   2 = when a child's (potential) fitness is higher than max in population." << endl;
+    avida_cfg_file << "#   3 = when a child's (potential) fitness is higher than max in dom. lineage" << endl;
+    avida_cfg_file << "# *and* the child is in the dominant lineage, or (2)" << endl;
+    avida_cfg_file << "#   4 = when a child's (potential) fitness is higher than max in dom. lineage" << endl;
+    avida_cfg_file << "# (and that of its own lineage)" << endl;
+    avida_cfg_file << "#   5 = same as child's (potential) fitness is higher than that of the" << endl;
+    avida_cfg_file << "#       currently dominant organism, and also than that of any organism" << endl;
+    avida_cfg_file << "#       currently in the same lineage." << endl;
+    avida_cfg_file << "#   6 = when a child's (potential) fitness is higher than any organism" << endl;
+    avida_cfg_file << "#       currently in the same lineage." << endl;
+    avida_cfg_file << "#   7 = when a child's (potential) fitness is higher than that of any" << endl;
+    avida_cfg_file << "#       organism in its line of descent" << endl;
+    avida_cfg_file << "LOG_LINEAGES 0             # " << endl;
+    avida_cfg_file << "LINEAGE_CREATION_METHOD 0  # " << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ORGANISM_NETWORK_GROUP ###" << endl;
+    avida_cfg_file << "# Organism Network Communication" << endl;
+    avida_cfg_file << "NET_ENABLED 0      # Enable Network Communication Support" << endl;
+    avida_cfg_file << "NET_DROP_PROB 0.0  # Message drop rate" << endl;
+    avida_cfg_file << "NET_MUT_PROB 0.0   # Message corruption probability" << endl;
+    avida_cfg_file << "NET_MUT_TYPE 0     # Type of message corruption.  0 = Random Single Bit, 1 = Always Flip Last" << endl;
+    avida_cfg_file << "NET_STYLE 0        # Communication Style.  0 = Random Next, 1 = Receiver Facing" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### BUY_SELL_GROUP ###" << endl;
+    avida_cfg_file << "# Buying and Selling Parameters" << endl;
+    avida_cfg_file << "SAVE_RECEIVED 0  # Enable storage of all inputs bought from other orgs" << endl;
+    avida_cfg_file << "BUY_PRICE 0      # price offered by organisms attempting to buy" << endl;
+    avida_cfg_file << "SELL_PRICE 0     # price offered by organisms attempting to sell" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ANALYZE_GROUP ###" << endl;
+    avida_cfg_file << "# Analysis Settings" << endl;
+    avida_cfg_file << "MAX_CONCURRENCY -1  # Maximum number of analyze threads, -1 == use all available." << endl;
+    avida_cfg_file << "ANALYZE_OPTION_1    # String variable accessible from analysis scripts" << endl;
+    avida_cfg_file << "ANALYZE_OPTION_2    # String variable accessible from analysis scripts" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### ENERGY_GROUP ###" << endl;
+    avida_cfg_file << "# Energy Settings" << endl;
+    avida_cfg_file << "ENERGY_ENABLED 0                       # Enable Energy Model. 0/1 (off/on)" << endl;
+    avida_cfg_file << "ENERGY_GIVEN_ON_INJECT 0               # Energy given to organism upon injection." << endl;
+    avida_cfg_file << "ENERGY_GIVEN_AT_BIRTH 0                # Energy given to offspring upon birth." << endl;
+    avida_cfg_file << "FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH 0.5  # Fraction of perent's energy given to offspring." << endl;
+    avida_cfg_file << "FRAC_ENERGY_DECAY_AT_BIRTH 0.0         # Fraction of energy lost due to decay during reproduction." << endl;
+    avida_cfg_file << "NUM_INST_EXC_BEFORE_0_ENERGY 0         # Number of instructions executed before energy is exhausted." << endl;
+    avida_cfg_file << "ENERGY_CAP -1                          # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int" << endl;
+    avida_cfg_file << "APPLY_ENERGY_METHOD 0                  # When should rewarded energy be applied to current energy?" << endl;
+    avida_cfg_file << "                                       # 0 = on divide" << endl;
+    avida_cfg_file << "                                       # 1 = on completion of task" << endl;
+    avida_cfg_file << "                                       # 2 = on sleep" << endl;
+    avida_cfg_file << "FRAC_ENERGY_TRANSFER 0.0               # Fraction of replaced organism's energy take by new resident" << endl;
+    avida_cfg_file << "LOG_SLEEP_TIMES 0                      # Log sleep start and end times. 0/1 (off/on)" << endl;
+    avida_cfg_file << "                                       # WARNING: may use lots of memory." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### SECOND_PASS_GROUP ###" << endl;
+    avida_cfg_file << "# Tracking metrics known after the running experiment previously" << endl;
+    avida_cfg_file << "TRACK_CCLADES 0                    # Enable tracking of coalescence clades" << endl;
+    avida_cfg_file << "TRACK_CCLADES_IDS coalescence.ids  # File storing coalescence IDs" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### GX_GROUP ###" << endl;
+    avida_cfg_file << "# Gene Expression CPU Settings" << endl;
+    avida_cfg_file << "MAX_PROGRAMIDS 16                # Maximum number of programids an organism can create." << endl;
+    avida_cfg_file << "MAX_PROGRAMID_AGE 2000           # Max number of CPU cycles a programid executes before it is removed." << endl;
+    avida_cfg_file << "IMPLICIT_GENE_EXPRESSION 0       # Create executable programids from the genome without explicit allocation and copying?" << endl;
+    avida_cfg_file << "IMPLICIT_BG_PROMOTER_RATE 0.0    # Relative rate of non-promoter sites creating programids." << endl;
+    avida_cfg_file << "IMPLICIT_TURNOVER_RATE 0.0       # Number of programids recycled per CPU cycle. 0 = OFF" << endl;
+    avida_cfg_file << "IMPLICIT_MAX_PROGRAMID_LENGTH 0  # Creation of an executable programid terminates after this many instructions. 0 = disabled" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### PROMOTER_GROUP ###" << endl;
+    avida_cfg_file << "# Promoters" << endl;
+    avida_cfg_file << "PROMOTERS_ENABLED 0             # Use the promoter/terminator execution scheme." << endl;
+    avida_cfg_file << "                                # Certain instructions must also be included." << endl;
+    avida_cfg_file << "PROMOTER_INST_MAX 0             # Maximum number of instructions to execute before terminating. 0 = off" << endl;
+    avida_cfg_file << "PROMOTER_PROCESSIVITY 1.0       # Chance of not terminating after each cpu cycle." << endl;
+    avida_cfg_file << "PROMOTER_PROCESSIVITY_INST 1.0  # Chance of not terminating after each instruction." << endl;
+    avida_cfg_file << "PROMOTER_TO_REGISTER 0          # Place a promoter's base bit code in register BX when starting execution from it?" << endl;
+    avida_cfg_file << "TERMINATION_RESETS 0            # Does termination reset the thread's state?" << endl;
+    avida_cfg_file << "NO_ACTIVE_PROMOTER_EFFECT 0     # What happens when there are no active promoters?" << endl;
+    avida_cfg_file << "                                # 0 = Start execution at the beginning of the genome." << endl;
+    avida_cfg_file << "                                # 1 = Kill the organism." << endl;
+    avida_cfg_file << "                                # 2 = Stop the organism from executing any further instructions." << endl;
+    avida_cfg_file << "PROMOTER_CODE_SIZE 24           # Size of a promoter code in bits. (Maximum value is 32)" << endl;
+    avida_cfg_file << "PROMOTER_EXE_LENGTH 3           # Length of promoter windows used to determine execution." << endl;
+    avida_cfg_file << "PROMOTER_EXE_THRESHOLD 2        # Minimum number of bits that must be set in a promoter window to allow execution." << endl;
+    avida_cfg_file << "INST_CODE_LENGTH 3              # Instruction binary code length (number of bits)" << endl;
+    avida_cfg_file << "INST_CODE_DEFAULT_TYPE 0        # Default value of instruction binary code value." << endl;
+    avida_cfg_file << "                                # 0 = All zeros" << endl;
+    avida_cfg_file << "                                # 1 = Based off the instruction number" << endl;
+    avida_cfg_file << "CONSTITUTIVE_REGULATION 0       # Sense a new regulation value before each CPU cycle?" << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### COLORS_GROUP ###" << endl;
+    avida_cfg_file << "# Output colors for when data files are printed in HTML mode." << endl;
+    avida_cfg_file << "# There are two sets of these; the first are for lineages," << endl;
+    avida_cfg_file << "# and the second are for mutation tests." << endl;
+    avida_cfg_file << "COLOR_DIFF CCCCFF        # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_SAME FFFFFF        # Color to flag stat that has NOT changed since parent." << endl;
+    avida_cfg_file << "COLOR_NEG2 FF0000        # Color to flag stat that is significantly worse than parent." << endl;
+    avida_cfg_file << "COLOR_NEG1 FFCCCC        # Color to flag stat that is minorly worse than parent." << endl;
+    avida_cfg_file << "COLOR_POS1 CCFFCC        # Color to flag stat that is minorly better than parent." << endl;
+    avida_cfg_file << "COLOR_POS2 00FF00        # Color to flag stat that is significantly better than parent." << endl;
+    avida_cfg_file << "COLOR_MUT_POS 00FF00     # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_NEUT FFFFFF    # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_NEG FFFF00     # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "COLOR_MUT_LETHAL FF0000  # Color to flag stat that has changed since parent." << endl;
+    avida_cfg_file << "" << endl;
+    avida_cfg_file << "### BIOMIMETIC_GROUP ###" << endl;
+    avida_cfg_file << "# Biomimetic Features Settings" << endl;
+    avida_cfg_file << "BIOMIMETIC_REFRACTORY_PERIOD 0.0  # Number of updates affected by refractory period" << endl;
+    avida_cfg_file << "BIOMIMETIC_MOVEMENT_STEP 0        # Number of cells to move Avidian on move instruction" << endl;
+    avida_cfg_file << "BIOMIMETIC_K 0                    # Carrying capacity in number of organisms" << endl;
+    avida_cfg_file << "" << endl;
+
+    avida_cfg_file.close();
+
+
+    std::ofstream analyze_cfg_file(analyze_cfg_filename);
+
+    analyze_cfg_file << "#############################################################################" << endl;
+    analyze_cfg_file << "# This file is used to setup avida when it is in analysis-only mode (by" << endl;
+    analyze_cfg_file << "# running \"avida -a\".  It allows variety of methods to load organisms" << endl;
+    analyze_cfg_file << "# (specifying the type of each) and analyze them once loaded." << endl;
+    analyze_cfg_file << "#" << endl;
+    analyze_cfg_file << "# See the documentation in doc/analyze_mode.html for usage, or the file" << endl;
+    analyze_cfg_file << "# doc/analyze_samples.html for guidelines on writing programs." << endl;
+    analyze_cfg_file << "#" << endl;
+    analyze_cfg_file << "#############################################################################" << endl;
+    analyze_cfg_file << "" << endl;
+
+    analyze_cfg_file.close();
+  }
+}
+
+
+/* Brainstorms. */
+namespace cAnalyze_Brainstorm_GabeYedidGammaStatistic {
+  void testsuite(){
+    cString avida_cfg_filename("./cAnalyze_Brainstorm_GabeYedidGammaStatistic_avida.cfg");
+    cString analyze_cfg_filename("./cAnalyze_Brainstorm_GabeYedidGammaStatistic_analyze.cfg");    
+    nTreeStats::GenerateStandardCfgs(avida_cfg_filename, analyze_cfg_filename);
+
+    cAnalyzeTestFixture atf;
+    atf.AddArg("cAnalyze_Brainstorm_GabeYedidGammaStatistic");
+    atf.AddArg("-c");
+    atf.AddArg(avida_cfg_filename);
+    atf.AddArg("-set");
+    atf.AddArg("ANALYZE_FILE");
+    atf.AddArg(analyze_cfg_filename);
+
+    /* Run Avida. */
+    if(true){
+      cout << "------ Starting Avida run." << endl;
+      atf.Start();
+      atf.Send("ECHO blah");
+      atf.Stop();
+      cout << "------ Finished Avida run." << endl;
+    }
+
+    /* Remove generated config files. */
+    std::remove(avida_cfg_filename);
+    std::remove(analyze_cfg_filename);
+  }
+  cAddTestSuite t("cAnalyze_Brainstorm_GabeYedidGammaStatistic", testsuite);
+}

Added: extras/source/tools/cAnalyzeTestFixture.cpp
===================================================================
--- extras/source/tools/cAnalyzeTestFixture.cpp	                        (rev 0)
+++ extras/source/tools/cAnalyzeTestFixture.cpp	2007-12-19 20:28:31 UTC (rev 2230)
@@ -0,0 +1,105 @@
+/*
+ *  cAnalyzeTestFixture.cpp
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.14.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#include "cAnalyzeTestFixture.h"
+
+#include "avida.h"
+#include "cAnalyze.h"
+#include "cAvidaConfig.h"
+#include "cAvidaDriver.h"
+#include "cDefaultAnalyzeDriver.h"
+#include "cDriverManager.h"
+#include "cTestLib.h"
+#include "cWorld.h"
+
+cAnalyzeTestFixture::cAnalyzeTestFixture()
+: m_cfg(0)
+, m_world(0)
+, m_driver(0)
+{
+  /* Initialize. */
+  cDriverManager::Initialize();
+}
+
+cAnalyzeTestFixture::~cAnalyzeTestFixture(){
+  Stop();
+}
+
+void cAnalyzeTestFixture::AddArg(const cString &arg){
+  m_args.PushRear(arg);
+}
+
+void cAnalyzeTestFixture::ResetArgs(){
+  m_args.Clear();
+}
+
+void cAnalyzeTestFixture::Start(){
+  m_cfg = new cAvidaConfig();
+  if(!m_cfg){
+    ERROR("Couldn't instantiate cAvidaConfig -");
+    return;
+  }
+  
+  Avida::ProcessArgs(m_args, m_cfg);
+  m_world = new cWorld(m_cfg);
+  if(!m_world){
+    ERROR("Couldn't instantiate cWorld -");
+    delete m_cfg;
+    m_cfg = 0;
+    return;
+  }
+  m_driver = new cDefaultAnalyzeDriver(m_world, false);
+  if(!m_driver){
+    ERROR("Couldn't instantiate cDefaultAnalyzeDriver -");
+    // note: world deletes config.
+    delete m_world;
+    m_world = 0;
+    m_cfg = 0;
+    return;
+  }
+}
+
+void cAnalyzeTestFixture::Stop(){
+  // note: driver deletes world deletes config.
+  if(m_driver){
+    delete m_driver;
+    m_driver = 0;
+    m_world = 0;
+    m_cfg = 0;
+  }
+  m_args.Clear();
+}
+
+cAnalyze *cAnalyzeTestFixture::GetAnalyze(){
+  if(m_world){
+    return &m_world->GetAnalyze();
+  } else {
+    return 0;
+  }
+}
+
+bool cAnalyzeTestFixture::Send(const cString &text_input){
+  if(GetAnalyze()){ return GetAnalyze()->Send(text_input); }
+  else { return false; }
+}

Added: extras/source/tools/cAnalyzeTestFixture.h
===================================================================
--- extras/source/tools/cAnalyzeTestFixture.h	                        (rev 0)
+++ extras/source/tools/cAnalyzeTestFixture.h	2007-12-19 20:28:31 UTC (rev 2230)
@@ -0,0 +1,55 @@
+/*
+ *  cAnalyzeTestFixture.h
+ *  Avida at vallista
+ *
+ *  Created by Kaben Nanlohy on 2007.11.14.
+ *  Copyright 1999-2007 Michigan State University. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; version 2
+ *  of the License.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#ifndef cAnalyzeTestFixture_h
+#define cAnalyzeTestFixture_h
+
+#ifndef cStringList_h
+#include "cStringList.h"
+#endif
+
+class cAnalyze;
+class cAvidaConfig;
+class cAvidaDriver;
+class cString;
+class cWorld;
+
+class cAnalyzeTestFixture {
+public:
+  cStringList m_args;
+  cAvidaConfig *m_cfg;
+  cWorld *m_world;
+  cAvidaDriver *m_driver;
+public:
+  cAnalyzeTestFixture();
+  ~cAnalyzeTestFixture();
+  void AddArg(const cString &arg);
+  void ResetArgs();
+  void Start();
+  void Stop();
+  cAnalyze *GetAnalyze();
+  bool Send(const cString &text_input);
+};
+
+#endif




More information about the Avida-cvs mailing list