Neat AI Does Conways AI Life - Allowing a neural network evolve its own patterns

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi and welcome to neat ai i spent the last few days playing around with the game of life and exploring some of the cool things people have done with it in the past of course i just had to code it up and plug in a small population of new roulettes to see what kind of structures and shapes would emerge from the evolutionary process and we're talking here about cellular automatons which are rows or grades of cells but simple rules covering reproduction and death which can go on to produce quite complex systems and interactions one of the most basic of these would be the wolfram elementary one-dimensional grid units they have 256 rule sets to choose from and largely produce unique and different results the output from ruleset 30 is being displayed here with the result from each generation being pended to the previous in order to grow the set you'll also see them used in statistical and condensed matter physics to study phenomena like fluid dynamics and phase transitions and in the brian's brain example that's what it's called the concept of a dying cell is introduced these tend to lead to directional movement so almost every pattern in brian's brain is a spaceship langdon's ant is a two-dimensional universal touring machine with a very simple set of rules with complex emergent behavior it was invented by chris langdon in 1986 and the idea has been generalized in several different ways such as termites which add more colors and more states there are also many 3d implementations of cellular automatons and many many more but i want to focus on the rules for conway's game of life [Music] the rules are quite simple if a cell is alive then it stays that way if certain conditions are met [Music] and of course if it's dead it'll spring back to life if it has three live neighbors you're going to need two arrays for this to work the first array holds the current iteration of the cells and it's against this data set the rules are applied with the result being stored in the next generation array that then gets moved into the current generation array and you simply rinse and repeat for testing the simplest option is to go for the r-pen domino it's one of the most active patterns that starts with fewer than six cells the glider it releases in generation 69 first noticed by richard guy was the first glider ever observed it's useful for testing because it's easy to create it produces lots of basic shapes chips loafs blinkers toads beacons and lots of gliders and it eventually stabilizes so i decided to start with a three by three grid to run through all of the possible combinations and see what popped out this of course is simply a nine digit binary number which gives me 512 possible combinations there's going to be a lot of repetition in this but all the expected shapes emerge as well as all angular variations of the orphan domino i'm not sure where the naming convention came from for these shapes but there are plenty of lists available to browse through they detail hundreds of different items and combinations which have been discovered labeled and tagged [Music] i then extend this approach to a four by four matrix which results in more complex shapes as there are a lot more starting patterns to run through as it's a 16 digit binary number the number of initial states is 2 to the 16 which is over 65 000. [Music] so at this stage i was starting to see a problem with this approach i'd clearly hit the limit of what my 10 year old pc could achieve as it's a little underpowered at the moment i wanted to explore much larger spaces so i switched to a 60x60 starting grid and began randomly populating it the number of possible initial patterns was some crazy big number and the end result was unstructured and messy what i needed was some way to represent the patterns being produced by a single number related to their complexity so i did some digging and came across a paper which seemed to do exactly that the challenge here is to extract the degree to which an object is meaningful pre-existing measures of information are famous for not being able to measure meaning and this paper proposes a method to do just that and the author quite handily uses the game of life as a testbed for his approach it details its own operators for pattern descriptions and uses in-game setups such as the gospel gliding gun as examples i ended up just using the complexity function for my purposes here and as my implementation of life changed i updated the c function with each iteration i decided to just let this run on multiple instances of the game all running in parallel and every time an instance achieved a new highest c function i stored the initial pattern setup by letting it run for a few hours over time more and more complex highs would be achieved but all the results were quite chaotic and i started wondering if i could do something else with this c function i decided to use it as the fitness function for a small population of neural nets a product of the maximum and final complexity could be used to steer the population as it evolved over hundreds of generations as an input i use the x and y grid coordinates percentage of the grid populated and a bias entry the output is a decision on whether or not to activate a cell this allowed the neurolet to decide which starting pattern it used each network and the population did this with the first generation being completely random they were allowed to run for 100 iterations the fittest population members could then go on to produce the next generation this was done through the standard approach of speciation crossover and mutation see my flappy birds video for details on how this works [Music] i applied this approach to larger and larger starting grids and it consistently evolved towards highly detailed and symmetrical patterns new shapes patterns and ships are constantly being found in life in december 2020 a new ship called the duda was discovered and finding something new is what i want to work towards but it would need a rethink on the fitness function so all that's left is to check out the life and live setup which still gives me goosebumps [Music] you
Info
Channel: Neat AI
Views: 22,791
Rating: 4.9224491 out of 5
Keywords: Beast Game of Life, AI, NEAT AI, Artificial Intelligence, Neural Network, Generative Art, A.I., neural Net, using Python, python, tutorial, processing, p5js, coding, speedrun, blender, after effects
Id: viA-HIW-2C4
Channel Id: undefined
Length: 8min 1sec (481 seconds)
Published: Sat Apr 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.