[Avida-cvs] [avida-svn] r895 - in development: Avida.xcodeproj documentation source/actions source/classification source/main

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Thu Aug 24 19:02:31 PDT 2006


Author: brysonda
Date: 2006-08-24 21:56:22 -0400 (Thu, 24 Aug 2006)
New Revision: 895

Added:
   development/documentation/config.html
Removed:
   development/documentation/genesis.html
Modified:
   development/Avida.xcodeproj/project.pbxproj
   development/documentation/cpu_tour.html
   development/documentation/events.html
   development/documentation/index.html
   development/documentation/structure.html
   development/documentation/svn.html
   development/source/actions/PrintActions.cc
   development/source/classification/cClassificationManager.cc
   development/source/main/cPopulation.cc
   development/source/main/cStats.cc
   development/source/main/cStats.h
Log:
Update Configuration File Documentation.  Begin updating events file documentation.  Also update a number of output files in cStats to use cDataFile objects rather than raw ostreams.   Finally, remove a whole collection of unused mutation sums.  Should the intended functionality be needed in the future they can be added back in when it is actually implemented.

Modified: development/Avida.xcodeproj/project.pbxproj
===================================================================
--- development/Avida.xcodeproj/project.pbxproj	2006-08-24 19:50:41 UTC (rev 894)
+++ development/Avida.xcodeproj/project.pbxproj	2006-08-25 01:56:22 UTC (rev 895)
@@ -586,6 +586,7 @@
 		707AF2F409EE8501001AEA89 /* organism.infected2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = organism.infected2; sourceTree = "<group>"; };
 		707AF2F509EE8501001AEA89 /* organism.noheads */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = organism.noheads; sourceTree = "<group>"; };
 		707AF2FF09EE8501001AEA89 /* SConscript */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SConscript; sourceTree = "<group>"; };
