Not-so-smart lifeforms

Game Rules: all lifeforms are required to assemble in the centre of the world.

This one looks easy. All the blobs need to do is head towards the centre. It sounds simple enough – right?

But what we’re asking for is a neural network capable of aiming for the centre and stopping when it gets there. Scoring doesn’t help it stop in the right place. All it knows is that it failed or succeeded and that happens during “judgement”.

It provides sensors to enable them to find the centre. That bit is easy. We provide additional input to the network (0=in centre,1=not) to tell them to stop.

To achieve this they must configure themselves to:

  • Rotate to point to the centre (lifeforms start off pointing in random directions)
  • Move towards the centre
  • Cease moving when the “on the circle” neuron provides a 0.

Here is it running…

The number mount of blobs reaching the centre was quite dire. But on a subsequent run, I saw this. It doesn’t take too long to reach 400 generations.

Some of you might be thinking that if my sensor works, it shouldn’t need the “stop” neuron – see my post here. I would tend to agree with you. If missiles can hit a tiny target from any direction using sensors, there should be no need to “stop”. But I tried with and without, and “with” performed better. The problem is always one of ensuring a sufficient sample size before drawing a conclusion. Given the sample size is possibly too small, I might be wrong.

This is one of those “wait until you get lucky” types of learning. I ran this a number of times and sometimes it seems to take a lot of generations before playing the game. That’s because the mutation is dependent on the correct bias + weightings, and those are created with random values.

I reiterate this is for fun, if you need to achieve something like this, you don’t need AI.

Lastly, on page 5 we cover an even more difficult game.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *