Neat AI Does Conways AI Life - Allowing a neural network evolve its own patterns
Вставка
- Опубліковано 11 чер 2024
- 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
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.
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 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?
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
Really great video. The ending shot was insane👏
Thanks for the feedback.. It was a fun one to do.
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
Holy crap, did it just fractally iterate itself? That’s so incredible!
the game of life is just so fascinating... multiple professors in different classes used it as examples in different subject areas....
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.
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?
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
OOOOHHH MYYYY GOOOODDDDD THAT FINALE HIT ME LIKE A FREIGHT TRAIN HOLY GUACAMOLE!
After a minue, I'm still gettin new goosebumps! FRRRRRRRUUUUUUWHAAT!?
The last 5 seconds, you cheeky buggers. Such a finishing touch, well played for those who wait for that last moment . 👏
i really want to send a single unintended shape into that life in life setup.
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.
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
This is so interesting, I just started reading about neural networks and I am glad UA-cam recommendations are working so well.
Hope you enjoy it!
Wow that's a great idea. Thank you for sharing this. That was awesome.
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..
Amazing ! Great idea. Great paper reference. Thank you
Glad it was helpful!
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
Thats genious. That last scene was mindblowing!
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 :-)
That ending was awesome
N i c e Richard Kenneth Guy. First glider ever observed, was on gen 69.
I didn't know there were more complex versions of this game, I'm gonna try them out
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 ending of this video is just so beautiful.
The exits scene really WOWed me.
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.
Astonishing work. Bravo!
Many thanks!
Wow, that ending. Life in life is mind blowing
I love the 5 second music loop
Awesome ending
An Langdon’s Ant! That takes me back. The first example of emergent behaviour that really clicked with me.
My girlfriend makes CA and I can't wait for her to see this video so she can draw more inspiration
literally made the game of life in the game off life at the end oh my god
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...
Bruh, its crazy how you dont have more subscribers with these quality videos!
Working on it!
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
I could watch the game of life for hours.
Amazing video, thank you for your content!!
Glad you like them!
@@neatai6702 do you ever share your code?
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
Dude that network at the end tho. Fractal game
That was my homework last week I'd like to learn about a more complex version 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!
awesome awesome awesome, I just subed
thanks for the sub ABC
The beauty in these experiments lies within the simple overlooked base that the unarguable logic taking place is evolving a basic entity in the same beginnings as life itself.
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.
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.
i have never had a single original idea in my life, havent i
I've nearly been run over by a car.
I've nearly had a brick dropped on my head from two storeys up.
I nearly stopped watching this video before the end.
Three very close calls.
The most amazing thing I have ever seen.
Well done!
Interesting illustrations.
I hope it is clear that the end portion is just a video of the separate and well known "life in life" pattern. It is not a result of the AI training.
At the end there 👌
That's it - how the Cosmos all started - Conway's Game Of Life
Today's the day your channel starts to blow up. Congrats
Cheers Niles
we need a noneuclidean version of this
more science thank you i love it
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..
I saw this video when the channel had 1k subs.
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.
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?
7:22. Cool. Thanks
I did not expect it to go from dark black to bright white like that, that hurt
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.
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?
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
great video
Thanks Brendan !
This is dope bit I was kinda hoping you'd create a neural network inside the game of life.
the end was fractal !! game inside a bigger game.
You are the Architect of their Matrix
really neat
Thanks!
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!
Also a fun program the powder toy has a similar system with the life tools. It's a fun sandbox with various elements
This is neat
I think this is so interesting
You could say that this is pretty "neat" !
Thanks ! have also done a smoothlife video..
wait so what happened with ur neural network then
Not a lot.. its still running.. although I'm making changes to the fitness function and moving more towards a novelty search algo.. The goal is to discover something new in GOL...
@@neatai6702 so how about now ?
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?
Interesting
Is there a way you could share the code you used ? Or detail a bit more your computations?
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!
*Langton. (Suberb video by the way, fantastic stuff).
Glad you enjoyed 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 )
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:
ua-cam.com/video/viA-HIW-2C4/v-deo.html
I thought about doing something simelar just yesterday, but didn't get the mtoivation to actually do it
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.
Is this some type of evolutionary algorithm - or is there a loss function? How do you update the network
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!
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
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
thing showed at end detonated bomb in my mind
One thing that has always made me wonder, is whether it would be possible fkr a sufficiently complex GOL machine to tunnel through smoke patterns. I believe the answer is yes.
Right here.
Imagine being able to watch shrek in Conway's Game of Life.
Emergence in action
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?
Amazing that so cool computation is cool yeag
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.
Очень интересно. Только я так и не понял, что делали нейросети? Или это были генетические алгоритмы?
Нейронные сети использовали вычисление сложности в качестве прокси-функции пригодности и пытались развить начальные шаблоны, которые давали бы все более сложные результаты игры жизни; вместо случайного шума..