On vision and evolution

On vision and evolution

I’m phrasing it as though they are looking at a light, because that’s what I’m doing—experimenting with implementing vision in an artificial life system.

There’s a factoid floating around that evolution cannot explain the eye. It’s based on a phrase written by Darwin. He had said that it is difficult to believe that something as complicated and well-constructed as the human eye could have come about by evolution. It was a rhetorical device. In the very next paragraph, Darwin lays out how evolution could produce an eye, or set of eyes, or whatever the given creature might happen to need.

The evolution of the eye is fairly well understood, and it happens to coincide with the development of a brain. More specifically, neurons that connect to other neurons start to outnumber neurons that connect to the senses, or that send commands to the rest of the body—like the muscles.

Just having an eye or several of them isn’t enough. That change to a centralized processing area happens when the eyes toward the front end become dominant. Once the eyes start to become refined to gather more information, and the nearest ganglia becomes refined to better process that information, there could be positive feedback between increasing visual capability, and increasing ability to process information. Once established, the feedback could extend to the other senses and to finer coordination of an increasingly dexterous body.

So, I thought I’d play with it. Since interfacing with hardware is a pain, I’m using a virtual light and virtual eyes. I figured I could start where nature did, with the simplest possible eye. Just a single cell that can react to light.

When I say that the figures can see a light, I mean a virtual one. It’s really just a Boolean flag, lightOn = true, false

When I say that I want the population of figures to push a button when the light is on, I actually mean when the Boolean flag is true, a certain command should be executed, the right port should be called. If the flag is false, a different port should be called. If a figure gets it right, they are protected, no more mutations will happen to that figure. If the figure is still connected to the figure that wrote it, that gave birth to it, the parent figure will also be protected. If the figure is still connected to a figure it was writing, its child, the child is also protected. If the wrong port gets called, the protection is removed, and those figures can be mutated again.

Figures are born with a default amount of energy. Each command that is executed by a figure costs one unit of energy. If a figures energy level drops to 0, or less, that figure will die. Any figure that gets it right, in addition to protection for it and its family, gets a chunk of energy, a treat. If they get it wrong, they lose a chunk.

Thus far, the results have been dismal. In my last post, I had some ideas about what the trouble might be, and how to fix it. That was before I did some more testing.

I was attempting to get a population that would at least play the game. There was no penalty or reward for calling the right or wrong port. Mutation was shut off for a figure and its family if it called the look port, and one of the guess ports. The look port will cause a figure’s program to branch, depending upon whether the lightOn flag is true or false. The guess ports are the ones that should be activated, the buttons that should be pushed. There was no penalty for hitting the wrong button, or reward for the right one; I was just trying to get them to play along.

I ended up with a population that called the look port, and one of the guess ports. It was basically shouting, “the light’s off, the light’s off…” no matter what the light was doing.

Have a look at this output, and notice the mutation count.

They’re all dead!
interrupting cycles
cycles interrupted
good 787,400
bad 787,435
looks 1,151,912
guess on 0
guess off1,931,093
plays 1,931,093
Realm size=30
most 11
Mutations 11
Figure births 764,348
extinctions 1
Elapsed time=0 hours, 9 minutes and 9 seconds

If things were functioning as intended, the figures should be calling a couple of ports and then no mutations should occur. Instead, 9 minutes and 9 seconds in, 11 mutations caused every figure in the population to die.

Wait… wait… wait…!

Comments are closed.