Antlike 0.1

I think if I allow for symmetric operations I am encoding category ****

let instructions =

01 X      MEM[X] += 1
            02 X      MEM[X] -= 1
            03 X Y    MEM[X] += Y
            04 X Y    MEM[X] -= Y
            05 X Y    MEM[Y] += X
            06 X Y    MEM[Y] -= X
            07 X Y    MEM[X] += MEM[Y]
            08 X Y    MEM[X] -= MEM[Y]
            09 X Y    MEM[Y] += MEM[X]
            10 X Y    MEM[Y] -= MEM[X]
            11 X Y    SWAP MEM[X] MEM[Y]
            12 X Y    SWAP MEM[Y] MEM[X]
            13 X      JUMP MEM[X]
            14 X Y Z  JUMP TO Z IF MEM[X] >= MEM[Y]
            15 X Y Z  JUMP TO Z IF MEM[X] =< MEM[Y]
            16 X Y Z  JUMP TO Z IF MEM[X] == MEM[Y]

class substrate def: A n by n matrix Where n is a power of 2. In my specific case it will be 2^5. The substrate has cells that have the operational data. So that every cell either contains a valid instruction or a no op.

class tapehead def: A tape head is an Is similar to an ant in Langdon’s ants, but instead it is just a instruction pointer that points to a cell on the substrate and operates according to the instructions. After the instructions are executed it is iterated by the instructions arguments count Unless it hits a jump. properties: x y instruction limit = 2^n : n = 5 = 32

class universe: def: Contains a substrate in a list of tape heads. Handles logic for epochs, Logging,Initializing, saving, loading the state of the substrate and tape heads. debug: Print out the substrate and the location of all pointers on it.

Simultion Archetecture: This is very similar to Langston’s ants. However this project is attempting to do something that could be considered an extension:

The ants will be tape heads that will read the two dimensional substrate and operate on it according to the instructions.

2^n [ ] [0, …, 2^n - 1]

[0, 1, 2, 3, 4, 5, 6, [7], 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31] 2^5 = 32, [7] = tapehead location

[… ,[7], (8), (9), …] I X Y

07 X Y MEM[X] += MEM[Y]

8 + 9 = 17

[0, 1, 2, 3, 4, 5, 6, [7], 17, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]

Pointer is iterated by the instructions char amount.

[0, 1, 2, 3, 4, 5, 6, 7, 17, 9, [10], 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]

Antlike 0.2 (simple)

let instructions =

00 X      No op
            01 X      MEM[X] += 1
            02 X      MEM[X] -= 1
            03 X Y    SWAP MEM[X] MEM[Y]
            04 X Y    SWAP MEM[Y] MEM[X]
            05 X      JUMP MEM[X]
            06 X Y Z  JUMP TO Z IF MEM[X] >= MEM[Y]
            07 X Y Z  JUMP TO Z IF MEM[X] =< MEM[Y]
            08 X Y Z  JUMP TO Z IF MEM[X] == MEM[Y]

Psudocode

class substrate def: A n by n matrix Where n is a power of 2. In my specific case it will be 2^4. The substrate has cells that have the operational data. So that every cell either contains a valid instruction or a no op.

class tapehead def: A tape head is an Is similar to an ant in Langdon’s ants, but instead it is just a instruction pointer that points to a cell on the substrate and operates according to the instructions. After the instructions are executed it is iterated by the instructions arguments count Unless it hits a jump. properties: x y instruction limit = 2^n : n = 5 = 32

class universe: def: Contains a substrate in a list of tape heads. Handles logic for epochs, Logging,Initializing, saving, loading the state of the substrate and tape heads. debug: Print out the substrate and the location of all pointers on it.

Antlike 0.3 (simple)

let instructions =

00 X           No op
            01 X Y         MEM[X,Y] -= 1
            02 X Y         MEM[X,Y] += 1
            03 X Y A B     SWAP MEM[X,Y] MEM[A,B]
            05 X Y         JUMP MEM[X,Y]
            06 X Y A B V W IF MEM[X,Y] >= MEM[A,B] JUMP TO MEM[V,W]

Psudocode

class substrate n x n matrix of cells def: A n by n matrix Where n is a power of 2. In my specific case it will be 2^4.

class cell def: A memory cell inside the substrate. Each cell Holds an instruction. Where the instructions are numbers: [-07, -06, -05, -04, -03, -02, -01, -00, 01, 02, 03, 04, 05, 06, 07]

class tapehead def: A single tape head is similar to Langston’s ants. However in this case it is a tape head that does the fetch execute cycle directly on a grid of memory cells

Operations are stripped of their sign, but the arguments respect the sign of the memory cell.

            All instructions and operations are executed relative to the tape head's coordinates. The tape head is not allowed to go out of bounds. If the tape heads instructions would result in a out of bounds operation, the operations x y location is recalculated and wrapped around.

properties: x y history = [A list of instructions over the pointers Lifetime] instruction limit = 2^n : n = 5 = 32

class universe: properties: epoch = 0 epoch limit = 2^5 : n = 5 = 32 tape heads = [] substrate = [[n x n matrix Z: [-07 <= Z <= 07]]] mutation_rate = 0.01

def: Contains a substrate and a list of tape heads. Handles logic for epochs, Logging,Initializing, saving, loading the state of the substrate and tape heads. debug: Print out the substrate and the location of all pointers on it.