Category: My Figure creatures

Ongoing experiments with software-based artificial life

Ep 138: Figures0.2

Ep 138: Figures0.2

Figures0.2

While researching for these episodes, I’ve also been researching for other reasons, including the experiment which I talk about today. It’s my attempt to use artificial life for artificial intelligence.

Here’s a link to episode 103, which describes Tiera, and gives a good overview of digital organisms and artificial life.

Tierra, bits bytes and life

Here’s a link to episode 54, which includes an example of the real-world effects when you’re AI system over fits.

Irrational computers, investing, and racist robots

And here’s a link to the most recent post on my on-going work with digital organisms.

Thoughts on artificial life, death and intelligence

Thoughts on artificial life, death and intelligence

Thoughts on artificial life, death and intelligence

I’d planned to post this on the 13th, just because that date would have been appropriate, but after implementing death, I was tired and a little bit sad. Combine that emotional response with this obviously guilt inspired dream, and the evidence suggests that I’m a gentler soul than I thought. It does niggle at me—the idea of creating life like bits of software and deliberately making certain that they will die. Still, it’s only after implementing death that I really consider them alive. That’s not to say that I consider death to be a necessary part of life, but in this approach, without death, there probably isn’t enough pressure to cause evolution, and without some evolution, my little subleq based creatures won’t be able to learn and grow.

Read More Read More

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.

And the baby has a baby

And the baby has a baby

When I started posting about this project, I just dove in. Eventually I’ll have to lay out exactly what I’m working on, and how I’m approaching the development of my artificial life forms. That will take some time. For now, have yet another post wherein I entirely fail to explain what’s going on.

Over the weekend, I finished coding the Figure class. It only took 1500 to 1700 lines of code, depending upon how you count and what you count. I still have much testing debugging and documentation to get done before I can finally move on to the interesting parts.

A few days ago, while testing one of many little pieces of the project, I saw the first little program that was produced by the system, instead of hand written by me, reproduce itself, I’m going to paste in the text from my journal. Note that each program copies itself, and adds a small mutation to the end of the child program. The longer the program, the younger it is.

Friday January 19, 2018

2:18:AM

First time I ran a figure I didn’t write.

The size of the realm=3
looking for neighbors.
Going up.
nobody new around.
Reading from out there.
Running baby.
looking for neighbors.
Going up.
party at 0!
Reading from out there.
Figure 0 memory={-4, -17, 3, -9, -13, 6, -8, -19, 9, -3, -19, 12, -6, -18, -1, –
1, -1, -1}
Figure 2 memory={-4, -17, 3, -9, -13, 6, -8, -19, 9, -3, -19, 12, -6, -18, -1, –
1, -1, -1, 3, 17, -14, 18, 15, 22}
Figure 1 memory={-4, -17, 3, -9, -13, 6, -8, -19, 9, -3, -19, 12, -6, -18, -1, –
1, -1, -1, 3, 17, -14}

See that? Baby had a baby!

I love the smell of code in the morning

I love the smell of code in the morning

I need to make a couple of notes before I forget.

I went through and put in code to set b to 1 or -1 on the methods that needed it. I was going to have write and paste, both inner and outer return a -1 if they were called while the buffer was empty. However, I changed my mind. Instead, the outer commands return -1 when a figure tries to write or paste to itself with the outer head. The same thing will happen with read and cut. As it happens, that means that inner write and inner paste never set b to -1. I went ahead and had them set b to 1, just for the sake of consistency.

Meanwhile, in move inner, b is set to -1 if the method tries to move the inner head further than it can go, and otherwise sets b to 1. That gives a figure a way to tell when it has reached the top or bottom of the figure. Read commands also set b to -1 if a read command is sent while the head is at the end of the figure, one spot further than there are numbers to be read.

I need to make sure that any outer commands, like read cut write or paste, set the otherHead field of the figure being read from or written to, to be the address of the figure that is doing the reading or writing.

I’ve still got several outer head commands to implement, and I’m way behind on comments. I actually think I’ll go ahead and finish implementing the remaining ports before I catch up on the docs. It shouldn’t, judging by the methods I’ve already created, take too long. With a combination of cut and paste, and find and replace, I can adapt the methods I’ve already implemented to do what they do, only to another figure, instead of the one that is calling the outer head ports.

I have no clue how long catching up on the documentation will take, but I don’t want to go further without getting that done. There’s just too many little details that could get lost if I don’t take care of it soon.

Meanwhile, last night, I tested setting one of the slots in the realm’s population array to null. It worked. I ran it a couple of times, but stopped when I realized that I was making orphans. The one figure would write out a child copy of itself, add a slight mutation, and then the parent figure got deleted. The system is very far from creating anything that would count as living, but it still made me feel just enough guilt to make me stop screwing around and move on.

Okay, that’s where I am, and where I’m going.

I got the addresses handled in what’s there so far. I made sure the outerWrite command set the target figures’ otherAddress field to be the address of the source figure.

While I was at it, I changed some of the test code messages, so directions up and down are reversed from before. I just picture 0 at the top of the array, so adding is going down to me.

When a method needs to see if the outer Head is pointing at the source figure, it should test the addresses. It was using the name field, but I might switch that to a string or some other object. I changed that too. That’s why I did all this in the morning; I had too much that I might forget to do if I didn’t get it done.

If x==address

Got an episode to get done.

Mutant bouncing baby bits

Mutant bouncing baby bits

It’s Saturday night, and I’ve got some coding to do. I’d really like to get a figure to self-reproduce tonight, but I don’t know if I can pull it off or not. Last time, in the middle of creating the realm, I realized that there was and is some stuff that needs doing with the ports and methods I’ve already created. The figures could use some feedback on how a given operation has worked.

It’s really easy to setup. I can set b to zero or less for one result, one or higher for the other. It actually doesn’t matter, since this happens from a set command. The value I give to b will only be used to choose one or the other branch, and won’t be saved. I’ve already got the test code in place, and moved b to a global scope for the Figure class. I’m thinking of moving the other internal values for what is, at the moment, the run method to the global scope as well. Right now, it’s all about the set method, but I have no idea what future implementations or extensions might need or want to do. I think it’s best to go for maximum flexibility, especially for the node system which I’ve yet to talk about, let alone implement.

Ports are used for special commands, Nodes are used to add new ports and abilities. The goal is to create a tunable emergent system. I don’t just want digital life; I want digital life that can solve problems and do tasks for me. It’s artificial life that is also artificial intelligence.

Read More Read More