The ArchEvo Model is a generalized description of how ArchEvo works. It abstracts away information about the ISA, how combat is handled , and how reproduction is handled .
A cell is a virtual machine that exists in the Universe.
A cell has eight registers, each of which are eight bits wide. The first cell represent the amount of energy the cell has 1). When a new cell is created, all of the registers are set to 0, except for the energy register.
Technically, the rest of the cells have no intrinsic meaning separate from the context in which they are run (including ISA, combat handler, reproduction handler, etc) , but generally the cells are given these names:
The names of regs 1 and 2 come from the CaptureTheFlag combat handler, and reg 7 is IPLOC in ASIA.
When energy is 0 (it can't underflow), the cell is dead, and will be garbage collected in the next iteration.
A cell has a set of instructions that is called a Program. Each individual instruction is simply a set of bits. The instructions may be of an arbitrary length depending on the ISA. ASIA's instructions are eleven bits long.
When a new cell is introduced randomly into the Universe, all of the bits of the program will be randomized. However, when a cell is created as a child of another cell, the new cell inherits the parent's program, with some mutated bits.
A cell also has an Instruction Pointer (IP) . This is a number that is between 0 and the length of the program. When a cell is created this is initialized to 0.
Each iteration, the instruction that is pointed at by the IP is translated into an action. The possible actions are:
This action is then executed.
When the reproduce action is triggered, a new baby cell may be created. However, first the ReproductionHandler is. The ReproductionHandler decides three things:
If the parent cannot reproduce, no change will occur. If the parent can reproduce, then the energy cost is deducted from the parent, and a new cell is created with the proper amount of initial energy. (Click the flowchart on the right to enlarge it)
Attacking other cells is the only way for a cell to gain more energy. The change in energy for both attacker and (if there is one 3)) defender are determined by the CombatHandler.
The Universe is a grid that contains Cells. Although it is a finite grid, the edges wrap around to the opposite side, meaning that Cells can travel in one direction infinitely.
Each iteration, some new cells are spawned with randomized programs.