# @CAO : THIS IS A PROTOTYPE FILE FOR HOW I'D LIKE TO SEE MUTATIONS WORK

# This file is used to configure the mutations that occur during an avida
# run.  The format is simple:
#
#   MUTATION <name> <trigger> <scope> <type> <rate>
#
# The "trigger" determines when the mutation should be tested for. 
# Possibilities are -
#
#   update  : Test for these mutations each update
#   divide  : Test during the successful birth of an offspring
#   parent  : Test on a parent during a divide operation
#   write   : Test each time an instruction is written to memory
#   read    : Test whenever an instruction is read from memory.
#   exec    : Test while an instruction is being processed by the hardware
#
# A copy command will perform both a read and a write.  A read mutation will
# affect the site being read, and are therefore particulaly dangerous.
#
# The scope of a mutation type determines how much will be mutated.  There
# are currently a few options -
#
#   genome  : A single mutation occurs in the whole genome.
#   local   : Mutations occur at a local position.  If no local position can
#             be specified in the trigger (i.e. 'parent') nothing happens.
#   prop    : Proportional: same as local, but the rate used is normalized to
#             1/genome_length
#   global  : Same as local, but *all* positions in the genome are tested.
#   spread  : Same as prop, but all positions are tested.
#
# The type of mutation determines what happens when a mutation does occur
# at a site -
#
#   point    : Change the affected locus to a random instruction.
#   insert   : Insert a random instruction at this poistion.
#   delete   : Remove the instruction currently at this position.
#   head_inc : Advance heads at this position.
#   head_dec : Retreat heads at this position.
#   temp     : Don't change the genome, but temporarily act as if a change has
#              occured.  This is only relevent for types "read" and "exec".
#   kill     : Sterilize the organism affected so that it is effectively dead.
#
# Finally, the rate indicates the frequency at which mutations occur.
#
# EXAMPLES:
#
# Old stype copy mutation rate of 0.0075:
#
#   MUTATION copy_mutation write local point 0.0075
#
# Old style divide insertion of 0.05:
#
#   MUTATION divide_ins divide genome insert 0.05
#
# Keeping an average genome mutation rate at 2.0 with copy mutations...
#
#   MUTATION copy_spread write prop point 2.0
#
# Most types of mutations that people want should be possible.
#
# CONFLICTS:
#  Only local & spread scopes can interact with head/temp types.
#  Divide trigger cannot work with local & spread scopes.