Epigenetic Memory Locations

From WikiManual
Revision as of 20:38, 14 February 2014 by PhiNotPi (talk | contribs) (Fixed typos)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The memory locations 971-990 are the epigenetic memory locations, which are copied from parent to child during the birthing cycle. As of version 2.42.9q, the first 5 epigenetic memory locations (971-975) are copied instantly upon reproduction. The next 15 (976-990) are copied one per cycle for the next 15 cycles, through the birth tie.

If the birth tie is severed, copying of epigenetic memory locations will stop, and bots may miss an opportunity to pass valuable information to their offspring.

The child's memory locations need to be 0 for the parent's epigenetic values to be transferred in, so make sure that the child doesn't store anything into its epigenetic memory locations before the information is copied in.

Example Applications

One advanced use of epigenetic memlocs is to keep track of the number of cycles that have passed in the sim up to 32000. This is done by initially increasing 971 by 1 on the first cycle then incrementing it by 1 for every cycle that it is not equal to zero.

Example:

'gene1 sets 971 to 1 on the first cycle then deletes gene1
cond
start
971 inc
.delgene inc
stop
'when 971 is passed into child counter will begin keeping track of cycle number
cond
start
971 *971 dup div mult inc
stop

Another use of epigenetic memory is to increase the genome's flexibility by having progenitors choose from a random set of values, on the first cycle.

cond
start
3000 rnd 2000 add 971 store
50 rnd 20 add 972 store
.delgene inc
stop

cond
*972 *.nrg >
start
*971 .repro store
stop

Here the progenitor decides the reproduction energy level and birthing percentage to pass on to its descendants.

Adding random copy errors it can be used to evolve racial memory to reach optimal values in simulations without mutations:

cond
*.robage 20 =
start
*971 10 rnd 5 sub add 0 floor 971 store
*972 4 rnd 2 sub add 0 floor 972 store
stop

Of course, the possibilities are limitless.

You can use it as a way to adapt the behavior of your bot according to it's environment, or even adapt your attacks according to the opponent you're facing in a league.

Fruitflies is a good example of this.