A solo bit on NEAT, POET, and MAP-Elites — evolutionary algorithms that grow neural networks and their wiring, not just weights. Aqeel walks through a weekend experiment where simple creatures evolve to recognise images they themselves produce, and how symmetry and low-energy constraints start to look uncannily like life.

Watch the full episode below — also on the podcast feed wherever you listen.

Read the transcript

Time my weekend project cost me two and a half thousand dollars of opus 4. 8 credits so one of my weekend projects i haven't done one in a while because i've been So focused on building neos that has been my weekend and weekday and late night project uh but Since we launched the app stores i was really excited to finally have time to work on an

Algorithm i've had a romantic accession with ever since i got exposed to ai and that was neural Evolution through augmented topology which is using evolutionary algorithms to not only change the weights of a neural Network but also the way that it connects together it uses genetic algorithms so it defines a d Na sequence per neural network and then with that you test it out in a simulated environment and

Then you see which ones are the fittest and then breed a new population based on the one Before that there are extensions to this algorithm and i kept following it by the way the work Is all biologically inspired by and the pioneers are kenneth o stanley um jeff clune is another one That i am really inspired by with his works where he extended it to include the algorithm called

Poet poet then is about being able to make the environment which you tested in also evolve at The same style size um same way as the algorithm evolving so you have ways of knowing how To get to the place you want to get and then further work sebastian reesey i think was Their name that worked on map elites and this turned into a re those really great um nature

Paper of robots that heal themselves so you get like a hexapod um robot and these algorithms are Really good unlike they're not really used for training llms or ai but they're really good for um Robotic gait so you can imagine a hexapod needs to know how to move its legs and instead Of um keeping the algorithm that knows how to move its legs in the perfect living situation you

Then put it in an environment where or you you measure um particular evolved genomes of these brains Where the leg itself one of the legs might not be touching but it's still moving now this Is useful to keep and you keep it like multi-dimensional parameterization of this so that in the field Suppose that like hexapod's leg got like taken off then that way it still is able to change

Its brain really quickly without retraining so these are that's the algorithm that i was really excited about And i never had chances to play with it i also had avoids like i guess in this Coast of mias and you can see it all in mias i have an obsession with decentralization and Utilization of i suppose volunteer compute and because this is a population search algorithm it is able to

Be embarrassingly parallel and decentralized so utilizing the web browser and cloudflare party kit i then and web Assembly i was then able to develop a neural evolution um artificial life experiment where anyone can go To it to this website you can go onto your phone onto this website and it connects you To the cloud the swarm compute and you're helping evolve

Neural network life forms that are doing one thing which i think is this is where it became A weekend project not a bit of an art where they're trying to understand their true self so As i said earlier the neural networks image or like what defines the neural networks architecture can be Done as a sequence a dna sequence that then produces a pattern

That pattern gets through an algorithm that turns into the brain the inputs then for that brain or We can think of like what we put as the eyeballs what we put as the input into That thing to test it is that i give it the image that produced itself so it's like Right now i'm looking at a preview of myself my brain is seeing a picture of me and

The task then that we tested on is that given that input of seeing the produced image can That neural network reproduce the sequence that developed that image and uh this again like the genesis um Random seed to start this entire algorithm i used the sequence and yet a trace of the true Self exists within the false this is a ridiculously hard problem because it is solving a few things

It has to know how to make a sequence that's one so that's sort of like a ll M sort of deal so i've decided to extend a lot of the work that was usually done In neural evolution and bring in some of the more um recurrent neural network stuff like um k Arpathy andre karpathy really made famous with their original blog post on the what's it called the what

's it called the unreasonable effectiveness of recurrent neural networks so it's going back to all that stuff And then bringing in a bit of what we know now today of ai so this is the The repo you can go check it out it's mit i think it's probably or whatever i have A whole heap of research in here the documentation you can see the literature review on the white

Paper as well but i also have as i said it's all web assembly And runs in the browser so as soon as you go to the github pages site this is Actually the app and it's loading now so what this is happening here are all of the neural Networks that are a different type of uh niche of behavior so if this was the hexapod it

'll be like on a human being let's say it's like the percentage that this neural network keeps Its left leg on the ground versus the right leg on the ground so if you and then The challenge in that case might be who moves the fastest that's like kind of what this map Elites here is is doing so in this case we are doing it by symmetry versus complexity to

The actual neural network the neural network itself it's super glaring let me close this all right Can you open the window yeah there we go cool so the neural network sequence the original sequence Is there that neural network sequence creates this convolutional paddle pattern producing network that takes x y z Um it's actually x1 x2 y1 y2 blah blah blah so that makes a connectivity matrix

That will be in three dimensions those patterns um that it produces are these images here that's the 3d image so that neural network dna sequence produces an image like this and then you use another Algorithm this comes from actually the es hyperneet evolved substrate hyperneet extension that's the two-dimensional version so different Parts parts of density determines the nodes that's the actual brain itself so the input then to this

Neural network takes this image as a sequence and it actually has attention to be able to determine What part is most interesting and then tries to produce a sequential output to produce a sequence is Already hard enough to be able to learn but the real hard thing Is i guess the only people that would be understanding this by now would know is when to

Stop producing the actual sequence that's uh effectively a halting problem uh that's obviously incredibly hard so it Has to know by looking at the image of itself the length of its very own dna sequence N which is over here you can see how often it glimpsed at the actual thing and thought Before it actually wrote the neural um the sequence out and this one you can see it has

Produced five nodes 18 connections out of it should have done 19 connections i've also implemented heavy and Learning and neuroplasticity as well as neuromodulation uh this is also really cool stuff all um proper bi Ologically inspired neural network things heavy and learning and associative learning allows you to do learning at a Time so it's sort of like attention in a way or recurrence in a way it is also

How we operate a lot more and a big part of mios you can really see what i Really enjoyed about doing this project was you can really i could really see the the thread of These things that i found interesting as a researcher um the things that i was attracted to as A researcher and even though i didn't go into ai research and i decided to go into ai

Business i guess and consulting originally when it kind of boomed and if i went into ai research I probably would be a lot more better well off this is i can see how these things Have inspired my actions in building mios all the things that i've held on to and that real Poetic ending to all of this is the reason why i decided to make this neural network and

Artificial life experiment try produce an image of itself again goes to that genesis and yet a trace Of the true self exists within the false just as so many of these research ideas and thoughts Of mine they exist within mios they exist within this website you can go to and importantly they Exist within me add the biological nature of these simple simple rules of we've got this three-dimensionality and

Then um a pattern producing so this is the currently best performing brain that we have evolved so Far again please go to the website and you can help us evolve more over here on the Left you can see these two two input neurons and then it goes to the output neurons on The back and then one of this reminded me of by looking at this was the very well

Known and established fact in neuroscience that our eyeballs evolved into our brain the fact that we just Started as eyeballs and that sensor alone then turned into this brain you can see that here you Can see those two eyeballs at the front you can see them there they are there's those two Little eyeballs at the front goes into a big fat piece of neurons connected together and then to

An output which i guess would be the spine this is just one of them you can take A look at other different shapes here let's take a look at this shape there's a kind of Cool shape as well you can always see there's like oh import neurons they're the sensors they're like Eyeballs two eyeballs those are the two eyeballs that are looking at this you can see that they

're the sensors they're like eyeballs two eyeballs those are the two eyeballs that are looking at this Image that i gave this simple mathematical problem and because i followed the rules of exactly how we Make this in the physical world doing it in 3d three dimensions getting symmetry is a thing to Do with energy conservation as well trying to keep things low energy it started making things that look

Like life