Trembling on the verge

Trembling on the verge

I’m about to archive the current state of this project as figures0.1. 0.0 was just far enough so that a program could reproduce itself, and add a slight mutation. This version has every last port implemented. That is, the little programs, or figures, can do everything I want them to be able to do.

They can read or write from themselves and one another. They can write random numbers that are safe. The random values produced are all valid addresses or ports.

They can also cut and paste to and from themselves and each other. Pasting is like writing, only the values are added, inserted into the place they are writing to, instead of being written over what’s already there. Cutting is like reading, only the elements being read are removed from where they are being read from.

The very last thing I had to test was the jump command, port -50. If a program reads, writes, cuts, pastes, or even moves inside of another figure, that figure gets a port that connects to the figure that did the reading, writing, or what have you. This gives the figures a way to react to any figure that is doing something to it. The only way to escape from the retribution is to change where you’re living, jump.

Here are a couple of figures. The first one just moves it’s read write head inside of the second one. The second one then cuts out the entire memory of the first figure, effectively killing it.

First figure: {P.N_THREE, P.MOVE_OUTER, 3, 0, P.FIND_EMPTY, 6, /*0, P.JUMP,*/ -1, -1, -1, -1, 1, 2, 3, 4, 5}
Second figure: {P.OTHER_SIZE, P.OTHER_BOARD, -1, -1, -1, -1}

Here’s what happens if we run them.

The size of the realm=3
Before:
slq buffer size=0
slq2 buffer size=0
Figure 0 at 0 memory={-3, -32, 3, 0, -17, 6, -1, -1, -1, -1, 1, 2, 3, 4, 5}
null
Figure 1 at 2 memory={-38, -45, -1, -1, -1, -1}
After:
slq buffer size=0
slq2 buffer size=15
Figure 0 at 0 memory={}
null
Figure 1 at 2 memory={-38, -45, -1, -1, -1, -1}

In that run, the jump command is commented out. If we uncomment it…

{P.N_THREE, P.MOVE_OUTER, 3, 0, P.FIND_EMPTY, 6, 0, P.JUMP, -1, -1, -1, -1, 1, 2, 3, 4, 5}

… the first figure is able to save itself.

The size of the realm=3
Before:
slq buffer size=0
slq2 buffer size=0
Figure 0 at 0 memory={-3, -32, 3, 0, -17, 6, 0, -50, -1, -1, -1, -1, 1, 2, 3, 4,
5}
null
Figure 1 at 2 memory={-38, -45, -1, -1, -1, -1}
After:
slq buffer size=0
slq2 buffer size=0
null
Figure 0 at 1 memory={-3, -32, 3, 0, -17, 6, 0, -50, -1, -1, -1, -1, 1, 2, 3, 4,
5}
Figure 1 at 2 memory={-38, -45, -1, -1, -1, -1}

Okay then, figures0.1 is done. I’m glad, as the next bits of development will finally start to get into the fun stuff.

Comments are closed.