+		707CE51D0A9E49A50022D19C /* config.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = config.html; sourceTree = "<group>"; };
 		708051A70A1F65FE00CBB8B6 /* SaveLoadActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaveLoadActions.h; sourceTree = "<group>"; };
 		708051A80A1F65FE00CBB8B6 /* SaveLoadActions.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaveLoadActions.cc; sourceTree = "<group>"; };
 		708051BA0A1F66B400CBB8B6 /* cActionLibrary.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cActionLibrary.cc; sourceTree = "<group>"; };
@@ -604,7 +605,6 @@
 		70920C280A9CCE2C00757CDB /* cpu_tour.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = cpu_tour.html; sourceTree = "<group>"; };
 		70920C290A9CCE2C00757CDB /* environment.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = environment.html; sourceTree = "<group>"; };
 		70920C2A0A9CCE2C00757CDB /* events.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = events.html; sourceTree = "<group>"; };
-		70920C2B0A9CCE2C00757CDB /* genesis.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = genesis.html; sourceTree = "<group>"; };
 		70920C2D0A9CCE2C00757CDB /* components.help */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = components.help; sourceTree = "<group>"; };
 		70920C2E0A9CCE2C00757CDB /* help.add.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = help.add.html; sourceTree = "<group>"; };
 		70920C2F0A9CCE2C00757CDB /* help.Bitwise.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html.documentation; path = help.Bitwise.html; sourceTree = "<group>"; };
@@ -1161,6 +1161,7 @@
 		70920C1A0A9CCE2C00757CDB /* Documentation */ = {
 			isa = PBXGroup;
 			children = (
+				707CE51D0A9E49A50022D19C /* config.html */,
 				70920C1B0A9CCE2C00757CDB /* analyze_mode.html */,
 				70920C1C0A9CCE2C00757CDB /* analyze_samples.html */,
 				70920C1D0A9CCE2C00757CDB /* code_c++_intro.html */,
@@ -1176,7 +1177,6 @@
 				70920C280A9CCE2C00757CDB /* cpu_tour.html */,
 				70920C290A9CCE2C00757CDB /* environment.html */,
 				70920C2A0A9CCE2C00757CDB /* events.html */,
-				70920C2B0A9CCE2C00757CDB /* genesis.html */,
 				70920C2C0A9CCE2C00757CDB /* glossary */,
 				70920C5C0A9CCE2C00757CDB /* images */,
 				70920C5F0A9CCE2C00757CDB /* index.html */,

Copied: development/documentation/config.html (from rev 892, development/documentation/genesis.html)
===================================================================
--- development/documentation/genesis.html	2006-08-23 22:09:50 UTC (rev 892)
+++ development/documentation/config.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -0,0 +1,611 @@
+<html>
+<head>
+  <title>The Avida Configuration File</title>
+</head>
+<body>
+
+<p><a href="index.html">Return to the Index</a></p>
+<hr />
+
+<div align="center">
+<h1>The Avida Configuration File</h2>
+</div>
+
+<p>
+The Avida configuration file (<kbd style="color: #000088">avida.cfg</kbd>)
+is the main configuration file for Avida.  With this file, the user can
+setup all of the basic conditions for a run.  Below are detailed descriptions
+for some of the settings in the configuration file, with particularly important
+settings highlighted in green.  The non-colored entries will probably never
+need to change unless you are performing a very specialized experiment.
+</p>
+
+<p>&nbsp;</p>
+<h2>Architecture Variables</h2>
+
+<p>
+This section covers all of the basic variables that describe the Avida run.
+This is effectively a miscellaneous category for settings that don't fit
+anywhere below.
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>
+    MAX_UPDATES
+    <br />MAX_GENERATIONS
+    <br />END_CONDITION_MODE
+  </code></strong></td>
+  <td>
+    These settings allow the user to determine for how long the run
+    should progress in generations and in updates, and determine if one
+    or both criteria need to be met for the run to end.  The
+    run will also end if ever the entire population has died out.  A
+    setting of -1 for either ending condition will indicate no limit.
+    End conditions can also be set in the events file, as is done by
+    default, so you typically won't need to worry about this.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>
+    WORLD_X
+    <br />WORLD_Y
+  </code></strong></td>
+  <td>
+    The settings determine the size of the Avida grid that the organisms populate.
+    In mass action mode the shape of the grid is not relevant, only the number of
+    organisms that are in it.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>
+    RANDOM_SEED
+  </code></strong></td>
+  <td>
+    The random number seed initializes the random number generator.  You
+    should alter only this seed if you want to perform a collection of
+    replicate runs.  Setting the random number seed to zero (or a negative
+    number) will base the seed on the starting time of the run
+    -- effectively a random random number seed.  In practice, you want
+    to always be able to re-do an exact run in case you want to get
+    more information about what happened.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Configuration Files</h2>
+
+<p>
+This section relates Avida to other files that it requires.
+</p>
+<table border="1">
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>DATA_DIR</code></strong></td>
+  <td>
+    The name (or path) of the directory where output files generated by
+    Avida should be placed.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>
+    INST_SET
+    <br />EVENT_FILE
+    <br />ANALYZE_FILE
+    <br />ENVIRONMENT_FILE
+    <br />START_CREATURE
+  </code></strong></td>
+  <td>
+    These settings indicate the names of all of the other configuration files
+    used in an Avida run.  See the individual documents for more information
+    about how to use these files.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Reproduction</h2>
+
+<p>
+These settings control how creatures are born and die in Avida.
+</p>
+<table border="1">
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>BIRTH_METHOD</code></strong></td>
+  <td>
+    The birth method sets how the placement of a child organism is
+    determined.  Currently, there are six ways of doing this -- the
+    first four (0-3) are all grid-based (offspring are only placed
+    in the immediate neighborhood), and the last two (4-5) assume
+    a well-stirred population.  In all non-random methods, empty
+    sites are preferred over replacing a living organism.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>
+    DEATH_METHOD
+    <br />AGE_LIMIT
+  </code></strong></td>
+  <td>
+    By default, replacement is the only way for an organism to die in
+    Avida.  However, if a death method is set, organisms will die of
+    old age.  In method one, organisms will die when they reach the
+    user-specified age limit.  In method 2, the age limit is a multiple
+    of their length, so larger organisms can live longer.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>ALLOC_METHOD</code></strong></td>
+  <td>
+    During the replication process in the default virtual CPU, parent
+    organisms must allocate memory space for their child-to-be.  Before
+    the child is copied into this new memory, it must have an initial
+    value.  Setting the alloc method to zero sets this memory to a default
+    instruction (typical nop-A).  Mode 1 leaves it uninitialized (and hence
+    keeps the contents of the last organism that inhabited that space; if
+    only a partial copy occurs, the child is a hybrid if the parent and the
+    dead organism, hence the name necrophilia).  Mode 2 just randomizes each
+    instruction.  This means that the organism will behave unpredictably if
+    the uninitialized code is executed.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>DIVIDE_METHOD</tt></b>
+  <td>
+    When a divide occurs, does the parent divide into two children, or else
+    do we have a distinct parent and child?  The latter method will allow more
+    age structure in a population where an organism may behave differently
+    when it produces its second or later offspring.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>GENERATION_INC_METHOD</code></strong></td>
+  <td>
+    The generation of an organism is the number of organisms in the chain
+    between it and the original ancestor.  Thus, the generation of a population
+    can be calculated as the average generation of the individual organisms.
+    When a divide occurs, the child always receives a generation one higher
+    than the parent, but what should happen to the generation of the parent
+    itself?  In general, this should be set the same as divide method.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Divide Restrictions</h2>
+
+<p>
+These place limits on when an organism can successfully issue a divide
+command to produce an offspring.
+</p>
+<table border="1">
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>CHILD_SIZE_RANGE</code></strong></td>
+  <td>
+    This is the maximal difference in genome size between a parent and
+    offspring.  The default of 2.0 means that the genome of the child
+    must be between one-half and twice the length of the parent.  This
+    it to prevent out-of-control size changes.  Setting this to 1.0 will
+    ensure fixed length organisms (but make sure to also turn off
+    insertion and deletion mutations).
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>
+    MIN_COPIED_LINES
+    <br />MIN_EXE_LINES
+  </code></strong></td>
+  <td>
+    These settings place limits on what the parent must have done before
+    the child can be born; they set the minimum fraction of instructions
+    that must have been copied into the child (vs. left as default) and
+    the minimum fraction of instructions in the parent that must have
+    been executed.  If either of these are not met, the divide will fail.
+    These settings prevent organisms from producing pathological offspring.
+    In practice, either of them can be set to 0.0 to turn them off.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>REQUIRE_ALLOCATE</code></strong></td>
+  <td>
+    Is an allocate required between each successful divide (in virtual
+    hardware types where allocate is meaningful)?  If so,
+    this will limit the flexibility of how organisms produce children
+    (they can't make multiple copies and divide them off all at once,
+    for example).  But if we don't require allocates, the resulting
+    organisms can be a lot more difficult to understand.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>REQUIRED_TASK</code></strong></td>
+  <td>
+    This was originally a hack.  It allows the user to set the ID number
+    for a task that <i>must</i> occur for a divide to be successful.
+    At -1, no tasks are required.  Ideally, this should be incorporated
+    into the environment configuration file.  NOTE: A task can fire without
+    triggering a reaction. To add a required reaction see below.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>IMMUNITY_TASK</code></strong></td>
+  <td>
+    Allows user to set the ID number for a task which, if it occures, 
+    provides immunity from the required task (above) -- divide will 
+    proceede even if the required task is not done if immunity task is done. 
+    Defaults to -1, no immunity task present.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>REQUIRED_REACTION</code></strong></td>
+  <td>
+    Allows the user to set the ID number for a reaction that <em>must</em> 
+    occur for a divide to be successful.  At -1, no reactions are required.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>DIE_PROB</code></strong></td>
+  <td>
+    Determines the probability of organism dieing when 'die' instruction is
+    executed. Set to 0 by default, making the instruction neutral. 
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Mutations</h2>
+
+<p>
+These settings control how and when mutations occur in organisms.  Ideally,
+there will be more options here in the future.
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>POINT_MUT_PROB</code></strong></td>
+  <td>
+    Point mutations (sometimes referred to as "cosmic ray" mutations)
+    occur every update; the rate set here is a probability for each site
+    that it will be mutated each update.  In other words, this should
+    be a very low value if it is turned on at all.  If a mutation occurs,
+    that site is replaced with a random instruction.  In practice this
+    also slows avida down if it is non-zero because it requires so many
+    random numbers to be tested every update.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>COPY_MUT_PROB</code></strong></td>
+  <td>
+    The copy mutation probability is tested each time an organism copies 
+    a single instruction.  If a mutation occurs, a random instruction is
+    copied to the destination.  In practice this is the most common type
+    of mutations that we use in most of our experiments.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>
+    INS_MUT_PROB
+    <br />DEL_MUT_PROB
+  </code></strong></td>
+  <td>
+    These probabilities are tested once per gestation cycle (when an
+    organism is first born) at each position where an instruction could
+    be inserted or deleted, respectively.  Each of these mutations change
+    the genome length.  Deletions just remove an instruction while
+    insertions add a new, random instruction at the position tested.
+    Multiple insertions and deletions are possible each generation.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>
+    DIVIDE_MUT_PROB
+    <br />DIVIDE_INS_PROB
+    <br />DIVIDE_DEL_PROB
+  </code></strong></td>
+  <td>
+    Divide mutation probabilities are tested when an organism is
+    being divided off from its parent.  If one of these mutations
+    occurs, a random site is picked for it within the genome.  At most
+    one divide mutation of each type is possible during a single
+    divide.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Mutation Reversions</h2>
+
+<p>
+This section covers tests that are very CPU intensive, but allow for
+Avida experiments that would not be possible in any other system. Basically,
+each time a mutation occurs, we can run the resulting organism in a
+test CPU, and determine if that effect of the mutation was lethal, detrimental,
+neutral, or beneficial.  This section allows us to act on this.  (Note that as
+soon as anything here is turned on, the mutations need to be tested.  Turning
+multiple settings on will not cause additional speed decrease)
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>
+    REVERT_FATAL
+    <br />REVERT_DETRIMENTAL
+    <br />REVERT_NEUTRAL
+    <br />REVERT_BENEFICIAL
+  </code></strong></td>
+  <td>
+    When a mutation occurs of the specified type, the number
+    listed next to that entry is the probability that the mutation will
+    be reverted.  That is, the child organism's genome will be restored
+    as if the mutation had never occurred.  This allows us both to 
+    manually manipulate the abundance of certain mutation types, or
+    to entirely eliminate them.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>
+    STERILIZE_FATAL
+    <br />STERILIZE_DETRIMENTAL
+    <br />STERILIZE_NEUTRAL
+    <br />STERILIZE_BENEFICIAL
+  </code></strong></td>
+  <td>
+    The sterilize options work similarly to revert; the
+    difference being that an organism never has its genome restored.
+    Instead, if the selected mutation category occurs, the child is
+    sterilized so that it still takes up space, but can never produce an
+    offspring of its own.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>FAIL_IMPLICIT</code></strong></td>
+  <td>
+    If this toggle is set, organisms <em>must</em> be able to produce
+    exact copies of themselves or else they are sterilized and cannot
+    produce any offspring.  An organism that naturally (without any
+    external effects) produces an inexact copy of itself is said to
+    have implicit mutations.  If this flag is set, explicit mutations
+    (as described in the mutations section above) can still occur.
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Time Slicing</h2>
+
+<p>
+These settings describe exactly what an update is, and how CPU time is
+allocated to organisms during that update.
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>AVE_TIME_SLICE</code></strong></td>
+  <td>
+    This sets the average number of instructions an organism should
+    execute each update.  Organisms with a low merit will consistently
+    obtain fewer, while organisms of a higher merit will receive more.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>SLICING_METHOD</code></strong></td>
+  <td>
+    This setting determines the method by which CPU time is handed out
+    to the organisms.  Method 0 ignores merit, and hands out time on the
+    CPU evenly; each organism executes one instruction for the whole
+    population before moving onto the second.  Method 1 is
+    probabilistic; each organism has a chance of executing the
+    next instruction proportional to it merit.  This method is slow
+    due to the large number of random values that need to be obtained
+    and evaluated (and it only gets slower as merits get higher).
+    Method 2 is fully integrated; the organisms get CPU time proportional
+    to their merit, but in a fixed, deterministic order.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>SIZE_MERIT_METHOD</code></strong></td>
+  <td>
+    This setting determines the base value of an organism's merit.
+    Merit is typically proportional to genome length otherwise there
+    is a strong selective pressure for shorter genomes (shorter genome
+    => less to copy => reduced copying time => replicative advantage).
+    Unfortunately, organisms will cheat if merit is proportional to 
+    the full genome length -- they will add on unexecuted and uncopied
+    code to their genomes creating a code bloat.  This isn't the most
+    elegant fix, but it works.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>MAX_LABEL_EXE_SIZE</code></strong></td>
+  <td>
+    Labels are sequences of nop (no-operation) instructions used only
+    to modify the behavior of other instructions.  Quite often, an
+    organism will have these labels in their genomes where the nops are
+    used by another instruction, but never executed directly.  To
+    represent the executed length of an organism correctly, we need to
+    somehow count these labels.  Unfortunately, if we count the entire
+    label, the organisms will again "cheat" artificially increasing
+    their length by growing huge labels.  This setting limits the 
+    number of nops that are counted as executed when a label is used.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>MAX_CPU_THREADS</code></strong></td>
+  <td>
+    Determines the number of simultaneous processes that an organism
+    can run.  That is, basically, the number of things it can do at once. 
+    This setting is meaningless unless threads are supported in the virtual
+    hardware and the instructions are available within the instruction set.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Geneology Info</h2>
+
+<p>
+These settings control how avida monitors and deals with genotypes,
+species, and lineages.
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>THRESHOLD</code></strong></td>
+  <td>
+    For some statistics, we only want to measure organisms that we are
+    sure are alive, but its not worth taking the time to run them all
+    in isolation, without outside effect (and in some eco-system situations
+    that isn't even possible!).  For these purposes, we call a genotype
+    "threshold" if there have ever been more than a certain number of
+    organisms of that genotype.  A higher number here ensures a greater
+    probability that the organisms are indeed "alive".  Recently, we've
+    been shifting away from using threshold genotypes and instead finding
+    other, more accurate testing methods.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>GENOTYPE_PRINT</code></strong></td>
+  <td>
+    Should all genotypes be printed out upon reaching threshold?  Each
+    will receive its own file in the archive directory, so this can
+    get <em>very</em> hard disk intensive.  Many runs will have in the
+    millions of organisms.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>GENOTYPE_PRINT_DOM</code></strong></td>
+  <td>
+    Printing only the dominant genotype keeps track of the most
+    successful individual genotypes without costing a huge amount of
+    memory.  The number you place here is the total number of updates
+    that a genotype must remain dominant for it to be printed out.  A
+    0 turns this off.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>SPECIES_THRESHOLD</code></strong></td>
+  <td>
+    In Avida, two organisms are said to be of the same species if you
+    can perform all possible crossovers between them, and no more than
+    a certain threshold (set here) fail to be viable offspring.  The
+    crossovers are done in isolation, and never affect the population as
+    a whole.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>SPECIES_RECORDING</code></strong></td>
+  <td>
+    This entry sets if and how species should be recorded in avida.  A
+    setting of 0 turns all species tests off.  A setting of 1 means that
+    every time a genotype reaches threshold, it is tested against all
+    currently existing species to determine if it is part of any of them.
+    If so, its species is set, and if not, it becomes the prototype of a
+    new species.  Finally, a setting of 2 only tests a new threshold
+    genotype against the species of its parent (since each species test
+    can take a long time) and if that fails immediately creates a new
+    species.  In practice, methods 1 and 2 produce similar results, but
+    method 1 can take a lot longer to run.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>SPECIES_PRINT</code></strong></td>
+  <td>
+    Toggle: Should new species be printed as soon as they are created?
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>TEST_CPU_TIME_MOD</code></strong></td>
+  <td>
+    Many of our analysis methods (such as species testing) require that
+    we be able to run organisms in isolation.  Unfortunately, some of
+    these organisms we test might be non-viable.  At some point, we have
+    to give up the test and label it as non-viable, but we can't give up
+    too soon or else we might miss a viable, though slow replicator.
+    This setting is multiplied by the length of the organism's genome in
+    order to determine how many CPU-cycles to run the organism for.  A
+    setting of 20 effectively means that the average instruction must
+    be executed twenty times before we give up.  In practice, most
+    organisms have an efficiency here of about 5, so 20 works well, but
+    for accurate tests on some pathological organisms, we will be
+    required to raise this number.
+  </td>
+</tr>
+<tr style="background-color: #AAFFAA">
+  <td valign="top"><strong><code>TRACK_MAIN_LINEAGE</code></strong></td>
+  <td>
+    In a normal avida run, the genebank keeps track of all existing
+    genotypes, and deletes them when the last organism of that genotype
+    dies out.  With this flag set, a genotype will not be deleted unless
+    both it and <em>all of its descendents</em> have died off.  This allows
+    us to track back from any genotypes to its distant ancestors,
+    monitoring all of the differences along the way.  Once this information
+    is being saved, see the events file for how to output it.
+  </td>
+</tr>
+</table>
+
+
+<p>&nbsp;</p>
+<h2>Log Files</h2>
+
+<p>
+Log files are printed every time a specified event occurs.  By default,
+all logs settings are 0 (i.e. the logs are turned off).  Each time a logged
+event is printed, the update and identifying information on the individual
+that triggered it is always included.
+</p>
+<table border="1">
+<tr>
+  <td valign="top"><strong><code>LOG_CREATURES</code></strong></td>
+  <td>
+    If toggle is set, print an entry to <kbd style="#000088">creature.log</kbd>
+    whenever a new organism is born.  Include position information, parent
+    organism, and a link to it genotype so the run can be reconstructed.
+    This gets <em>very</em> large.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>LOG_GENOTYPES</code></strong></td>
+  <td>
+    If toggle is set, print an entry to <kbd style="#000088">genotype.log</kbd>
+    whenever a new genotype is created. Includes information on its parent
+    genotype.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>LOG_THRESHOLD</code></strong></td>
+  <td>
+    If toggle is set, print an entry to <kbd style="#000088">threshold.log</kbd>
+    whenever a genotype reaches threshold.  Includes information on what
+    species it is.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>LOG_SPECIES</code></strong></td>
+  <td>
+    If toggle is set, print an entry to <kbd style="#000088">species.log</kbd>
+    whenever a new species is created.  Includes information on the
+    genotype the triggered the creation.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>LOG_LINEAGES</code></strong></td>
+  <td>
+    Lineages can be given unique identifies and printed (into the file
+    <kbd style="#000088">lineage.log</kbd>) whenever they are created.
+    Includes details about the event that created the lineage.
+  </td>
+</tr>
+<tr>
+  <td valign="top"><strong><code>LINEAGE_CREATION_METHOD</code></strong></td>
+  <td>
+    Details when lineages are created.  See config file comments for
+    more detailed information.
+  </td>
+</tr>
+</table>
+
+<hr />
+<p><a href="index.html">Return to the Index</a></p>
+
+</body>
+</html>

Modified: development/documentation/cpu_tour.html
===================================================================
--- development/documentation/cpu_tour.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/cpu_tour.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -53,8 +53,8 @@
 <img src="images/cpu2.gif" />
 </div>
 
+
 <p>&nbsp;</p>
-
 <h2>Instruction Set Configuration</h2>
 
 <p>
@@ -149,6 +149,7 @@
 </p>
 
 
+<p>&nbsp;</p>
 <h2>Instruction Set Reference</h2>
 
 <p>

Modified: development/documentation/events.html
===================================================================
--- development/documentation/events.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/events.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -1,107 +1,115 @@
 <html>
-<title>The Events File</title>
-<body
- bgcolor="#FFFFFF"
- text="#000000"
- link="#0000AA"
- alink="#0000FF"
- vlink="#000044">
+<head>
+  <title>The Events File</title>
+</head>
+<body>
 
-<h2 align=center>The Events File</h2>
+<p><a href="index.html">Return to the Index</a></p>
+<hr />
 
+<div align="center">
+<h1>The Events File</h1>
+</div>
+
 <p>
 The events file controls events that need to occur throughout the course of
 a run.  This includes the output of data files as well as active events that
 effect the population (such as extinction events or changes to the mutation
-rate).  This is not a complete list, but should include all of the most
-used and useful events.
+rate).
+</p>
 
-<p>
-<h3>File Formats</h3>
 
+<p>&nbsp;</p>
+<h2>File Formats</h2>
+
 <p>
 This file consists of a list of events that will be triggered either singly
 or periodically.  The format for each line is:
+</p>
+<pre>
+type  timing  event  arguments
+</pre>
 
 <p>
-&nbsp;&nbsp;&nbsp;type&nbsp;&nbsp;timing&nbsp;&nbsp;event&nbsp;&nbsp;arguments
-
+The <code>type</code> determines what kind of timings the event will be based off
+of.  This can be immediate [<code>i</code>], based on update [<code>u</code>], or based
+on generation [<code>g</code>].
+</p>
 <p>
-The <b>type</b> determines what kind of timings the event will be based off
-of.  This can be immediate [<b>i</b>], based on update [<b>u</b>], or based
-on generation [<b>g</b>].
-
-<p>
-The <b>timing</b> should only be included for non-immediate events.  If a
+The <code>timing</code> should only be included for non-immediate events.  If a
 single number is given for timing, the event occurs at that update/generation.
 A second number can be included (seperated by a colon ':') to indicate how
 often the event should be repeated.  And if a third number is listed (again,
 colon seperated) this will be the last time the event can occur on.  For
-example, the type and timing "u 100:100:5000" would indicate that the
+example, the type and timing <code>u 100:100:5000</code> would indicate that the
 event that follows first occurs at update 100, and repeats every 100 updates
-thereafter until update 5000.  A type timing of "g 10:10" would cause the
+thereafter until update 5000.  A type timing of <code>g 10:10</code> would cause the
 event to be triggered every 10 generations for the entire run.
-
+</p>
 <p>
-The <b>event</b> is simply the name of the event that we want to trigger,
-and the <b>arguments</b> detail exactly how it should work when it is
-triggered.  Each event has its own arguments.
+The <code>event</code> is simply the name of the action that should be performed,
+and the <code>arguments</code> detail exactly how it should work when it is
+triggered.  Each action has its own arguments.
+</p>
 
 <p>
 Some examples:
+</p>
+<div style="margin-left: 10px">
+  <p>
+  <code style="color: #0000AA">i pause</code>
+  <br />
+  Pause avida as soon as the run first starts.
+  </p>
 
-<p>
-<table cellpadding=5>
-<tr><td><font color="#0000AA"><b><tt>i pause</tt></b></font><br>
-Pause avida as soon as the run first starts.
+  <p>
+  <code style="color: #0000AA">u 100:100 print_average_data</code>
+  <br />Print out all average measurements collected every one hundred updates,
+  starting at update 100.
+  </p>
 
-<p>
-<tr><td><font color="#0000AA"><b><tt>u 100:100 print_average_data</tt></b></font><br>
-Print out all average measurements collected every one hundred updates,
-starting at update 100.
+  <p>
+  <code style="color: #0000AA">g 10000:10:20000 print_data dom_info.dat update,dom_fitness,dom_depth,dom_sequence</code>
+  <br />Between generations 10,000 and 20,000, append the specified information to
+  the file <kbd style="color: #000088">dom_info.dat</kbd> every ten generations.  Specifically, the first
+  column in the file would be update number, second is the fitness of
+  the dominant genotype, followed by the depth in the phylogentic
+  tree of the dominant genotype, and finally its genome sequence.
+  </p>
+</div>
 
-<p>
-<tr><td><font color="#0000AA"><b><tt>g 10000:10:20000 print_data dom_info.dat
-        update,dom_fitness,dom_depth,dom_sequence</tt></b></font><br>
-Between generations 10,000 and 20,000, append the specified information to
-the file "dom_info.dat" every ten generations.  Specifically, the first
-column in the file would be update number, second is the fitness of
-the dominant genotype, followed by the depth in the phylogentic
-tree of the dominant genotype, and finally its genome sequence.
-</table>
 
+<p>&nbsp;</p>
+<h2>Types of Actions</h2>
+
 <p>
-<h3>Types of events:</h3>
-<p>
-<table>
-  <tr>
-    <td><A HREF="#output">Output</A></td>
-    <td>Output events are the primary way of saving data from an avida 
-    experiments.</td>
-  </tr><tr>
-    <td><A HREF="#Analysis">Analysis</A></td>
-    <td>Analysis events use data from the current state of avida, process it 
-    and then output the results.</td>
-  </tr><tr>
-    <td><A HREF="#Population">Population</A></td>
-    <td>Population events modify the state of the population, and will 
-    actually change the course of the run.</td>
-  </tr><tr>
-    <td><A HREF="#Resource">Resource</A></td>
-    <td>Events that allow user to change amounts of resources in the 
-    system.</td> 
-  </tr><tr>
-    <td><A HREF="#Miscellaneous">Miscellaneous</A></td>
-    <td></td> 
-  </tr><tr>
-    <td><A HREF="#Exit">Exit</A></td>
-    <td>Events that allow user to end the program.</td> 
-  </tr>
-</table>
+There is a large library of actions available for scheduling as events.
+Below you will find a listing of the high level groupings of these
+actions, along with details sections for each them.
+</p>
 
+<dl>
+<dt><a href="#PrintActions">Print</a></dt>
+<dd>Print actions are the primary way of saving data from an Avida experiments.</dd>
+<dt><a href="#LandscapeActions">Landscape Analysis</a></dt>
+<dd>Actions that use data from the current state of Avida, process it and then output the results.</dd>
+<dt><a href="#PopulationActions">Population</a></dt>
+<dd>Population actions modify the state of the population, and will actually change the course of the run.</dd>
+<dt><a href="#EnvironmentActions">Environment</a></dt>
+<dd>Actions that allow user to change properties of the environment, including resources.</dd>
+<dt><a href="#SaveLoadActions">Save and Load</a></dt>
+<dd>Actions that allow for saving and loading large data sets, such as full populations.</dd>
+<dt><a href="#DriverActions">Driver</a></dt>
+<dd>Actions that allow user to control program execution, including experiment termination.</dd>
+</dl>
+
+
+<h3>Alphabetical Listing of Available Actions</h3>
+
+
+<h1>&lt;@DMB - todo&gt;</h1>
+
 <p>
-<h3>The available events are:</h3>
-<p>
 <table>
   <tr>
     <td>
@@ -207,6 +215,8 @@
     </td>
   </tr>
 </table>
+
+
 <p>
 <h3><A NAME="Output">Output Events</A></h3>
 
@@ -903,7 +913,12 @@
 </menu>
 
 
-<br><hr>
-Project hosted by:<br>
-<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-    
+<h1>&lt;/@DMB - todo&gt;</h1>
+
+
+
+<hr />
+<p><a href="index.html">Return to the Index</a></p>
+
+</body>
+</html>

Deleted: development/documentation/genesis.html
===================================================================
--- development/documentation/genesis.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/genesis.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -1,440 +0,0 @@
-<html>
-<title>The Genesis File</title>
-<body
- bgcolor="#FFFFFF"
- text="#000000"
- link="#0000AA"
- alink="#0000FF"
- vlink="#000044">
-
-<h2 align=center>The Genesis File</h2>
-
-<p>
-The genesis file is the main configuration file for Avida.  With this
-file, the user can setup all of the basic conditions for a run.  Below are
-detailed descriptions for some of the settings in genesis, with the ones
-you should be most concerned about colored in green.  The non-colored 
-entries you will probably never need to change unless you are doing a very
-specialized project.
-
-<h3>Architecture Variables</h3>
-
-<p>
-This section covers all of the basic variables that describe the Avida run.
-This is effectively a miscellaneous category for settings that don't fit
-anywhere below.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>MAX_UPDATES<br>
-               MAX_GENERATIONS<br>
-               END_CONDITION_MODE</tt></b>
-    <td>These settings allow the user to determine for how long the run
-        should progress in generations and in updates, and determine if one
-        or both criteria need to be met for the run to end.  The
-        run will also end if ever the entire population has died out.  A
-        setting of -1 for either ending condition will indicate no limit.
-        End conditions can also be set in the events file, as is done by
-        default, so you typically won't need to worry about this.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>WORLD-X<br>
-               WORLD-Y</tt></b>
-    <td bgcolor="#AAFFAA">The settings determine the size of the Avida grid
-	that the organisms populate.  In mass action mode the shape of the
-	grid is not relevant, only the number of organisms that are in it.
-<tr><td valign=top><b><tt>MAX_CPU_THREADS</tt></b>
-    <td>At the moment, I think this feature isn't working.  Ideally, it
-        determines the number of simultaneous processes that an organism
-        can run.  That is, basically, the number of things it can do at once.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>RANDOM_SEED</tt></b>
-    <td bgcolor="#AAFFAA">The random number seed initializes the random number generator.  You
-        should alter only this seed if you want to perform a collection of
-        replicate runs.  Setting the random number seed to zero (or a negative
-        number) will base the seed on the starting time of the run
-        -- effectively a random random number seed.  In practice, you want
-        to always be able to re-do an exact run in case you want to get
-        more information about what happened.
-</table>
-
-<p>
-<h3>Configuration Files</h3>
-
-This section relates avida to other files that it requires.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>DEFAULT_DIR</tt></b>
-    <td>This entry allows the user to enter a directory name where Avida
-        can find the other needed configuration files if they are not local.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>INST_SET<br>
-                          EVENT_FILE<br>
-                          ANALYZE_FILE<br>
-                          ENVIRONMENT_FILE<br>
-                          START_CREATURE</tt></b>
-    <td valign=top bgcolor="#AAFFAA">These settings indicate the names of all
-	of the other configuration files used in an Avida run.  See the
-	individual documents for more information about how to use these files.
-</table>
-
-<p>
-<h3>Reproduction</h3>
-
-<p>
-These settings control how creatures are born and die in Avida.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>BIRTH_METHOD</tt></b>
-    <td bgcolor="#AAFFAA">The birth method sets how the placement of a child organism is
-        determined.  Currently, there are six ways of doing this -- the
-        first four (0-3) are all grid-based (offspring are only placed
-        in the immediate neighborhood), and the last two (4-5) assume
-        a well-stirred population.  In all non-random methods, empty
-        sites are preferred over replacing a living organism.
-<tr><td valign=top><b><tt>DEATH_METHOD<br>
-                          AGE_LIMIT</tt></b>
-    <td>By default, replacement is the only way for an organism to die in
-        avida.  However, if a death method is set, organisms will dies of
-        old age.  In method one, organisms will die when they reach the
-        user-specified age limit.  In method 2, the age limit is a multiple
-        of their length, so larger organisms can live longer.
-<tr><td valign=top><b><tt>ALLOC_METHOD</tt></b>
-    <td>During the replication process, parent organisms must allocate memory
-        space for their child-to-be.  Before the child is copied into this
-        new memory, it must have an initial value.  Setting the alloc method
-        to zero sets this memory to a default instruction (typical nop-A).
-        Mode 1 leaves it uninitialized (and hence keeps the contents of the
-        last organism that inhabited that space; if only a partial copy
-        occurs, the child is a hybrid if the parent and the dead organism,
-        hence the name necrophilia).  Mode 2 just randomizes each instruction.
-        This means that the organism will behave unpredictably if the
-        uninitialized code is executed.
-<tr><td valign=top><b><tt>DIVIDE_METHOD</tt></b>
-    <td>When a divide occurs, does the parent divide into two children, or
-        else do we have a distinct parent and child?  The latter method
-        will allow more age structure in a population where an organism
-        may behave differently when it produces its second or later
-        offspring.
-<tr><td valign=top><b><tt>GENERATION_INC_METHOD</tt></b>
-    <td>The generation of an organism is the number of organisms in the
-        chain between it and the original ancestor.  Thus, the generation
-        of a population can be calculated as the average generation of the
-        individual organisms.  When a divide occurs, the child always receives
-        a generation one higher than the parent, but what should happen to
-        the generation of the parent itself?  In general, this should be
-        set the same as divide method.
-</table>
-
-<h3>Divide Restrictions</h3>
-
-<p>
-These place limits on when an organism can successfully issue a divide
-command to produce an offspring.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>CHILD_SIZE_RANGE</tt></b>
-    <td bgcolor="#AAFFAA">This is the maximal difference in genome size between a parent and
-        offspring.  The default of 2.0 means that the genome of the child
-        must be between one-half and twice the length of the parent.  This
-        it to prevent out-of-control size changes.  Setting this to 1.0 will
-        ensure fixed length organisms (but make sure to also turn off
-        insertion and deletion mutations).
-<tr><td valign=top><b><tt>MIN_COPIED_LINES<br>
-                          MIN_EXE_LINES</tt></b>
-    <td>These settings place limits on what the parent must have done before
-        the child can be born; they set the minimum fraction of instructions
-        that must have been copied into the child (vs. left as default) and
-        the minimum fraction of instructions in the parent that must have
-        been executed.  If either of these are not met, the divide will fail.
-        These settings prevent organisms from producing pathological
-        offspring.  In practice, either of them can be set to 0.0 to turn them
-        off.
-<tr><td valign=top><b><tt>REQUIRE_ALLOCATE</tt></b>
-    <td>Is an allocate required between each successful divide?  If so,
-        this will limit the flexibility of how organisms produce children
-        (they can't make multiple copies and divide them off all at once,
-        for example).  But if we don't require allocates, the resulting
-        organisms can be a lot more difficult to understand.
-<tr><td valign=top><b><tt>REQUIRED_TASK</tt></b>
-    <td>This was originally a hack.  It allows the user to set the ID number
-        for a task that <i>must</i> occur for a divide to be successful.
-        At -1, no tasks are required.  Ideally, this should be incorporated
-        into the environment configuration file.  NOTE: A task can fire without
-	triggering a reaction. To add a required reaction see below.
-<tr><td valign=top><b><tt>IMMUNITY_TASK</tt></b>
-    <td>Allows user to set the ID number for a task which, if it occures, 
-	provides immunity from the required task (above) -- divide will 
-	proceede even if the required task is not done if immunity task is done. 
-	Defaults to -1, no immunity task present. 
-<tr><td valign=top><b><tt>REQUIRED_REACTION</tt></b>
-    <td>Allows the user to set the ID number for a reaction that <i>must</i> 
-        occur for a divide to be successful.  At -1, no reactions are required.
-<tr><td valign=top><b><tt>DIE_PROB</tt></b>
-    <td>Determines the probability of organism dieing when 'die' instruction is
-	executed. Set to 0 by default, making the instruction neutral. 
-</table>
-
-<h3>Mutations</h3>
-
-<p>
-These settings control how and when mutations occur in organisms.  Ideally,
-there will be more options here in the future.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>POINT_MUT_PROB</tt></b>
-    <td>Point mutations (sometimes referred to as "cosmic ray" mutations)
-        occur every update; the rate set here is a probability for each site
-        that it will be mutated each update.  In other words, this should
-        be a very low value if it is turned on at all.  If a mutation occurs,
-        that site is replaced with a random instruction.  In practice this
-        also slows avida down if it is non-zero because it requires so many
-        random numbers to be tested every update.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>COPY_MUT_PROB</tt></b>
-    <td bgcolor="#AAFFAA">The copy mutation probability is tested each time an organism copies 
-        a single instruction.  If a mutation occurs, a random instruction is
-        copied to the destination.  In practice this is the most common type
-        of mutations that we use in most of our experiments.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>INS_MUT_PROB<br>
-                          DEL_MUT_PROB</tt></b>
-    <td bgcolor="#AAFFAA">These probabilities are tested once per gestation cycle (when an
-        organism is first born) at each position where an instruction could
-        be inserted or deleted, respectively.  Each of these mutations change
-        the genome length.  Deletions just remove an instruction while
-        insertions add a new, random instruction at the position tested.
-        Multiple insertions and deletions are possible each generation.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>DIVIDE_MUT_PROB<br>
-                          DIVIDE_INS_PROB<br>
-                          DIVIDE_DEL_PROB</tt></b>
-    <td bgcolor="#AAFFAA">Divide mutation probabilities are tested when an organism is
-        being divided off from its parent.  If one of these mutations
-        occurs, a random site is picked for it within the genome.  At most
-        one divide mutation of each type is possible during a single
-        divide.
-</table>
-
-
-<h3>Mutation Reversions</h3>
-
-<p>
-This section covers tests that are very CPU intensive, but allow for
-avida experiments that would not be possible in any other system.  Basically,
-each time a mutation occurs, we can run the resulting organism on a
-test CPU, and determine if that mutations was lethal, detrimental, neutral,
-or beneficial, as well as the type of mutation it was.  This section allows
-us to act on this.  (Note that as soon as anything here is turned on, the
-mutations need to be tested.  Turning multiple settings on will cost no
-additional speed decrease)
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>REVERT_FATAL<br>
-                          REVERT_DETRIMENTAL<br>
-                          REVERT_NEUTRAL<br>
-                          REVERT_BENEFICIAL</tt></b>
-    <td valign=top>When a mutation occurs of the specified type, the number
-        listed next to that entry is the probability that the mutation will
-        be reverted.  That is, the child organism's genome will be restored
-        as if the mutation had never occurred.  This allows us both to 
-        manually manipulate the abundance of certain mutation types, or
-        to entirely eliminate them.
-<tr><td valign=top><b><tt>STERILIZE_FATAL<br>
-                          STERILIZE_DETRIMENTAL<br>
-                          STERILIZE_NEUTRAL<br>
-                          STERILIZE_BENEFICIAL</tt></b>
-    <td valign=top>The sterilize options work similarly to revert; the
-        difference being that an organism never has its genome restored.
-        Instead, if the selected mutation category occurs, the child is
-        sterilized so that it still takes up space, but can never produce an
-        offspring of its own.
-<tr><td valign=top><b><tt>FAIL_IMPLICIT</tt></b>
-    <td>If this toggle is set, organisms <i>must</i> be able to produce
-        exact copies of themselves or else they are sterilized and cannot
-        produce any offspring.  An organism that naturally (without any
-        external effects) produces an inexact copy of itself is said to
-        have implicit mutations.  If this flag is set, explicit mutations
-        (as described in the mutations section above) can still occur.
-</table>
-
-<h3>Time Slicing</h3>
-
-These settings describe exactly what an update is, and how CPU time is
-allocated to organisms during that update.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>AVE_TIME_SLICE</tt></b>
-    <td>This sets the average number of instructions an organism should
-        execute each update.  Organisms with a low merit will consistently
-        obtain fewer, while organisms of a higher merit will receive more.
-<tr><td valign=top><b><tt>SLICING_METHOD</tt></b>
-    <td>This setting determines the method by which CPU time is handed out
-        to the organisms.  Method 0 ignores merit, and hands out time on the
-        CPU evenly; each organism executes one instruction for the whole
-        population before moving onto the second.  Method 1 is
-        probabilistic; each organism has a chance of executing the
-        next instruction proportional to it merit.  This method is slow
-        due to the large number of random values that need to be obtained
-        and evaluated (and it only gets slower as merits get higher).
-        Method 2 is fully integrated; the organisms get CPU time proportional
-        to their merit, but in a fixed, deterministic order.
-<tr><td valign=top><b><tt>SIZE_MERIT_METHOD</tt></b>
-    <td>This setting determines the base value of an organism's merit.
-        Merit is typically proportional to genome length otherwise there
-        is a strong selective pressure for shorter genomes (shorter genome
-        => less to copy => reduced copying time => replicative advantage).
-        Unfortunately, organisms will cheat if merit is proportional to 
-        the full genome length -- they will add on unexecuted and uncopied
-        code to their genomes creating a code bloat.  This isn't the most
-        elegant fix, but it works.
-<tr><td valign=top><b><tt>TASK_MERIT_METHOD</tt></b>
-    <td>This toggle determines if merit can be increased by performing
-        tasks.  Ideally, this should just be taken care of in the
-        environment file.
-<tr><td valign=top><b><tt>MAX_LABEL_EXE_SIZE</tt></b>
-    <td>Labels are sequences of nop (no-operation) instructions used only
-        to modify the behavior of other instructions.  Quite often, an
-        organism will have these labels in their genomes where the nops are
-        used by another instruction, but never executed directly.  To
-        represent the executed length of an organism correctly, we need to
-        somehow count these labels.  Unfortunately, if we count the entire
-        label, the organisms will again "cheat" artificially increasing
-        their length by growing huge labels.  This setting limits the 
-        number of nops that are counted as executed when a label is used.
-<tr><td valign=top><b><tt>MERIT_TIME</tt></b>
-    <td>When should merit be updated for an organisms?  A 0 here indicates
-        that every time a task is completed, the merit should immediately
-        be updated to reflect that task.  A 1 means that the merit is
-        only updated on a divide (taking into account all the merit earned
-        over the organisms lifetime) and passed on to both the parent and
-        child for their next gestation cycle.  Since there are such radical
-        merit changes over the lifetime of an organism, method 0 can cause
-        some odd effects where once an organism builds up enough merit they
-        can have lots of offspring rapidly, but most organisms dies in
-        infancy.  Method 1 keeps merit constant for an organisms' entire
-        life, but innovations are only rewarded one generation removed.  At
-        some point we could add an option of the highest of the two.
-<tr><td valign=top><b><tt>MAX_NUM_TASKS_REWARDED</tt></b>
-    <td>This setting allows the user to limit the total number (but not
-        magnitude) of rewards that and organism gets by performing tasks.
-        This is another quick hack, and should probably be incorporated into
-        the environment configuration file.
-</table>
-
-<h3>Genotype Info</h3>
-
-<p>
-These settings control how avida monitors and deals with genotypes,
-species, and lineages.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>THRESHOLD</tt></b>
-    <td>For some statistics, we only want to measure organisms that we are
-        sure are alive, but its not worth taking the time to run them all
-        in isolation, without outside effect (and in some eco-system situations
-        that isn't even possible!).  For these purposes, we call a genotype
-        "threshold" if there have ever been more than a certain number of
-        organisms of that genotype.  A higher number here ensures a greater
-        probability that the organisms are indeed "alive".  Recently, we've
-        been shifting away from using threshold genotypes and instead finding
-        other, more accurate testing methods.
-<tr><td valign=top><b><tt>GENOTYPE_PRINT</tt></b>
-    <td>Should all genotypes be printed out upon reaching threshold?  Each
-        will receive its own file in the genebank directory, so this can
-        get <i>very</i> hard disk intensive.  Many runs will have in the
-        millions of organisms.
-<tr><td valign=top><b><tt>GENOTYPE_PRINT_DOM</tt></b>
-    <td>Printing only the dominant genotype keeps track of the most
-        successful individual genotypes without costing a huge amount of
-        memory.  The number you place here is the total number of updates
-        that a genotype must remain dominant for it to be printed out.  A
-        0 turns this off.
-<tr><td valign=top><b><tt>SPECIES_THRESHOLD</tt></b>
-    <td>In Avida, two organisms are said to be of the same species if you
-        can perform all possible crossovers between them, and no more than
-        a certain threshold (set here) fail to be viable offspring.  The
-        crossovers are done in isolation, and never affect the population as
-        a whole.
-<tr><td valign=top><b><tt>SPECIES_RECORDING</tt></b>
-    <td>This entry sets if and how species should be recorded in avida.  A
-        setting of 0 turns all species tests off.  A setting of 1 means that
-        every time a genotype reaches threshold, it is tested against all
-        currently existing species to determine if it is part of any of them.
-        If so, its species is set, and if not, it becomes the prototype of a
-        new species.  Finally, a setting of 2 only tests a new threshold
-        genotype against the species of its parent (since each species test
-        can take a long time) and if that fails immediately creates a new
-        species.  In practice, methods 1 and 2 produce similar results, but
-        method 1 can take a lot longer to run.
-<tr><td valign=top><b><tt>SPECIES_PRINT</tt></b>
-    <td>Toggle: Should new species be printed as soon as they are created?
-<tr><td valign=top><b><tt>TEST_CPU_TIME_MOD</tt></b>
-    <td>Many of our analysis methods (such as species testing) require that
-        we be able to run organisms in isolation.  Unfortunately, some of
-        these organisms we test might be non-viable.  At some point, we have
-        to give up the test and label it as non-viable, but we can't give up
-        too soon or else we might miss a viable, though slow replicator.
-        This setting is multiplied by the length of the organism's genome in
-        order to determine how many CPU-cycles to run the organism for.  A
-        setting of 20 effectively means that the average instruction must
-        be executed twenty times before we give up.  In practice, most
-        organisms have an efficiency here of about 5, so 20 works well, but
-        for accurate tests on some pathological organisms, we will be
-        required to raise this number.
-<tr><td valign=top bgcolor="#AAFFAA"><b><tt>TRACK_MAIN_LINEAGE</tt></b>
-    <td bgcolor="#AAFFAA">In a normal avida run, the genebank keeps track of all existing
-        genotypes, and deletes them when the last organism of that genotype
-        dies out.  With this flag set, a genotype will not be deleted unless
-        both it and <i>all of its descendents</i> have died off.  This allows
-        us to track back from any genotypes to its distant ancestors,
-        monitoring all of the differences along the way.  Once this information
-        is being saved, see the events file for how to output it.
-</table>
-
-
-
-<h3>Log Files</h3>
-
-<p>
-Log files are printed every time a specified event occurs.  By default,
-all logs settings are 0 (i.e. the logs are turned off).  Each time a logged
-event is printed, the update and identifying information on the individual
-that triggered it is always included.  There are more entries listed in the
-genesis file than here, but I think all of the rest are deprecated.
-
-<p>
-<table cellpadding=5 border=2>
-<tr><td valign=top><b><tt>LOG_CREATURES</tt></b>
-    <td>If toggle is set, print an entry to "creature.log" whenever a new
-        organism is born.  Include position information, parent organism, 
-        and a link to it genotype so the run can be reconstructed.  This
-        gets <i>very</i> large.
-<tr><td valign=top><b><tt>LOG_GENOTYPES</tt></b>
-    <td>If toggle is set, print an entry to "genotype.log" whenever a
-        new genotype is created.  Includes information on its parent genotype.
-<tr><td valign=top><b><tt>LOG_THRESHOLD</tt></b>
-    <td>If toggle is set, print an entry to "threshold.log" whenever a
-        genotype reaches threshold.  Includes information on what species it
-        is.
-<tr><td valign=top><b><tt>LOG_SPECIES</tt></b>
-    <td>If toggle is set, print an entry to "species.log" whenever a new
-        species is created.  Includes information on the genotype the
-        triggered the creation.
-<tr><td valign=top><b><tt>LOG_LINEAGES</tt></b>
-    <td>Lineages can be given unique identifies and printed (into the file
-        "lineage.log") whenever they are created.  Includes details about
-        the event that created the lineage.
-<tr><td valign=top><b><tt>LINEAGE_CREATION_METHOD</tt></b>
-    <td>Details when lineages are created.  This should probably be listed in
-        an earlier section, but there is way too much descriptive information
-        in the genesis file that should probably go instead into a manual.
-        Basically, this allows you to decide under exactly which conditions
-        a new lineage will be created.  I'll let you read the genesis file
-        itself to see the methods.
-</table>
-
-<br><hr>
-Project hosted by:<br>
-<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-    

Modified: development/documentation/index.html
===================================================================
--- development/documentation/index.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/index.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -29,7 +29,7 @@
 <h2>Configuration Files</h2>
 
 <p>
-<a href="genesis.html">Setting up the Genesis File</a>
+<a href="config.html">Setting up the Avida Configuration File</a>
 <br /><a href="inst_set.html">Setting up the Instruction Set</a>
 <br /><a href="events.html">Guidelines to setting Events</a>
 <br /><a href="environment.html">Guidelines to setting up Environments</a>

Modified: development/documentation/structure.html
===================================================================
--- development/documentation/structure.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/structure.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -15,6 +15,8 @@
 This document contains a guide to the files present in Avida, and where they are located.
 </p>
 
+
+<p>&nbsp;</p>
 <h2>Filenames</h2>
 
 <p>
@@ -66,6 +68,7 @@
 </p>
 
 
+<p>&nbsp;</p>
 <h2>Directory Structure</h2>
 
 <p>

Modified: development/documentation/svn.html
===================================================================
--- development/documentation/svn.html	2006-08-24 19:50:41 UTC (rev 894)
+++ development/documentation/svn.html	2006-08-25 01:56:22 UTC (rev 895)
@@ -25,6 +25,8 @@
 <a href="http://subversion.tigris.org/">http://subversion.tigris.org/</a>.
 </p>
 
+
+<p>&nbsp;</p>
 <h2>Using Subversion</h2>
 
 <p>

Modified: development/source/actions/PrintActions.cc
===================================================================
--- development/source/actions/PrintActions.cc	2006-08-24 19:50:41 UTC (rev 894)
+++ development/source/actions/PrintActions.cc	2006-08-25 01:56:22 UTC (rev 895)
@@ -58,7 +58,6 @@
 STATS_OUT_FILE(PrintTasksQualData,     tasks_quality.dat   );
 STATS_OUT_FILE(PrintResourceData,      resource.dat        );
 STATS_OUT_FILE(PrintTimeData,          time.dat            );
-STATS_OUT_FILE(PrintMutationData,      mutation.dat        );
 STATS_OUT_FILE(PrintMutationRateData,  mutation_rates.dat  );
 STATS_OUT_FILE(PrintDivideMutData,     divide_mut.dat      );
 STATS_OUT_FILE(PrintDominantParaData,  parasite.dat        );
@@ -1395,7 +1394,6 @@
   action_lib->Register<cActionPrintTasksQualData>("PrintTasksQualData");
   action_lib->Register<cActionPrintResourceData>("PrintResourceData");
   action_lib->Register<cActionPrintTimeData>("PrintTimeData");
-  action_lib->Register<cActionPrintMutationData>("PrintMutationData");
   action_lib->Register<cActionPrintMutationRateData>("PrintMutationRateData");
   action_lib->Register<cActionPrintDivideMutData>("PrintDivideMutData");
   action_lib->Register<cActionPrintDominantParaData>("PrintDominantParaData");
@@ -1451,7 +1449,6 @@
   action_lib->Register<cActionPrintTasksQualData>("print_tasks_qual_data");
   action_lib->Register<cActionPrintResourceData>("print_resource_data");
   action_lib->Register<cActionPrintTimeData>("print_time_data");
-  action_lib->Register<cActionPrintMutationData>("print_mutation_dat");
   action_lib->Register<cActionPrintMutationRateData>("print_mutation_rate_data");
   action_lib->Register<cActionPrintDivideMutData>("print_divide_mut_data");
   action_lib->Register<cActionPrintDominantParaData>("print_dom_parasite_data");

Modified: development/source/classification/cClassificationManager.cc
===================================================================
--- development/source/classification/cClassificationManager.cc	2006-08-24 19:50:41 UTC (rev 894)
+++ development/source/classification/cClassificationManager.cc	2006-08-25 01:56:22 UTC (rev 895)
@@ -287,7 +287,7 @@
                                      m_world->GetStats().GetUpdate() - in_genotype.GetUpdateBorn(),
                                      in_genotype.GetLength());
   if (in_genotype.GetThreshold()) {
-    m_world->GetStats().RemoveThreshold(in_genotype.GetID());
+    m_world->GetStats().RemoveThreshold();
   }
   
   
@@ -355,7 +355,7 @@
       if (in_genotype.GetSpecies())
         found_species->SetParentID(in_genotype.GetSpecies()->GetID());
       m_species_ctl->SetActive(*found_species);
-      m_world->GetStats().AddSpecies(found_species->GetID());
+      m_world->GetStats().AddSpecies();
       
       // Since this is a new species, see if we should be printing it.
       

Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc	2006-08-24 19:50:41 UTC (rev 894)
+++ development/source/main/cPopulation.cc	2006-08-25 01:56:22 UTC (rev 895)
@@ -455,8 +455,7 @@
   // Statistics...
   cOrganism * organism = in_cell.GetOrganism();
   cGenotype * genotype = organism->GetGenotype();
-  m_world->GetStats().RecordDeath(in_cell.GetID(), genotype->GetID(),
-                                  organism->GetPhenotype().GetAge());
+  m_world->GetStats().RecordDeath();
   
   // Do the lineage handling
   if (m_world->GetConfig().LOG_LINEAGES.Get()) { m_world->GetClassificationManager().RemoveLineageOrganism(organism); }

Modified: development/source/main/cStats.cc
===================================================================
--- development/source/main/cStats.cc	2006-08-24 19:50:41 UTC (rev 894)
+++ development/source/main/cStats.cc	2006-08-25 01:56:22 UTC (rev 895)
@@ -15,16 +15,15 @@
 #include "cStringUtil.h"
 #include "tDataEntry.h"
 #include "cWorld.h"
+#include "cWorldDriver.h"
 
 #include <float.h>
 #include <math.h>
 
-using namespace std;
 
-
 cStats::cStats(cWorld* world)
   : m_world(world)
-  , current_update(-1)
+  , m_update(-1)
   , sub_update(0)
   , avida_time(0)
   , data_manager(this, "population_data")
@@ -216,13 +215,13 @@
 
 void cStats::ZeroTasks()
 {
-  for( int i=0; i < task_cur_count.GetSize(); i++ ){
+  for (int i = 0; i < task_cur_count.GetSize(); i++) {
     task_cur_count[i] = 0;
-	task_last_count[i] = 0;
-	task_cur_quality[i] = 0;
-	task_last_quality[i] = 0;
-	task_last_max_quality[i] = 0;
-	task_cur_max_quality[i] = 0;
+    task_last_count[i] = 0;
+    task_cur_quality[i] = 0;
+    task_last_quality[i] = 0;
+    task_last_max_quality[i] = 0;
+    task_cur_max_quality[i] = 0;
   }
 }
 
@@ -254,8 +253,8 @@
   // after a mutation occurs, that it will be the original instruction again;
   // This needs to be adjusted for!
 
-  double adj = ((double) (m_world->GetNumInstructions() - 1)) /
-    (double) m_world->GetNumInstructions();
+  double adj = static_cast<double>(m_world->GetNumInstructions() - 1) /
+    static_cast<double>(m_world->GetNumInstructions());
 
   double base_fidelity = (1.0 - adj * m_world->GetConfig().DIVIDE_MUT_PROB.Get()) *
     (1.0 - m_world->GetConfig().DIVIDE_INS_PROB.Get()) * (1.0 - m_world->GetConfig().DIVIDE_DEL_PROB.Get());
@@ -271,20 +270,18 @@
   num_births++;
 
   if (m_world->GetConfig().LOG_CREATURES.Get()) {
-    m_world->GetDataFileOFStream("creature.log") << GetUpdate() << " "
-      << cell_id << " " << genotype_id   << endl;
+    cDataFile& df = m_world->GetDataFile("creature.log");
+    df.Write(m_update, "Update");
+    df.Write(cell_id, "Cell ID");
+    df.Write(genotype_id, "Genotype ID");
+    df.Endl();
   }
 
-  if (breed_true == true) num_breed_true++;
+  if (breed_true) num_breed_true++;
   else num_breed_in++;
 }
 
 
-void cStats::RecordDeath(int cell_id, int genotype_id, int age)
-{
-  num_deaths++;
-}
-
 void cStats::RemoveGenotype(int id_num, int parent_id,
    int parent_dist, int depth, int max_abundance, int parasite_abundance,
    int age, int length)
@@ -292,77 +289,63 @@
   if (m_world->GetConfig().LOG_GENOTYPES.Get() &&
       (m_world->GetConfig().LOG_GENOTYPES.Get() != 2 || max_abundance > 2)) {
     const int update_born = cStats::GetUpdate() - age + 1;
-    m_world->GetDataFileOFStream("genotype.log")
-      << id_num             << " "    //  1
-      << update_born        << " "    //  2
-      << parent_id          << " "    //  3
-      << parent_dist        << " "    //  4
-      << depth              << " "    //  5
-      << max_abundance      << " "    //  6
-      << age                << " "    //  7
-      << length             << endl;  //  8
+    cDataFile& df = m_world->GetDataFile("genotype.log");
+    df.Write(id_num, "Genotype ID");
+    df.Write(update_born, "Update Born");
+    df.Write(parent_id, "Parent ID");
+    df.Write(parent_dist, "Parent Distance");
+    df.Write(depth, "Depth");
+    df.Write(max_abundance, "Maximum Abundance");
+    df.Write(age, "Age");
+    df.Write(length, "Length");
+    df.Endl();
   }
 
   (void) parasite_abundance; // Not used now, but maybe in future.
 }
 
-void cStats::AddThreshold(int id_num, const char * name, int species_num)
+void cStats::AddThreshold(int id_num, const char* name, int species_num)
 {
   num_threshold++;
   tot_threshold++;
-  if (m_world->GetConfig().LOG_THRESHOLD.Get())
-    m_world->GetDataFileOFStream("threshold.log")
-      << cStats::GetUpdate() << " "   // 1
-      << id_num              << " "   // 2
-      << species_num         << " "   // 3
-      << name                << endl; // 4
+  if (m_world->GetConfig().LOG_THRESHOLD.Get()) {
+    cDataFile& df = m_world->GetDataFile("threshold.log");
+    df.Write(m_update, "Update");
+    df.Write(id_num, "ID");
+    df.Write(species_num, "Species Num");
+    df.Write(name, "Name");
+    df.Endl();
+  }
 }
 
-void cStats::RemoveThreshold(int id_num)
-{
-  id_num = -1;  // @CAO do we still need id_num here?
-  num_threshold--;
-}
 
-void cStats::AddSpecies(int id_num)
+void cStats::RemoveSpecies(int id_num, int parent_id, int max_gen_abundance, int max_abundance, int age)
 {
-  id_num = -1; // @CAO do we still need id_num here?
-  tot_species++;
-  num_species++;
-}
-
-void cStats::RemoveSpecies(int id_num, int parent_id,
-			   int max_gen_abundance, int max_abundance, int age)
-{
   num_species--;
-  if (m_world->GetConfig().LOG_SPECIES.Get())
-    m_world->GetDataFileOFStream("species.log")
-      << cStats::GetUpdate() << " "   // 1
-      << id_num              << " "   // 2
-      << parent_id           << " "   // 3
-      << max_gen_abundance   << " "   // 4
-      << max_abundance       << " "   // 5
-      << age                 << endl; // 6
+  if (m_world->GetConfig().LOG_SPECIES.Get()) {
+    cDataFile& df = m_world->GetDataFile("species.log");
+    df.Write(m_update, "Update");
+    df.Write(id_num, "Species ID");
+    df.Write(parent_id, "Parent ID");
+    df.Write(max_gen_abundance, "Maximum Gen Abundance");
+    df.Write(max_abundance, "Maximum Abundance");
+    df.Write(age, "Age");
+    df.Endl();
+  }
 }
 
-void cStats::AddLineage()
-{
-  tot_lineages++;
-  num_lineages++;
-}
-
 void cStats::ProcessUpdate()
 {
   // Increment the "avida_time"
   if (sum_merit.Count() > 0 && sum_merit.Average() > 0) {
-    double delta = ((double)(current_update-last_update))/sum_merit.Average();
+    double delta = ((double)(m_update-last_update))/sum_merit.Average();
     avida_time += delta;
 
     // calculate the true replication rate in this update
     rave_true_replication_rate.Add( num_births/
 	  (delta * m_world->GetConfig().AVE_TIME_SLICE.Get() * num_creatures) );
   }
-  last_update = current_update;
+  last_update = m_update;
 
   // Zero-out any variables which need to be cleared at end of update.
 
@@ -418,27 +401,27 @@
 
 void cStats::PrintDataFile(const cString& filename, const cString& format, char sep)
 {
-  cDataFile & data_file = m_world->GetDataFile(filename);
+  cDataFile& data_file = m_world->GetDataFile(filename);
   data_manager.PrintRow(data_file, format, sep);
 }
 
 
-void cStats::PrintAverageData(const cString & filename)
+void cStats::PrintAverageData(const cString& filename)
 {
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida average data" );
+  df.WriteComment("Avida Average Data");
   df.WriteTimeStamp();
 
-  df.Write(GetUpdate(),                   "update");
-  df.Write(sum_merit.Average(),           "average merit");
-  df.Write(sum_gestation.Average(),       "average gestation time");
-  df.Write(sum_fitness.Average(),         "average fitness");
-  df.Write(sum_repro_rate.Average(),      "repro rate?");
-  df.Write(sum_size.Average(),            "average size");
-  df.Write(sum_copy_size.Average(),       "average copied size");
-  df.Write(sum_exe_size.Average(),        "average executed size");
-  df.Write(sum_abundance.Average(),       "average abundance?");
+  df.Write(m_update,                "Update");
+  df.Write(sum_merit.Average(),           "Merit");
+  df.Write(sum_gestation.Average(),       "Gestation Time");
+  df.Write(sum_fitness.Average(),         "Fitness");
+  df.Write(sum_repro_rate.Average(),      "Repro Rate?");
+  df.Write(sum_size.Average(),            "Size");
+  df.Write(sum_copy_size.Average(),       "Copied Size");
+  df.Write(sum_exe_size.Average(),        "Executed Size");
+  df.Write(sum_abundance.Average(),       "Abundance");
   
   // The following causes births and breed true to default to 0.0 when num_creatures is 0
   double ave_births = 0.0;
@@ -448,173 +431,181 @@
     ave_births = static_cast<double>(num_births) / d_num_creatures;
     ave_breed_true = static_cast<double>(num_breed_true) / d_num_creatures;
   }
-  df.Write(ave_births,                    "proportion of organisms that gave birth in this update");
-  df.Write(ave_breed_true,                "proportion of breed true organisms");
+  df.Write(ave_births,                    "Proportion of organisms that gave birth in this update");
+  df.Write(ave_breed_true,                "Proportion of Breed True Organisms");
   
-  df.Write(sum_genotype_depth.Average(),  "average genotype depth");
-  df.Write(sum_generation.Average(),      "average generation");
-  df.Write(sum_neutral_metric.Average(),  "average neutral metric");
-  df.Write(sum_lineage_label.Average(),   "average lineage label");
-  df.Write(rave_true_replication_rate.Average(),
-	   "true replication rate (based on births/update, time-averaged)");
+  df.Write(sum_genotype_depth.Average(),  "Genotype Depth");
+  df.Write(sum_generation.Average(),      "Generation");
+  df.Write(sum_neutral_metric.Average(),  "Neutral Metric");
+  df.Write(sum_lineage_label.Average(),   "Lineage Label");
+  df.Write(rave_true_replication_rate.Average(), "True Replication Rate (based on births/update, time-averaged)");
   df.Endl();
 }
 
 
-void cStats::PrintErrorData(const cString & filename)
+void cStats::PrintErrorData(const cString& filename)
 {
-  ofstream& fp = m_world->GetDataFileOFStream(filename);
-  assert(fp.good());
-  fp<< GetUpdate()                          << " "  // 1
-    << sum_merit.StdError()                 << " "  // 2
-    << sum_gestation.StdError()             << " "  // 3
-    << sum_fitness.StdError()               << " "  // 4
-    << sum_repro_rate.StdError()            << " "  // 5
-    << sum_size.StdError()                  << " "  // 6
-    << sum_copy_size.StdError()             << " "  // 7
-    << sum_exe_size.StdError()              << " "  // 8
-    << sum_abundance.StdError()             << " "  // 9
-    << -1                                   << " "  // 10
-    << -1                                   << " "  // 11
-    << sum_genotype_depth.StdError()        << " "  // 12
-    << sum_generation.StdError()            << " "  // 15
-    << sum_neutral_metric.StdError()        << " "  // 16
-    << sum_lineage_label.StdError()         << endl;// 17
+  cDataFile& df = m_world->GetDataFile(filename);
+  
+  df.WriteComment("Avida Standard Error Data");
+  df.WriteTimeStamp();
+
+  df.Write(m_update,                 "Update");
+  df.Write(sum_merit.StdError(),           "Merit");
+  df.Write(sum_gestation.StdError(),       "Gestation Time");
+  df.Write(sum_fitness.StdError(),         "Fitness");
+  df.Write(sum_repro_rate.StdError(),      "Repro Rate?");
+  df.Write(sum_size.StdError(),            "Size");
+  df.Write(sum_copy_size.StdError(),       "Copied Size");
+  df.Write(sum_exe_size.StdError(),        "Executed Size");
+  df.Write(sum_abundance.StdError(),       "Abundance");
+  df.Write(-1,                             "(No Data)");
+  df.Write(-1,                             "(No Data)");
+  df.Write(sum_genotype_depth.StdError(),  "Genotype Depth");
+  df.Write(sum_generation.StdError(),      "Generation");
+  df.Write(sum_neutral_metric.StdError(),  "Neutral Metric");
+  df.Write(sum_lineage_label.StdError(),   "Lineage Label");
+  df.Write(rave_true_replication_rate.StdError(), "True Replication Rate (based on births/update, time-averaged)");
+  df.Endl();
 }
 
 
-void cStats::PrintVarianceData(const cString & filename)
+void cStats::PrintVarianceData(const cString& filename)
 {
-  ofstream& fp = m_world->GetDataFileOFStream(filename);
-  assert(fp.good());
-  fp<<GetUpdate()                           << " "  // 1
-    << sum_merit.Variance()                 << " "  // 2
-    << sum_gestation.Variance()             << " "  // 3
-    << sum_fitness.Variance()               << " "  // 4
-    << sum_repro_rate.Variance()            << " "  // 5
-    << sum_size.Variance()                  << " "  // 6
-    << sum_copy_size.Variance()             << " "  // 7
-    << sum_exe_size.Variance()              << " "  // 8
-    << sum_abundance.Variance()             << " "  // 9
-    << -1                                   << " "  // 10
-    << -1                                   << " "  // 11
-    << sum_genotype_depth.Variance()        << " "  // 12
-    << sum_generation.Variance()            << " "  // 15
-    << sum_neutral_metric.Variance()        << " "  // 16
-    << sum_lineage_label.Variance()         << " "  // 17
-    << rave_true_replication_rate.Variance()<< endl;// 18
+  cDataFile& df = m_world->GetDataFile(filename);
+
+  df.WriteComment("Avida Variance Data");
+  df.WriteTimeStamp();
+
+  df.Write(m_update,                 "Update");
+  df.Write(sum_merit.Variance(),           "Merit");
+  df.Write(sum_gestation.Variance(),       "Gestation Time");
+  df.Write(sum_fitness.Variance(),         "Fitness");
+  df.Write(sum_repro_rate.Variance(),      "Repro Rate?");
+  df.Write(sum_size.Variance(),            "Size");
+  df.Write(sum_copy_size.Variance(),       "Copied Size");
+  df.Write(sum_exe_size.Variance(),        "Executed Size");
+  df.Write(sum_abundance.Variance(),       "Abundance");
+  df.Write(-1,                             "(No Data)");
+  df.Write(-1,                             "(No Data)");
+  df.Write(sum_genotype_depth.Variance(),  "Genotype Depth");
+  df.Write(sum_generation.Variance(),      "Generation");
+  df.Write(sum_neutral_metric.Variance(),  "Neutral Metric");
+  df.Write(sum_lineage_label.Variance(),   "Lineage Label");
+  df.Write(rave_true_replication_rate.Variance(), "True Replication Rate (based on births/update, time-averaged)");
+  df.Endl();
 }
 
 
-void cStats::PrintDominantData(const cString & filename)
+void cStats::PrintDominantData(const cString& filename)
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida dominant data" );
+  df.WriteComment("Avida Dominant Data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),     "update" );
-  df.Write( dom_merit,       "average merit of dominant genotype" );
-  df.Write( dom_gestation,   "average gestation time of dominant" );
-  df.Write( dom_fitness,     "average fitness of dominant genotype" );
-  df.Write( dom_repro_rate,  "repro rate?" );
-  df.Write( dom_size,        "size of dominant genotype" );
-  df.Write( dom_copied_size, "copied size of dominant genotype" );
-  df.Write( dom_exe_size,    "executed size of dominant genotype" );
-  df.Write( dom_abundance,   "abundance of dominant genotype" );
-  df.Write( dom_births,      "number of births" );
-  df.Write( dom_breed_true,  "number of dominant breed true?" );
-  df.Write( dom_gene_depth,  "dominant gene depth" );
-  df.Write( dom_breed_in,    "dominant breed in");
-  df.Write( max_fitness,     "max fitness?" );
-  df.Write( dom_genotype_id, "genotype ID of dominant genotype" );
-  df.Write( dom_name,        "name of dominant genotype" );
+  df.Write(m_update,     "Update");
+  df.Write(dom_merit,       "Average Merit of the Dominant Genotype");
+  df.Write(dom_gestation,   "Average Gestation Time of the Dominant Genotype");
+  df.Write(dom_fitness,     "Average Fitness of the Dominant Genotype");
+  df.Write(dom_repro_rate,  "Repro Rate?");
+  df.Write(dom_size,        "Size of Dominant Genotype");
+  df.Write(dom_copied_size, "Copied Size of Dominant Genotype");
+  df.Write(dom_exe_size,    "Executed Size of Dominant Genotype");
+  df.Write(dom_abundance,   "Abundance of Dominant Genotype");
+  df.Write(dom_births,      "Number of Births");
+  df.Write(dom_breed_true,  "Number of Dominant Breed True?");
+  df.Write(dom_gene_depth,  "Dominant Gene Depth");
+  df.Write(dom_breed_in,    "Dominant Breed In");
+  df.Write(max_fitness,     "Max Fitness?");
+  df.Write(dom_genotype_id, "Genotype ID of Dominant Genotype");
+  df.Write(dom_name,        "Name of the Dominant Genotype");
   df.Endl();
 }
 
-void cStats::PrintDominantParaData(const cString & filename)
+void cStats::PrintDominantParaData(const cString& filename)
 {
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida dominant parasite data" );
+  df.WriteComment("Avida Dominant Parasite Data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),     "update" );
-  df.Write( dom_inj_size,        "size of dominant genotype" );
-  df.Write( dom_inj_abundance,   "abundance of dominant genotype" );
-  df.Write( dom_inj_genotype_id, "genotype ID of dominant genotype" );
-  df.Write( dom_inj_name,        "name of dominant genotype" );
+  df.Write(m_update, "Update");
+  df.Write(dom_inj_size, "Size of Dominant Parasite Genotype");
+  df.Write(dom_inj_abundance, "Abundance of Dominant Parasite Genotype");
+  df.Write(dom_inj_genotype_id, "Genotype ID of Dominant Parasite Genotype");
+  df.Write(dom_inj_name, "Name of the Dominant Parasite Genotype");
   df.Endl();
 }
 
-void cStats::PrintStatsData(const cString & filename)
+void cStats::PrintStatsData(const cString& filename)
 {
   const int genotype_change = num_genotypes - num_genotypes_last;
   const double log_ave_fid = (ave_fidelity > 0) ? -Log(ave_fidelity) : 0.0;
   const double log_dom_fid = (dom_fidelity > 0) ? -Log(dom_fidelity) : 0.0;
 
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Generic Statistics Data" );
+  df.WriteComment("Generic Statistics Data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),          "update" );
-  df.Write( energy,               "average inferiority (energy)");
-  df.Write( 1.0 - ave_fidelity,   "ave probability of any mutations in genome" );
-  df.Write( 1.0 - dom_fidelity,   "probability of any mutations in dom genome" );
-  df.Write( log_ave_fid,          "log(average fidelity)");
-  df.Write( log_dom_fid,          "log(dominant fidelity)");
-  df.Write( genotype_change,      "change in number of genotypes");
-  df.Write( entropy,              "genotypic entropy");
-  df.Write( species_entropy,      "species entropy");
-  df.Write( coal_depth,           "depth of most reacent coalescence");
-  df.Write( num_resamplings,      "Total number of resamplings this generation");
-  df.Write( num_failedResamplings, "Total number of organisms that failed to resample this generation"); 
+  df.Write(m_update,          "update");
+  df.Write(energy,               "average inferiority (energy)");
+  df.Write(1.0 - ave_fidelity,   "ave probability of any mutations in genome");
+  df.Write(1.0 - dom_fidelity,   "probability of any mutations in dom genome");
+  df.Write(log_ave_fid,          "log(average fidelity)");
+  df.Write(log_dom_fid,          "log(dominant fidelity)");
+  df.Write(genotype_change,      "change in number of genotypes");
+  df.Write(entropy,              "genotypic entropy");
+  df.Write(species_entropy,      "species entropy");
+  df.Write(coal_depth,           "depth of most reacent coalescence");
+  df.Write(num_resamplings,      "Total number of resamplings this generation");
+  df.Write(num_failedResamplings, "Total number of organisms that failed to resample this generation"); 
 
   df.Endl();
 }
 
 
-void cStats::PrintCountData(const cString & filename)
+void cStats::PrintCountData(const cString& filename)
 {
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida count data" );
+  df.WriteComment("Avida count data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),            "update");
-  df.Write( num_executed,           "number of insts executed this update");
-  df.Write( num_creatures,          "number of organisms");
-  df.Write( num_genotypes,          "number of different genotypes");
-  df.Write( num_threshold,          "number of different threshold genotypes");
-  df.Write( num_species,            "number of different species");
-  df.Write( num_thresh_species,     "number of different threshold species");
-  df.Write( num_lineages,           "number of different lineages");
-  df.Write( num_births,             "number of births in this update");
-  df.Write( num_deaths,             "number of deaths in this update");
-  df.Write( num_breed_true,         "number of breed true");
-  df.Write( num_breed_true_creatures, "number of breed true organisms?");
-  //df.Write( num_parasites,            "number of parasites");
-  df.Write( num_no_birth_creatures,   "number of no-birth organisms");
-  df.Write( num_single_thread_creatures, "number of single-threaded organisms");
-  df.Write( num_multi_thread_creatures, "number of multi-threaded organisms");
-  df.Write( num_modified, "number of modified organisms");
+  df.Write(m_update,         "update");
+  df.Write(num_executed,           "number of insts executed this update");
+  df.Write(num_creatures,          "number of organisms");
+  df.Write(num_genotypes,          "number of different genotypes");
+  df.Write(num_threshold,          "number of different threshold genotypes");
+  df.Write(num_species,            "number of different species");
+  df.Write(num_thresh_species,     "number of different threshold species");
+  df.Write(num_lineages,           "number of different lineages");
+  df.Write(num_births,             "number of births in this update");
+  df.Write(num_deaths,             "number of deaths in this update");
+  df.Write(num_breed_true,         "number of breed true");
+  df.Write(num_breed_true_creatures, "number of breed true organisms?");
+  //df.Write(num_parasites,            "number of parasites");
+  df.Write(num_no_birth_creatures,   "number of no-birth organisms");
+  df.Write(num_single_thread_creatures, "number of single-threaded organisms");
+  df.Write(num_multi_thread_creatures, "number of multi-threaded organisms");
+  df.Write(num_modified, "number of modified organisms");
   df.Endl();
 }
 
 
-void cStats::PrintTotalsData(const cString & filename)
+void cStats::PrintTotalsData(const cString& filename)
 {
-  ofstream& fp = m_world->GetDataFileOFStream(filename);
-  assert(fp.good());
-  fp << GetUpdate()                  << " " // 1
-     << (tot_executed+num_executed)  << " " // 2
-     << num_executed            << " " // 3
-     << tot_organisms                << " " // 4
-     << tot_genotypes                << " " // 5
-     << tot_threshold                << " " // 6
-     << tot_species                  << " " // 7
-     << tot_lineages                 << endl; // 8
+  cDataFile& df = m_world->GetDataFile(filename);
+  df.Write(m_update, "Update");
+  df.Write((tot_executed+num_executed), "Total Instructions Executed");
+  df.Write(num_executed, "Instructions Executed This Update");
+  df.Write(tot_organisms, "Total Organisms");
+  df.Write(tot_genotypes, "Total Genotypes");
+  df.Write(tot_threshold, "Total Threshold");
+  df.Write(tot_species, "Total Species");
+  df.Write(tot_lineages, "Total Lineages");
+  df.Endl();
 }
 
 
@@ -631,14 +622,14 @@
 
 	// print tasks.dat
 	cDataFile& df = m_world->GetDataFile(file);
-	df.WriteComment( "Avida tasks data" );
+	df.WriteComment("Avida tasks data");
 	df.WriteTimeStamp();
-	df.WriteComment( "First column gives the current update, next columns give the number" );
-	df.WriteComment( "of organisms that have the particular task as a component of their merit" );
+	df.WriteComment("First column gives the current update, next columns give the number");
+	df.WriteComment("of organisms that have the particular task as a component of their merit");
 
-	df.Write( GetUpdate(),   "Update");
+	df.Write(m_update,   "Update");
 	for(int i = 0; i < task_last_count.GetSize(); i++) {
-		df.Write( task_last_count[i], task_names[i] );
+		df.Write(task_last_count[i], task_names[i] );
 	}
 	df.Endl();
 }
@@ -648,14 +639,14 @@
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida tasks execution data" );
+  df.WriteComment("Avida tasks execution data");
   df.WriteTimeStamp();
-  df.WriteComment( "First column gives the current update, all further columns give the number" );
-  df.WriteComment( "of times the particular task has been executed this update." );
+  df.WriteComment("First column gives the current update, all further columns give the number");
+  df.WriteComment("of times the particular task has been executed this update.");
 
-  df.Write( GetUpdate(),   "Update");
+  df.Write(m_update,   "Update");
   for (int i = 0; i < task_exe_count.GetSize(); i++) {
-    df.Write( task_exe_count[i], task_names[i] );
+    df.Write(task_exe_count[i], task_names[i] );
     task_exe_count[i] = 0;
   }
   df.Endl();
@@ -665,10 +656,10 @@
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida tasks quality data" );
+  df.WriteComment("Avida tasks quality data");
   df.WriteTimeStamp();
-  df.WriteComment( "First column gives the current update, rest give average and max task quality" );
-  df.Write( GetUpdate(), "Update");
+  df.WriteComment("First column gives the current update, rest give average and max task quality");
+  df.Write(m_update, "Update");
   for(int i = 0; i < task_last_count.GetSize(); i++) {
     double qual = 0.0;
     if (task_last_count[i] > 0) 
@@ -679,35 +670,35 @@
   df.Endl();
 }
 
-void cStats::PrintReactionData(const cString & filename)
+void cStats::PrintReactionData(const cString& filename)
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida reaction data" );
+  df.WriteComment("Avida reaction data");
   df.WriteTimeStamp();
-  df.WriteComment( "First column gives the current update, all further columns give the number" );
-  df.WriteComment( "of currently living organisms each reaction has affected." );
+  df.WriteComment("First column gives the current update, all further columns give the number");
+  df.WriteComment("of currently living organisms each reaction has affected.");
 
-  df.Write( GetUpdate(),   "Update");
+  df.Write(m_update,   "Update");
   for (int i = 0; i < reaction_count.GetSize(); i++) {
-    df.Write( reaction_count[i], reaction_names[i] );
+    df.Write(reaction_count[i], reaction_names[i] );
     task_exe_count[i] = 0;
   }
   df.Endl();
 }
 
-void cStats::PrintResourceData(const cString & filename)
+void cStats::PrintResourceData(const cString& filename)
 {
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida resource data" );
+  df.WriteComment("Avida resource data");
   df.WriteTimeStamp();
-  df.WriteComment( "First column gives the current update, all further columns give the quantity" );
-  df.WriteComment( "of the particular resource at that update." );
+  df.WriteComment("First column gives the current update, all further columns give the quantity");
+  df.WriteComment("of the particular resource at that update.");
 
-  df.Write( GetUpdate(),   "Update");
+  df.Write(m_update,   "Update");
   for (int i = 0; i < resource_count.GetSize(); i++) {
-    df.Write( resource_count[i], resource_names[i] );
+    df.Write(resource_count[i], resource_names[i] );
     if (resource_geometry[i] != nGeometry::GLOBAL) {
       PrintSpatialResData(filename, i);
     }
@@ -715,14 +706,14 @@
   df.Endl();
 }
 
-void cStats::PrintSpatialResData(const cString & filename, int i)
+void cStats::PrintSpatialResData(const cString& filename, int i)
 {
 
   // Write spatial data to a file that can easily be read into Matlab
 
   cString tmpfilename = "resource_";
   tmpfilename +=  resource_names[i] + ".m";
-  cDataFile & df = m_world->GetDataFile(tmpfilename);
+  cDataFile& df = m_world->GetDataFile(tmpfilename);
   cString UpdateStr = resource_names[i] + 
                       cStringUtil::Stringf( "%07i", GetUpdate() ) + " = [ ...";
 
@@ -740,133 +731,87 @@
 }
 
 
-void cStats::PrintTimeData(const cString & filename)
+void cStats::PrintTimeData(const cString& filename)
 {
-  cDataFile & df = m_world->GetDataFile(filename);
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida time data" );
+  df.WriteComment("Avida time data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),              "update" );
-  df.Write( avida_time,               "avida time" );
-  df.Write( sum_generation.Average(), "average generation" );
-  df.Write( num_executed,             "num_executed?" );
+  df.Write(m_update,              "update");
+  df.Write(avida_time,               "avida time");
+  df.Write(sum_generation.Average(), "average generation");
+  df.Write(num_executed,             "num_executed?");
   df.Endl();
 }
 
 
-void cStats::PrintMutationData(const cString & filename)
+void cStats::PrintMutationRateData(const cString& filename)
 {
-  ofstream& fp = m_world->GetDataFileOFStream(filename);
-  assert(fp.good());
-  fp << GetUpdate()                              << " "   //  1
-     << isum_parent_dist.Ave()                   << " "   //  2
-     << isum_parent_size.Ave()                   << " "   //  3
-     << isum_child_size.Ave()                    << " "   //  4
-     << isum_copied_size.Ave()                   << " "   //  5
-     << isum_executed_size.Ave()                 << " "   //  6
-     << isum_copies_exec.Ave()                   << " "   //  7
-     << isum_point_mut.Ave()                     << " "   //  8
-     << isum_copy_mut.Ave()                      << " "   //  9
-     << isum_insert_mut.Ave()                    << " "   // 10
-     << isum_delete_mut.Ave()                    << " "   // 11
-     << isum_point_mut_line.Ave()                << " "   // 12
-     << isum_copy_mut_line.Ave()                 << " "   // 13
-     << isum_divide_mut.Ave()                    << " "   // 14
-     << isum_divide_insert_mut.Ave()             << " "   // 15
-     << isum_divide_delete_mut.Ave()             << " "   // 16
-     << dsum_copy_mut_by_copies_exec.Ave()       << " "   // 17
-     << dsum_copied_size_by_copies_exec.Ave()    << " "   // 18
-     << dsum_copy_mut_lines_by_copied_size.Ave() << " "   // 19
-     << dsum_copy_mut_lines_by_copy_mut.Ave()    << endl; // 20
+  cDataFile& df = m_world->GetDataFile(filename);
 
-  isum_parent_dist.Clear();
-  isum_parent_size.Clear();
-  isum_child_size.Clear();
-  isum_point_mut.Clear();
-  isum_copy_mut.Clear();
-  isum_insert_mut.Clear();
-  isum_point_mut_line.Clear();
-  isum_copy_mut_line.Clear();
-  isum_delete_mut.Clear();
-  isum_divide_mut.Clear();
-  isum_divide_insert_mut.Clear();
-  isum_divide_delete_mut.Clear();
-  isum_copied_size.Clear();
-  isum_executed_size.Clear();
-  isum_copies_exec.Clear();
-  dsum_copy_mut_by_copies_exec.Clear();
-  dsum_copied_size_by_copies_exec.Clear();
-  dsum_copy_mut_lines_by_copied_size.Clear();
-  dsum_copy_mut_lines_by_copy_mut.Clear();
-}
-
-void cStats::PrintMutationRateData(const cString & filename)
-{
-  cDataFile & df = m_world->GetDataFile(filename);
-
-  df.WriteComment( "Avida copy mutation rate data" );
+  df.WriteComment("Avida copy mutation rate data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),              "Update" );
-  df.Write( sum_copy_mut_rate.Ave(),  "Average copy mutation rate" );
-  df.Write( sum_copy_mut_rate.Var(),  "Variance in copy mutation rate" );
-  df.Write( sum_copy_mut_rate.StdDeviation(),  "Standard Deviation in copy mutation rate" );
-  df.Write( sum_copy_mut_rate.Skw(),  "Skew in copy mutation rate" );
-  df.Write( sum_copy_mut_rate.Kur(),  "Kurtosis in copy mutation rate" );
+  df.Write(m_update, "Update");
+  df.Write(sum_copy_mut_rate.Ave(), "Average copy mutation rate");
+  df.Write(sum_copy_mut_rate.Var(), "Variance in copy mutation rate");
+  df.Write(sum_copy_mut_rate.StdDeviation(), "Standard Deviation in copy mutation rate");
+  df.Write(sum_copy_mut_rate.Skw(), "Skew in copy mutation rate");
+  df.Write(sum_copy_mut_rate.Kur(), "Kurtosis in copy mutation rate");
 
-  df.Write( sum_log_copy_mut_rate.Ave(),  "Average log(copy mutation rate)" );
-  df.Write( sum_log_copy_mut_rate.Var(),  "Variance in log(copy mutation rate)" );
-  df.Write( sum_log_copy_mut_rate.StdDeviation(),  "Standard Deviation in log(copy mutation rate)" );
-  df.Write( sum_log_copy_mut_rate.Skw(),  "Skew in log(copy mutation rate)" );
-  df.Write( sum_log_copy_mut_rate.Kur(),  "Kurtosis in log(copy mutation rate)" );
+  df.Write(sum_log_copy_mut_rate.Ave(), "Average log(copy mutation rate)");
+  df.Write(sum_log_copy_mut_rate.Var(), "Variance in log(copy mutation rate)");
+  df.Write(sum_log_copy_mut_rate.StdDeviation(), "Standard Deviation in log(copy mutation rate)");
+  df.Write(sum_log_copy_mut_rate.Skw(), "Skew in log(copy mutation rate)");
+  df.Write(sum_log_copy_mut_rate.Kur(), "Kurtosis in log(copy mutation rate)");
   df.Endl();
 
 }
 
 
-void cStats::PrintDivideMutData(const cString & filename)
+void cStats::PrintDivideMutData(const cString& filename)
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida divide mutation rate data" );
+  df.WriteComment("Avida divide mutation rate data");
   df.WriteTimeStamp();
 
-  df.Write( GetUpdate(),              "Update" );
-  df.Write( sum_div_mut_rate.Ave(),  "Average divide mutation rate" );
-  df.Write( sum_div_mut_rate.Var(),  "Variance in divide mutation rate" );
-  df.Write( sum_div_mut_rate.StdDeviation(),  "Standard Deviation in divide mutation rate" );
-  df.Write( sum_div_mut_rate.Skw(),  "Skew in divide mutation rate" );
-  df.Write( sum_div_mut_rate.Kur(),  "Kurtosis in divide mutation rate" );
+  df.Write(m_update, "Update");
+  df.Write(sum_div_mut_rate.Ave(), "Average divide mutation rate");
+  df.Write(sum_div_mut_rate.Var(), "Variance in divide mutation rate");
+  df.Write(sum_div_mut_rate.StdDeviation(), "Standard Deviation in divide mutation rate");
+  df.Write(sum_div_mut_rate.Skw(), "Skew in divide mutation rate");
+  df.Write(sum_div_mut_rate.Kur(), "Kurtosis in divide mutation rate");
 
-  df.Write( sum_log_div_mut_rate.Ave(),  "Average log(divide mutation rate)" );
-  df.Write( sum_log_div_mut_rate.Var(),  "Variance in log(divide mutation rate)" );
-  df.Write( sum_log_div_mut_rate.StdDeviation(),  "Standard Deviation in log(divide mutation rate)" );
-  df.Write( sum_log_div_mut_rate.Skw(),  "Skew in log(divide mutation rate)" );
-  df.Write( sum_log_div_mut_rate.Kur(),  "Kurtosis in log(divide mutation rate)" );
+  df.Write(sum_log_div_mut_rate.Ave(), "Average log(divide mutation rate)");
+  df.Write(sum_log_div_mut_rate.Var(), "Variance in log(divide mutation rate)");
+  df.Write(sum_log_div_mut_rate.StdDeviation(), "Standard Deviation in log(divide mutation rate)");
+  df.Write(sum_log_div_mut_rate.Skw(), "Skew in log(divide mutation rate)");
+  df.Write(sum_log_div_mut_rate.Kur(), "Kurtosis in log(divide mutation rate)");
   df.Endl();
 }
 
-void cStats::PrintInstructionData(const cString & filename)
+void cStats::PrintInstructionData(const cString& filename)
 {
   cDataFile& df = m_world->GetDataFile(filename);
 
-  df.WriteComment( "Avida instruction execution data" );
+  df.WriteComment("Avida instruction execution data");
   df.WriteTimeStamp();
 
 #if INSTRUCTION_COUNT
-  df.Write( GetUpdate(), "Update" );
+  df.Write(m_update, "Update");
   for( int i=0; i < sum_exe_inst_array.GetSize(); i++ ){
-    df.Write( (int) sum_exe_inst_array[i].Sum(), inst_names[i] );
+    df.Write((int) sum_exe_inst_array[i].Sum(), inst_names[i]);
   }
 #else // INSTRUCTION_COUNT undefined
-  cerr << "Warning: Instruction Counts not compiled in" << endl;
+  m_world->GetDriver().RaiseException("Warning: Instruction Counts not compiled in");
 #endif // ifdef INSTRUCTION_COUNT
 
   df.Endl();
 }
 
-void cStats::PrintGenotypeMap(const cString & filename)
+void cStats::PrintGenotypeMap(const cString& filename)
 {
   cDataFile& df = m_world->GetDataFile(filename);
   cString UpdateStr =

Modified: development/source/main/cStats.h
===================================================================
--- development/source/main/cStats.h	2006-08-24 19:50:41 UTC (rev 894)
+++ development/source/main/cStats.h	2006-08-25 01:56:22 UTC (rev 895)
@@ -50,7 +50,7 @@
   cWorld* m_world;
   
   // Time scales...
-  int current_update;
+  int m_update;
   int sub_update;
   double avida_time;
 
@@ -103,27 +103,6 @@
   cDoubleSum sum_species_age;
 
 
-  //// Sums cleard on output only ////
-  cIntSum isum_parent_dist;
-  cIntSum isum_parent_size;
-  cIntSum isum_child_size;
-  cIntSum isum_point_mut;
-  cIntSum isum_copy_mut;
-  cIntSum isum_insert_mut;
-  cIntSum isum_point_mut_line;
-  cIntSum isum_copy_mut_line;
-  cIntSum isum_delete_mut;
-  cIntSum isum_divide_mut;
-  cIntSum isum_divide_insert_mut;
-  cIntSum isum_divide_delete_mut;
-  cIntSum isum_copied_size;
-  cIntSum isum_executed_size;
-  cIntSum isum_copies_exec;
-  cDoubleSum dsum_copy_mut_by_copies_exec;
-  cDoubleSum dsum_copied_size_by_copies_exec;
-  cDoubleSum dsum_copy_mut_lines_by_copied_size;
-  cDoubleSum dsum_copy_mut_lines_by_copy_mut;
-
   // Instruction Counts (DM)
   tArray<cIntSum> sum_exe_inst_array;
 
@@ -223,7 +202,7 @@
   tArray<cString> reaction_names;
   tArray<cString> resource_names;
 
-  // Resampling Statistics AWC - 06/29/06
+  // Resampling Statistics @AWC - 06/29/06
   int num_resamplings;
   int num_failedResamplings;
   
@@ -242,12 +221,12 @@
   void SetupPrintDatabase();
   void ProcessUpdate();
 
-  inline void SetCurrentUpdate(int new_update) { current_update = new_update; sub_update = 0; }
-  inline void IncCurrentUpdate() { current_update++; sub_update = 0; }
+  inline void SetCurrentUpdate(int new_update) { m_update = new_update; sub_update = 0; }
+  inline void IncCurrentUpdate() { m_update++; sub_update = 0; }
   inline void IncSubUpdate() { sub_update++; }
 
   // Accessors...
-  int GetUpdate() const { return current_update; }
+  int GetUpdate() const { return m_update; }
   int GetSubUpdate() const { return sub_update; }
   double GetGeneration() const { return SumGeneration().Average(); }
 
@@ -389,25 +368,25 @@
   const cDoubleSum& SumMemSize() const       { return sum_mem_size; }
 
   
-  void IncResamplings() { ++num_resamplings;}  //AWC 06/29/06
-  void IncFailedResamplings() { ++num_failedResamplings;}  //AWC 06/29/06
+  void IncResamplings() { ++num_resamplings; }  // @AWC 06/29/06
+  void IncFailedResamplings() { ++num_failedResamplings; }  // @AWC 06/29/06
 
   void CalcEnergy();
   void CalcFidelity();
 
   void RecordBirth(int cell_id, int genotype_id, bool breed_true);
-  void RecordDeath(int genotype_id, int num_divides, int age);
+  void RecordDeath() { num_deaths++; }
   void AddGenotype() { tot_genotypes++; }
   void RemoveGenotype(int id_num, int parent_id,
 			     int parent_distance, int depth, int max_abundance,
 			     int parasite_abundance, int age, int length);
   void AddThreshold(int id_num, const char * name,
 				  int species_num=-1);
-  void RemoveThreshold(int id_num);
-  void AddSpecies(int id_num);
+  void RemoveThreshold() { num_threshold--; }
+  void AddSpecies() { tot_species++; num_species++; }
   void RemoveSpecies(int id_num, int parent_id,
 			 int max_gen_abundance, int max_abundance, int age);
-  void AddLineage();
+  void AddLineage() { tot_lineages++; num_lineages++; }
   void RemoveLineage(int id_num, int parent_id, int update_born,
 		     double generation_born, int total_CPUs,
 		     int total_genotypes, double fitness, 
@@ -556,7 +535,6 @@
   void PrintResourceData(const cString& filename);
   void PrintSpatialResData(const cString& filename, int i);
   void PrintTimeData(const cString& filename);
-  void PrintMutationData(const cString& filename);
   void PrintDivideMutData(const cString& filename);
   void PrintMutationRateData(const cString& filename);
   void PrintInstructionData(const cString& filename);




More information about the Avida-cvs mailing list