💾 Archived View for rawtext.club › ~hut › naki.gmi captured on 2023-09-08 at 17:55:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

Evolutionary neural networks

Image: naki screenshot

A while ago I've built an application that simulates little cubic creatures

that live in a virtual environment and behave according to a genetic code,

which is passed down to their offspring with occasional mutations. I called

the project "naki" (don't ask me why) and it's been a lot of fun, but as time

went by, I forgot it and went about my life.

Source code of "naki"

Now I rediscovered it and I'm having a blast fiddling with it. The main change

I introduced was replacing the genetic sequence with a multilayered neural

network that connects sensory neurons with actuators:

Image: schematic

Each connection and neuron has a weight between -1 and 1. This alone

determines how exactly it will react to a given set of stimuli, and it's

sufficient to form behavior like *"try to stay inside a hot zone to harvest

more energy"* or *"run around all over the place and eat those who try to

harvest energy for me"*. The weights are randomly generated or inherited to

its baby creatures.

Turns out that this neural network is much more likely to adapt to

environmental circumstances, because one mutation will more likely change the

behavior gradually rather than abruptly, as it may happen with a bit flip in

programming-language-like genetic code. Combining neural networks with

evolution is generally quite a fun thing. And nature does it too, in a way.

The basic layout of the brain wiring is determined by the DNA although

obviously it is greatly influenced by environmental factors. This simulation

just skips the step of having a genetic code and jumps straight to the neural

network.

Navigation panel

Blog

About

Projects

RSS Feed

More articles tagged with "ai"

More articles tagged with "opengl"

Written on 2015-04-02 by hut