June 28, 2007

Let’s get physical

Its nice the networks are now firing and can even demonstrate regionality in firing patterns. However, without a physical body, they are little more than flashing lights. Imagine how useful you would be without a body!

Bodies in DN are very simple right now. Each body comes equipped with two “muscles”. One controls the rotation of the body, affecting orientation and field of view. The other muscle controls thrust, resulting in movement in the direction the body is currently pointing. The simulated environment follows frictionless newtonian physics which means the networks will be learning how to play a simplified game of Asteroids.

Vision is modelled after simple vision systems in nature right now. The field of view is about 40 degrees to either side of the center line. Range of vision is very far, but the closer the object the stronger the signal sent to the network. Vision is fixed to the orientation of the body so rotating the body rotates the vision. Currently the only objects found in the environment are health blobs so discriminating between different types of objects is not nescessary (although it will become important later).

The last input is self-awareness of “health”. Each body has a built in “metabolism” that reduces its health value. This works in two ways. There is idle metabolism which slowly reduces the health at all times. Active metabolism, on the other hand, only reduces health when the body moves. Health can be increased by collecting health blobs scattered inside the environment. When the health value reaches zero, the body (and network) is considered dead and its fitness scored.

As part of the evolution simulation, networks need to be scored to determine which are more fit. These will include distance moved, time lived, plasticity etc. More efficient (and arguably more intelligent) networks will gather health blobs at a faster and more efficient rate than others, giving them a better fitness score.

Its important to note that the metabolism of these bodies are not for simulating realistic metabolic systems. They are merely a means to score the fitness of simple brain networks. The first behavior evolved by natural organisms was self survival. This test gives the networks a starting platform similar to basic organisms - locomotion and simple vision. Self-awareness of current health may even be an advantage early organisms didn’t have (are flatworms conscious of the fact they are hungry?), which could speed up evolution of simple behaviors.

Technical Details

Vision is piped into the network to a consistant location (same neurons each generation). Vision currently is simple, so only a small handful of neurons are dedicated to the task of receiving vision input (10 at time of writing). When an object is encountered in the field of view, the strength of the input is determined by the distance from the body. This strength is then applied to a corresponding number of neurons, which are artificially stimulated to their maximum potential value (which in turn causes them to fire the next cycle). Vision neurons behave just like other neurons, requring time to fire and reset.

Motor neurons work similarly, but in reverse. A handful of neurons are selected and attached to the muscles of the body. The rotation muscle works by averaging firing and non-firing neurons. Non-firing neurons contribute towards a rotation left while firing neurons contribute towars a rotation right. Non-rotation is accomplished by equillibrium between firing and non-firing. Thrust is calculated by averaging the firing neurons and normalizing the result, which is then applied to the physics calculations.

Health is represented by a decimal value. This value is converted into binary and applied to 8 neurons (for a total of 256 possible values). The pattern of firing and non-firing neurons should adequately represent the binary version of the value and give the network some self-awareness.

Leave a Reply