Neat AI Does Conways AI Life - Allowing a neural network evolve its own patterns
Use my link bit.ly/NeatAIDCJan22 and check out the first chapter of any DataCamp course for FREE to unlock new career opportunities and become data fluent today!
Implementing a neural network to evolve new shapes and patterns in Conways Game of Life.
Music:
www.bensound.com
From Wikipedia :
en.wikipedia.org/wiki/Conway%...
The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.[1] It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.
Origins
In late 1940, John von Neumann defined life as a creation (as a being or organism) which can reproduce itself and simulate a Turing machine. Von Neumann was thinking about an engineering solution which would use electromagnetic components floating randomly in liquid or gas. This turned out not to be realistic with the technology available at the time. Stanislaw Ulam invented cellular automata, which were intended to simulate von Neumann's theoretical electromagnetic constructions. Ulam discussed using computers to simulate his cellular automata in a two-dimensional lattice in several papers. In parallel, von Neumann attempted to construct Ulam's cellular automaton. Although successful, he was busy with other projects and left some details unfinished. His construction was complicated because it tried to simulate his own engineering design. Over time, simpler life constructions were provided by other researchers, and published in papers and books.[citation needed]
Motivated by questions in mathematical logic and in part by work on simulation games by Ulam, among others, John Conway began doing experiments in 1968 with a variety of different two-dimensional cellular automaton rules. Conway's initial goal was to define an interesting and unpredictable cell automaton. For example, he wanted some configurations to last for a long time before dying and other configurations to go on forever without allowing cycles. It was a significant challenge and an open problem for years before experts on cellular automata managed to prove that, indeed, the Game of Life admitted of a configuration which was alive in the sense of satisfying von Neumann's two general requirements. While the definitions before the Game of Life were proof-oriented, Conway's construction aimed at simplicity without a priori providing proof the automaton was alive.
Conway chose his rules carefully, after considerable experimentation, to meet these criteria:
There should be no explosive growth.
There should exist small initial patterns with chaotic, unpredictable outcomes.
There should be potential for von Neumann universal constructors.
The rules should be as simple as possible, whilst adhering to the above constraints.[2]
The game made its first public appearance in the October 1970 issue of Scientific American, in Martin Gardner's "Mathematical Games" column. Theoretically, the Game of Life has the power of a universal Turing machine: anything that can be computed algorithmically can be computed within the Game of Life.[3][4] Gardner wrote, "Because of Life's analogies with the rise, fall and alterations of a society of living organisms, it belongs to a growing class of what are called 'simulation games' (games that resemble real-life processes)."[5]
Since its publication, the Game of Life has attracted much interest because of the surprising ways in which the patterns can evolve. It provides an example of emergence and self-organization. Scholars in various fields, such as computer science, physics, biology, biochemistry, economics, mathematics, philosophy, and generative sciences, have made use of the way that complex patterns can emerge from the implementation of the game's simple rules.[citation needed] The game can also serve as a didactic analogy, used to convey the somewhat counter-intuitive notion that design and organization can spontaneously emerge in the absence of a designer. For example, philosopher Daniel Dennett has used the analogy of the Game of Life "universe" extensively to illustrate the possible evolution of complex philosophical constructs, such as consciousness and free will, from the relatively simple set of deterministic physical laws which might govern our universe.[6][7][8]
Rules
Generative Art,AI,A.I.,neural Net,using Python,python,tutorial,processing,p5js,coding,speedrun,blender,after effects
the game of life in the game of life is such a beautiful thing
Agreed ! Well worth a watch...
@@neatai6702 wait.. it is an actual thing? I tought it is an animation..
@@maxiguess9922 yes
can it run doom tough ?
I'm pretty certain that's possible, the framerate will suck though.
I love the idea of the discovery of the first glider, it has the same essence of first discovering Pluto. At first it was just a few pixels on paper, now it's much more.
Yea, and theres lots more to explore with CA's
@@neatai6702 and there's lots more to explore in space!
And now the glider's off the paper.
maybe the universe is just an infinite big game of life 😳
@@reuben4721 Permutation City by Greg Egan is a magnificent short science fiction on the subject.
I can barely understand 1% of this but I know there’s something magical about it
Thanks Thom ! to get started download golly and mess about with it..
Same
Me understand Nothing. Use fire to destroy satans work!
basically, lets say u analyze a 3x3 grid. and the center pixel is the one the rule will be applied to. if next to the center pixel there is 2 or more pixels activated (be it sides up or down or diagonals), then its stays activated (alive, not lonely) if it has 3 and it was not activated (dead) then it becomes alive (activated). if 1 or less, its dead. (Please correct me, the rules are inthe video)
Your best start believing in sentient number patterns you are when Mr. Squidward
I just coded my own game of life simulation and was trying to implement some reinforcement learning when I came across your video!
great !.. the paper mentioned in the video is fairly detailed but there are simpler versions for complexity available if thats the route you're going ..
Cool
now steal it
Have you produced any paper about it ? or Code?
Hi have you done any code can I see into it github?
Life in Life _is_ just simply one of the most amazing things ever. If it _doesn't_ blow your mind then you don't understand what's going on.
Enforce 0 child policy for peacefools after 2024
@@anntakamaki1960 bot
Really great video. The ending shot was insane👏
Thanks for the feedback.. It was a fun one to do.
You know Golly can run this type of simulation perfectly with a lot of shortcuts, like not simulating anything more than 1 cell away from a live cell, which cuts out all empty space.
Yea, golly is just amazing.. I'm going to stick a Hash table on mine and see how fast I can get it to go..
@@neatai6702 or, you can get Lifelib, which can run it blazingly fast and can be used from other programs
@@jiqci Let him do it himself.
6:39 That "ship" should be called a *Frog* :D (It looks like a frog, seen from above, it is jumping upwards)
I never noticed that typo ! m
nah, Doo-dah is good (it's actually attachment to other spaceship, the Weekender)
More precisely, a 'Frogger'. :grin:
Do you know (another spaceship) Anura, literally means frogs
@@dc6266 One of only three 3c/7 spaceships (they move 3 cells forward in 7 generations) - from first discovered and largest to last discovered and smallest: Spaghetti Monster, Anura, Soba
Holy crap, did it just fractally iterate itself? That’s so incredible!
Welcome to 30 year old classic AI ;)
that's not the AI mate, that's been made by a human - this video is a bit confusing because it mixes his own recordings from the AI with footage which is just cool Game of Life stuff but which has nothing to do with AI
@@AlbertSirup Actually, it's "AL" or Artificial Life. It is not AI in the sense that it requires training nor representation states nor quantum hardware, but it certainly has it's place within the field of AI, adjacent to multi agent simulation and biomimetics. Hence my comment. If you read through Maggie Bowden's stuff, iirc, the argument is life only requires a few basic things in some cases, so here's the digital version. It's interesting and intelligent in so far as producing surprising (to humans) emergent behaviour. Regarding the toy NN stuff, I mean, meh, if you have to slot in an NN with GoL somewhere, cool, it wasn't necessary but it gave a bit more to talk about and made initialisation a bit more interesting at the cost of perhaps murkying the distinction for beginners. But yes, certainly is AI and for the record, to date, I'd argue almost all 'AI' to date is human made ;)
@@katanshin my point was that it wasn't the computer program (whether it's AI or AL) which came up with the idea of making a fractal version of Game of Life (the one you see at the end of the video) but it was a person who had that idea - while, yes generally GoL produces emergent behaviour but in this case, the fractal version of GoL was made by someone who knew GoL very well and arguably used a lot of things discovered through observation of emergent phenomena (different gliders and generators etc.) to eventually create the fractal version (which only works because it is, to some extent, predictable). Maybe I misread the original comment but i thought by "it fractally iterates itself" they meant the AI version of GoL - which is not the case and is a bit misleading in the video if you don't know the original project (the fractal GoL project I mean)
@@AlbertSirup OH, I'm awfully sorry in that case, my mistake! I had commented on the above without really considering myself to be endorsing the final part of the video as it was clear to me it was intended to be taken as a closing 'look what may be possible!' bit of inspirational fluff, and I didn't want to break kayfabe for those inspired to know more as there's plenty of time to become disappointed with AI later on (!). So in light of all that, I misread your reply as disconnected from the context of the fractal version, and interpreted it as a dismissal of GoL from AI in general which of course one couldn't let stand! Albeit in error :) Thanks for clarifying, I hope I have too, and I completely concur with your comments regarding the fractal version being human engineered, as it certainly was (along with various other setups floating around of incremental LCD counters, etc).
This channel is potentially the most underrated ever. I really hope this blows up!
Thanks for that NerdKnight.. lets see how it goes..
Who exactly is underrating this channel?
the game of life is just so fascinating... multiple professors in different classes used it as examples in different subject areas....
OOOOHHH MYYYY GOOOODDDDD THAT FINALE HIT ME LIKE A FREIGHT TRAIN HOLY GUACAMOLE!
After a minue, I'm still gettin new goosebumps! FRRRRRRRUUUUUUWHAAT!?
Thats genious. That last scene was mindblowing!
The last 5 seconds, you cheeky buggers. Such a finishing touch, well played for those who wait for that last moment . 👏
This is so interesting, I just started reading about neural networks and I am glad KZhead recommendations are working so well.
Hope you enjoy it!
i really want to send a single unintended shape into that life in life setup.
Amazing ! Great idea. Great paper reference. Thank you
Glad it was helpful!
Wow that's a great idea. Thank you for sharing this. That was awesome.
That ending was awesome
Wow. Very glad to have stumbled across your channel. Thank you for sharing this knowledge in such simple fashion that even my layman mind could process it. Cheers
I didn't know there were more complex versions of this game, I'm gonna try them out
Astonishing work. Bravo!
Many thanks!
Game of life may as well be the most accurate metaphor for what reality truly is about
agreed.. and they're only getting better.. check out the Lenia creatures..
Can the Fitness simply just be the one that went the furthest distance from the starting grid in a set amount of time while ignoring Glider shapes that are well known so basically trimming known gliders and checking to see what starting grid evolved to make it the furthest distance in an attempt to see if the NN can discover a totally unknown glider. I don't think it would be terribly difficult and if a database is kept of known gliders to rule out it seems like one could consistently discover new gliders using NEAT
Really good idea.. the complexity function I was using probably won't find new gliders but your database filter is a great approach.. I'll add it to the list..
I would instead just combine center of mass travel distance and a measure of the consistency of the total mass.
@@crazyfox55 this. I was going to add, you can include the parameters for complexity along with distance traveled, so that more complex gliders are chosen for in each generation
The exits scene really WOWed me.
Oh this is such a brilliant idea!
Fun fact: In the Infinite Dimensions April Fools update for Minecraft, there is a Langdon’s Ant dimension.
Amazing video, thank you for your content!!
Glad you like them!
@@neatai6702 do you ever share your code?
The ending of this video is just so beautiful.
That last example of game-of-life inside game-of-life is just so damn cool. Has anyone made an infinite animation of that....or even programmed it several layers deep...just for the hell of it :-)
so glad i stumbled on this great video wish i understood how you created the end piece that zoomed out that was brilliant
Glad you liked it!
Bruh, its crazy how you dont have more subscribers with these quality videos!
Working on it!
N i c e Richard Kenneth Guy. First glider ever observed, was on gen 69.
For anyone interested, the Game of Hive is a hexagonal variant with its own very interesting geometry and interactions.
Damn you... Now I need to make my own version of this but using Game of Hive
Excellent simulation for establishing patterns. A future version of this could be used for engineering a variety of very useful microbes. One in particular I heard about could be something to evenly distribute new calcium and other materials to re-enforce cracked concrete, and to be added to fresh concrete mixtures. It'd be great to have to scrape the walls of buildings on occasion instead of tearing them down.
Wow, that ending. Life in life is mind blowing
I love the 5 second music loop
Awesome video ! I wanted to ask, I read the paper on algorithmic specified complexity you mentioned, but I struggle to understand how to implement it and get the numerical complexity like you did
Awesome ending
That was my homework last week I'd like to learn about a more complex version of it !
This is way more advanced than what I usually do: crashing random spaceships (because they have known-meaning vs. a soup) into blocks (the 2 x 2 pattern) and other predictable objects to see what happens. It looks like you're well on your way to having a program that does it better than me. of course, it probably doesn't help that I only have enough understanding of AI to follow -even at a basic "I think I understand?" level- about 70% of what you just said, and despite its intricacies, I don't have enough interest in CGoL to do anything much more sophisticated. Though I am starting to get interested in agars, greyships, and the like...
Dude that network at the end tho. Fractal game
Brilliant implementation more Compute and 3space would be brilliant. And color coding would make it easier readable what's actually happening. Did the ai came up with all human known shapes or did she add something?
awesome awesome awesome, I just subed
thanks for the sub ABC
An Langdon’s Ant! That takes me back. The first example of emergent behaviour that really clicked with me.
Great work and video. Of course the complexity function from the paper optimizes for chaos, noise is maximal complexity. A better metric is sustainability. I like that you're thinking about including neural networks into this. I am still curious how to implement sustainability as a metric of improvement.*EDIT* If you train/fit the complexity metric to something other than noise then we will be cooking with gas.
Great video first video I see with the usage of Neat for GoL. Did your neat really found the last "pattern"??
Thanks for the feedback.. The very last one of course is the the OTCA Metapixel.. but it found all the preceding green ones..
Today's the day your channel starts to blow up. Congrats
Cheers Niles
As I understand the ASC function as described in the paper, it gives a "score" to a pool of existing and well-known Life patterns. When you were looking for new patterns, did you calculate your C complexity function at each time step by scanning your 60x60 universe for those known patterns (guns, gliders..) which ASC was given in the paper, and then add/multiply/combine all those scores? Or did you do something entirely different? I mean, I don't understand how you could get C values of 425231.36 as we see in the video, from those 60x60 grids.
I could watch the game of life for hours.
more science thank you i love it
This is fantastic! I've been trying to code up the ASC for my GOL implementation to reproduce this, but am having trouble understanding the paper. Would you be willing to share your code for it or go into more detail about how you implemented it, please?
Glad it helped!.. I want to revisit GOL and add a hash table to speed it up. I'll use that paper as a base... but it'll be a while as the video pipeline is full for the next few weeks...
@@neatai6702 Got it! I'm glad you're still enjoying GOL and there's stuff planned - looking forward to seeing it in the future!
literally made the game of life in the game off life at the end oh my god
6:43 I'd recommend against attempting to use a NN for the purpose of finding novel patterns. The solution space is too nonsmooth (i.e. changing a single cell in a solution will yield a pattern that acts nothing like a solution) for neural nets to be an effective option.
Could you help explain how you are measuring every pattern in the GOL? Before you apply the NN, you calculate the complexity. In the paper, it states that it sets a bound for a specific object but understandably, the patterns are always random. I do not understand how that first step is initially done, or at least I am having trouble understanding how we can measure meaning for every pattern... do you choose a specific pattern (let's say Glider or R-Pentomino) at the beginning that fits the test and check all cells within specific bounds and then see what more complicated patterns emerge? Amazing video. but, please help hahaha
My girlfriend makes CA and I can't wait for her to see this video so she can draw more inspiration
At the end there 👌
Is there a way you could share the code you used ? Or detail a bit more your computations?
we need a noneuclidean version of this
great video
Thanks Brendan !
Are there any links to code? I'd love to look through the code used both to generate the raw results and the visualizations. Would be very helpful!
Cant wait for Conway's game of life to turn into the singularity from someone's backyard after they ran a random simulation one day. Edit: spelling error
Theres a neat concept someone was telling me about where matter would self replicate into some form inert to everything else- it would essentially lock up the universe. What would happen to the universe at that point, when the last peice of matter locked up, would it revert a singularity?
@@onradioactivewaves well if the universe went inert i don't think anything CAN happen therefor it would equal the destruction of civilisation, life, even elements. Nothing can happen if nothing can react. if electrons are locked they cannot be electricity, if light doesn't act as light then we cannot turn it into power, etc. Though i may be interpreting that concept wrong this is what i got from it
can AI understand, and how to understand Voyager Golden Record aso. ( is it possible that this message may be received not by a living organism but by AI and AI may also be answered but not by a living organism )
This blew my mind wide open.... The game of life in the game of life.... how does that set-up work? What are the starting conditions? Does it grow?
Is the ending fractal a real outcome for a particular input or is it just for a fancy outro?
It’s real
Can you have seperate AI for each organism?
Cool stuff! I just coded my first Game of Life simulation (the two-colour variant), but using a neural network to find patterns is crazy. Do you know which NN config did you use for this?
Is this some type of evolutionary algorithm - or is there a loss function? How do you update the network
This is dope bit I was kinda hoping you'd create a neural network inside the game of life.
Where can I go online to play the game of life? I had a favourite website years ago but I've forgotten it and I can't find it again.
Download Golly and go nuts.. its a great app..
@@neatai6702 already done. Up till 3 am one night already
Would it be possible to do a Life in Life in Life set up? What would the tech requirements be? What would the limit of further Life layers (ex Life in Life in Life in Life and so on)?
There is already a possibility to make "computers" in the game a basically reproduce game inside the game. Theoretically you can go recursively as deep as you want.
Tech requirements == RAM is helpful, tricks are helpful too There are computational tricks that can speed up execution and efficiency of simulation - implementing them helps push any hardware much further and the program "Golly" is a good set up to help with this.
is that the OTCA metapixel at the end
I thought about doing something simelar just yesterday, but didn't get the mtoivation to actually do it
the end was fractal !! game inside a bigger game.
i have never had a single original idea in my life, havent i
Nice coverage of a classic topic. It's a shame everyone always overlooks Silverman's Wireworld though
Wireworld is supported by Golly, as I recall.
The video does show a quick shot of a Wireworld pattern, part of the prime-number calculator primes.mc in Golly's pattern collection... just doesn't mention it by name: kzhead.info/sun/qc16XayBjl9odmw/bejne.html
*Langton. (Suberb video by the way, fantastic stuff).
Glad you enjoyed it!
What if you made the complex function apply to say five randomly allocated target areas then take and average, might allow you to work on a much larger scale without as much computing? Working on the assumption that a complex family of interesting patterns will show higher complexity from a sampling method like that then overall complexity which might bias initial state\basic shapes. I’m not a compsci person just thought it might be cool? So essentially evolve towards higher average complexity over an area then total complexity of an iteration
Thats an idea, but has different results. Its not computationally expensive to calculate the fitness compared to running the simulation of the generations. So it won't save time in that regard. This method in the video explores the complexity that emerges from small patterns, producing small patterns. Later, one could use these small patterns for many other ideas. For example, what happens when pattern 1 and pattern 2 are inserted next to each other? Further apart? Even further? I think this way is a really nice way to generate both patterns that are small yet interesting as well as create starting points for bigger patterns exploration in some cool ways as a mix of your idea in a way - but using patterns that give known large complexity to spread them out and see what happens
@@kiraPh1234k this way doesn’t find new shit tho. If you’re looking for seed patterns instead of creating functions for complexity all you get is permuatations of the known
@@leucamaclean8900 No, there is nothing about "not looking for complexity" that implies something else "is known" However, I am getting that you're telling me I was off track in my interpretation of your suggestion. If the only suggestion is changing the complexity function to sample random areas then we can actually predict the results compared to the methods used in the video: 1. You will on average measure lower complexity in the same pattern (as you are just measuring less of the consequences) 2. Some patterns of extreme complexity will measure 0 based on random chance 3. Some patterns of no particular interest will measure high complexity based on random chance 4. The overall results will be very similar in structure, just less accurate in measurement As I mentioned before, the complexity measurement is not computationally expensive so its not saving significant resources to decrease its cost. And since it would also decrease accuracy, there is not a benefit being utilized for what is given up.
@@kiraPh1234k I disagree with the premise of your assumptions as they're not taking into account the point, which is to utilise evolutionary alg to come up with a way of proxying complexity into fitness and then allowing that to develop independently. I think(?) you are latching onto the sampling method which yes has flaws, but not addressing the actual point, that creating a method of testing for complexity that can be applied and then varied and progressed might end up finding thngs that are not even considered complex, or new permutations or outputs that can then be tracked backwards
Side note on a minor typo: the inventor of the Langton's Ant rule is mentioned as "Chris Langdon", but it's a "t" not a "d" -- en.wikipedia.org/wiki/Christopher_Langton
Any book to code stuff like this? Amazing
it's really easy to code it actually
@@MichaelDarrow-tr1mn That's pretty helpful, thanks a lot
I saw this video when the channel had 1k subs.
So how did you steer towards more symmetrical solutions?
by letting the ai evolve when steered by the complexity factor..
Also a fun program the powder toy has a similar system with the life tools. It's a fun sandbox with various elements
really neat
Thanks!
What about building neural netowrk that generate game of life rules? I.e maybe a cell is alive if the top left cell is alive and its button one etc?
To what avail?
0:26 what do those equations represent?
This is really cool. I've always been fascinated by the game of life. I really want to learn to work with shader programs to make a high performance life engine. I'm sure it's already been done before, and I frankly don't have the time to start another project. Maybe one day..
Yea, the shader stuff would be good to do.. My graphics card is bust at the moment, but a replacement is on its way..
Minorly interesting to me. Let me ask, are you familiar with a cellular automata that has a zygote? See the paper from 2008 with the title Computational Ontogeny.
thanks for the paper reference.. I'll check it out ..
I'd be cool to reciprocate the initial complexity for your fitness function (fitness = final_complexity/initial_complexity). This would be the initial condition that devolves into chaos the best.
That's it - how the Cosmos all started - Conway's Game Of Life
7:22. Cool. Thanks
At 3:11, what's the difference between "labeled" and "tagged"?
About a year ago I found a shape that can be infinitely placed within a single tile of a copy and never change, and the shape could be mirrored one tile below to create a shape that has a constantly switching cell in between them, I’ve forgotten how to make it and I’ve never seen someone else who claimed to discover it
I have seen this in youtube couple months ago. It was common (known) pattern but still nice if you noticed it alone!
Hold on. In that last zoom out, are we seeing a micro environment generate a macro environment by a kind of emergence? If yes, this has fantastic implications for the kind of processes that underlie Quantum Mechanics, and the idea of vacuum energy. This looks like breakthrough research, IMHO.
I think this is so interesting
I’m no programmer or mathematician but that zoom out at the end was crazy…. Like…. If I’m not mistaken that big structure/system was the same as the “gliders” and “ships” ?!?! As in someone discovered it? It wasn’t purposely created to look like that????
Hi. No, the initial conditions were set so that big scale glider was inevitable - unavoidable, in fact. The trick therefore is - how do you set up?
I did not expect it to go from dark black to bright white like that, that hurt
So if I am understanding, starting at 4:45, you refer to a "specified complexity" function that William Dembski invented with the intended aim to show that natural selection with random mutations can't produce emergent complex structures. You then use Dembski's function to create a fitness function, and then evolve systems, via natural selection and mutation, that Dembski's own function states have more specified complexity. And it looks like you did indeed get qualitatively interesting structures. So this would seem to imply that Dembski's specified complexity function has merit in detecting interesting structures, but also that systems with increasing specified complexity can evolve in systems via natural selection with mutation, contrary to Dembski's claim. Am I understanding this correctly?
Indeed. Stuff like this is why Dembski is not taken very seriously by overwhelming parts of the scientific community.
I was expecting the ai to try to create it's own rules.
I've seen a couple of papers outlining how to do this.. I plan on coding it up and seeing what emerges..
@@neatai6702 bro how much do you have planned lol XD
Was the final game produced by AI?