I mentioned it briefly in the video, but didn't clarify it super well. The filter is inverted, meaning it's flipped over both it's x/y axis. This results in an inverted pattern, and this implementation is pretty common for convolutions. I may explain in a future video why I find this more intuitive, where a visual aid would be very helpful. Hope this clarifies any confusion!
i thought already that it seems more like an outwards effect filter than inwards, since if i made a 1 in the bottom left it didn't get the cells the value from the bottom left, it exported the cells value to the bottom left cell.
Unlike cross-correlation (not transposing the matrix), convolution has many sexy properties in regards to commutativity, distributivity complex conjugation, differentiation, and fourier transforms. You can merge kernels into one bigger one because of associativity, just note most machine learning libraries implement it as cross correlation since the weight are learned.
The cells don't have to be arranged in a square grid. They often are, because that's an easy and efficient way to quantize space in computer memory; But they don't *have to* be. You could also have hexagons, or triangles, or indeed an irregular graph of random points.
Also the cells could have other values, like 0.5. I don't think, a simplified definition being used in the video is bad, but the following would be a more general defenition: A cellular automata is made up of cells arranged in a grid that have values. The values of the next timestep are calculated via a convolution of the previous timesteps values.
This is the kind of stuff Computer Science should be about. Not creating the architecture for the newest dating algorithm. This is what the world needs right now.
This just cracked open my mind to all kinds of new possibilities and ties right in to existing skills ive already developed. Thank you so much for the work you put into this video ❤
Woah! this is another level above the cellular automata (and fractals) I was playing around with forty years ago on my Commodore 64, thanks to a column in Scientific American. BASIC was too slow and I had to learn opcodes to do the actual cell processing, with operations directly on the screen memory.
your program is fascinating, it almost feels dream-like. I'm having a lot of fun slightly tweaking numbers on the worm pattern to see all the new results. I feel like layers of the universe have been pulled back, and I'm getting to see how all the things function through relatively simple numbers!
Thank you so much! I had so much fun with it!! I made this function float activation(float x) { float y = 1./(1.+pow(2.7182,-x)); float z = ((x/y) + (y/x)); if (x
I was litirally just watching all your videos and was just out of content lol. For my highschool project I'm also making a natural selection simulation. But your life engine is so much more interesting and made me wish I saw this earlier so I could make something more like your life engine. Anyways your videos are so interesting keep it up :).
I was messing around with the worms save (essentially keeping the code part the same) and stumbled upon an interesting filter. It has a few rules that I noticed: 1. When I wiggle the mouse around quickly enough in a small enough area, a blob will start to form and grow. But these blobs come in two variations (which I haven't figured out how specifically create one type or the other. My only guess is how concentrated they get before they start growing?) that forms a wall between each other. 2. Two blobs of either Type 1 or Type 2 will absorb into each other when they meet, but when a Type 1 and a Type 2 meet each other a wall is formed. 3. If one type engulfs a smaller opposite type, if the opposite is small enough it will get eaten. 4. Finally, a Type 1 will become a Type 2 (and vice versa) when wrapping the screen vertically, but for some reason stays the same type when wrapping horizontally. Such odd behaviour from something like this. Rules are created from something that doesn't inherently have those rules. Not as interesting as finding something that looks like watching bacteria, but something neat nonetheless. If you want to see for yourself, just load up the worms save and use this filter: -0.1 0.7 -0.1 0.7 0.0001 0.7 -0.1 0.7 -0.1
I started with the Worm save, entered the filter above, and hit Reset State. The resulting pattern is interesting, but nothing like what you described. Are there any other settings to modify to recreate it?
@@adsilcott In the reset options, hit clear to give the screen a blank slate. Then you can move the mouse around to make the bubbles. You should notice how some of the blobs you make merge and some refuse to merge at all. Eventually that will all expand to fill the screen. It should still do it even when you hit reset, it just creates blobs all over the place and might be hard to notice the rules I notice at play. And also remember that there isn't any visual way to tell the difference between the two blobs until two of them meet. Hopefully this clears it up for you. If not, then I'll try to explain better, or maybe upload a video or something lol.
Love this video, impressive work! Short comment though: This is not neural cellular automata. The neural part is of CA is TRAINING the Neural cellular automata so that the filters learn to replicate existing patterns. That's what's neural about it. In this video the filter values are a given. The way it's explained is more akin to implementing continuous cellular automata with activation functions.
Rarely do I come across a video as inspiring as yours. I've dabbled in simulating a reaction-diffusion system as well as population dynamics, but this just makes me excited to explore even more! Thank you so much for making and sharing this video.
@@TheRainHarvester I'm glad to be here, and thank you for checking out my channel! I just have to say that there's just so much other, better stuff out there too. For instance, I recently ran across Dave Ackley's channel, and he's a professor who works on artificial life whose whole channel just has a really nice vibe. th-cam.com/users/DaveAckley
This is beautiful and fascinating. Thanks to computers and browser tools like yours everyone can do experiments about emergence which would be a great opportunity for those who rather stick to the theory of an intelligent creator as opposed to very simple initial conditions that eventually lead to high complexity.
@@Gosuminer I like thinking that there is no point in arguing since it’s technically impossible to ever define the start of the existence of anything. I am not religious but I cannot deny it likely will never be found what came before the universe, if there are other universes, etc. therefore I cannot actually disprove higher powers. I do believe that god doesn’t affect anything if he were to exist but I certainly cannot rule out the fact that we will never know if he did
Awesome video! Here's a suggestion: You could generalize the idea of neural cellular automata by allowing cells to contain additional state variables besides just alive/dead; with a single additional variable, for example, you could simulate some pretty interesting reaction-diffusion systems!
The first thing, I ever made in Python was Conway's Game of Life, but on a hexagonal grid, and with looping edges. It was finished less than 24 hours after I started learning Python, which was a few days ago.
sounds fun. either you are extremely good at picking up programming language or it isn't as hard as I thought. Anyways, you convince me to learn it this fall.
@@NoSTs123 That's awesome! I know how I teach myself things efficiently, I had already taught myself a some minecraft bedrock edition command block stuff and Scratch before, but always got stuch because of those programming languages' limitations (mostly the fact, that the code can not add new variables.). Python is a good place to start learning programming.
Ich habe vor 40 Jahren meinen ersten Kontakt zu "LIFE" und dies auch selbst programmiert. Es war schnell klar das man aufpassen muss den Begriff "Zeitlichen Ablauf" nicht aus den Augen zu verlieren. Also habe ich aus dem fiktiven "Jetzt" Situation erst komplett getrennt das "Next Step" errechnen lassen und dies mit einfachen Inkrement Befehle weil das eben schnell gegangen ist. Jede Zelle wurde nur zweimal angesehen vom Programm. Dann das "jetzt" gelöscht und das "Next Step" zum "jetzt". Wenn man das nicht macht bekommt man Effekte als wenn man mit einer altmodischen TV Kamera auf den von der Kamera aufgenommenen Wiedergabe Röhren TV drauf hält. Eine Rückkopplung des Analogen Bildsignals. Das scheint hier das gleiche Verfahren zu sein und man darf nicht vergessen das die alten Bildröhren TVs das Bild von oben nach unten und links nach rechts gezeichnet haben. Hier ist es evtl. eben Digital ein "Jetzt" und "Next Step" Problem im Grunde fehlerhafte Ausführung der Funktion.
If you want to be serious about the epilepsy warning on your website you must not make the animation autoplay. It would also help to make the warning a big, central popup with a prominent "yes, I understand" button and a "no, close web page again" one.
The autoplay pattern is configured so it can't be very flashy, I figured it was safe enough. My intuition may be wrong though, I will eventually make the popup more prominent
@@EmergentGarden I'm not an expert on epilepsy and what triggers it. Clicking/Reloading through some random patterns I agree that they are not directly flashy, but certainly jarring. Some do develop a flashing pattern after a short while though. (Now that I think about it, a big part could be my monitor and the relative size of one real pixel to one pixel in the simulation. If I zoom in there is indeed no flashing going on). After a few reloads I got the following pattern that quickly develops into flashing patches on my monitor: 0.1049 -0.5843 0.6364 -0.5714 -0.644 0.9084 0.8545 -0.4166 -0.7815 With the default identity function.
I don't know if this is already implemented, but for the life engine, maybe having something like an eye, which is a combination of some cells, only be possible to produce if there's a specific pattern. So for example yoh have to have maybe some 'useless' ones until you can get an eye. Another example could be hands and throwing things. So you have to evolve some kind of something similar to hand, to have thay
I love this thing! It reminds me of the backgrounds of Yume Nikki, I feel like this sort of thing would feel right at home in a weird little rpgmaker game.
Very cool. Now we need a generic algorithm that modifies the filter and has a fitness function based on how many other species are currently in the picture as well as how much space it takes (fitness = diversity + dominion) and have several species live on the grid at the same time. Evolution all over again
Warping the grid would be cool, like how gravity works under relativity. The higher the value at a space, the smaller it shrinks, down to a minimum size. The scaling effect would have to warp its neighboring spaces on each simulation step to simulate a gravitational wave, which would propagate out in all directions, and cause the strength of the warping to drop off with distance. You could play around with all those parameters, as well as functions that determine the amount of shrinkage, and how the warping space effect spreads. The convolution would have to be scaled based on the size of the space I guess. And I also think that the convolution would have to be applied to the warped version of the grid, somehow, like via a projection onto the warped version of the grid. As for how you'd warp time, if you wanted to make it even more relativistic, I'm not exactly sure, but it would be cool if that could be done as well.
Now I wonder what would be the behavior if we could quantum-entangle cells based on how much they interact (I know this is not how QE works, but redefining existing physical phenomena makes it more interesting)
You could achieve time-dilation by applying a convolutional expression of relativity. Using a sigmoid over the "uncapped" velocity of each cell provides a naïve approach, but why not use some numerical approximation of Einstein's field equations, applied as a further convolution over the input? Let's consider our world as having arbitrary base units, analogous to SI base units for simplicity. We can let each cell be a 1 m^2 surface in our 2D gridworld, with energy equal to the value of the cell. You could even go wild and use another activation function, or a separate convolution over the input to compute said energy. Each cell must therefore have a mass, and a (2D) density - we can choose the fundamental constants of reality in our model to be the same as real life, or we could choose a completely new set if we really felt like it with potentially wacky results. The equations we've derived that best describe the universe we inhabit don't require the constants to be any value in theory, we just found out what they are for OUR universe. Let's treat "energy" as a measure of the kinetic energy of the particle; you could even separate out into two channels for representing energy and mass separately. We don't necessarily need to however, and we could just treat each cell as having a rest-mass of 1 unit. Taking this approach, let's extrapolate out our model into 3D. Sounds weird for a grid, but the third dimension in this case is time. The "3D space to 4D spacetime" is what's known as a Minkowski space, so let's consider the 2D to 3D version as a similar enough thing, with a Euclidian (flat) geometry under the absence of curvature. This brings us to the "bending" analogy, but with visualisations that are actually understandable to us - the lycra-sheet demo of bending 2D planes into 3D objects. Adding in a channel for rest-mass and taking a 3D convolution over both channels at once should be sufficient to represent the spatiotemporal interaction. TL;DR - use a 3D grid with one layer for kinetic energy and the other for rest-mass, then use a rank-3 tensor as a kernel rather than a rank-2 tensor (matrix) to do a 3D convolution.
@@SirPlotsalot thanks so much for the thoroughly thought out reply. I'm a software engineer but that's beyond my current level of understanding. I'd love to make an app or something that lets you play around with gravity and such, all the parameters you were talking about. I think if more people got to play around with physics like that, more people would be into it.
@@SirPlotsalot yeah will try eventually. I'd have to try to keep it interesting though, I usually make some kind of game or dynamic simulation to accompany some concept I'm learning.
i'm sure I'm not the only one who sees it, so eventually we're going to have violent video games where the characters health is gonna be based on this principle. walking around the scene like Westworld automatons.
If you set the centre weight for Conway to 0.5, then you can do a simple range test between 2.0 and 4.0. 3 neighbours is always less than 4, and 2 neigbbours + 0.5 is greater than 2. Then maybe subtract 3.0 from that and use 1 - abs() or whatever.
This is interesting, I got an idea. Maybe we can use some algorithm to generate random functions and use OpenCV routines to detect whether the CA reaches a stationary state after some time, so we can know what activation function and kernel lead to a pattern. I saw a talk on TH-cam about how DL can be used to discover physics equations, which can be useful, but I can't remember the name of that video.
great video and it is truly amazing how far Cellular Automata has went. Is there any communities around this stuff? Like subreddit or discord server that you are part of?
Hey, enjoyed the video, thanks! On a technical note, the original paper did learn a function that generates the final pattern so the "neural" part makes sense, however, in your case it seems there is no learning and you are only applying a filter + activation function. Maybe "continuous" cellular automata is a better term than neural?
Is there a random number generator in the language used for activation functions? I wanted to add some noise too the activation but couldn't find any rand() or random() function.
Really cool! Just sharing a few things I made here: Conway's Game of Life, but generalized to floats ``` {"reset_type":"center","filter":{"0":1,"1":1,"2":1,"3":1,"4":10,"5":1,"6":1,"7":1,"8":1},"hor_sym":false,"ver_sym":false,"full_sym":false,"activation":"float activation(float x) { \tif (mod(x,10.0)>=1.5&&mod(x,10.0)=3.0) { \treturn x/10.0+1.0; \t} \t \treturn x/10.0-1.0; }","color":[1,0.1803921568627451,0.1803921568627451],"bg_color":"#000000","persistent":false,"skip_frames":false} ``` Interesting thing about this is that the pre-loaded game of life and I both used almost exactly the same approach? They made the more reasonable decision of using 9, and I used modulo to compress the code, and of course later made it into ranges instead of integers. Still interesting, though. Watercolor paintbrush ``` {"reset_type":"random_bool","filter":{"0":0.10000000149011612,"1":0.3499999940395355,"2":0.10000000149011612,"3":0.3499999940395355,"4":-0.05000000074505806,"5":0.3499999940395355,"6":0.10000000149011612,"7":0.3499999940395355,"8":0.10000000149011612},"hor_sym":true,"ver_sym":true,"full_sym":true,"activation":"float activation(float x) { \treturn x/1.75; }\t\t","color":[1,1,1],"bg_color":"#000000","persistent":false,"skip_frames":false} ``` Tried to recreate some sort of watercolor paintbrush. Paint dissapates and expands for a little bit before settling into a stable state. If you need a brighter color, paint more over the same spot
Hi Emergent Garden I loved ur video! I am currently studying cs and cog sci in Canada and recently undertook a project where i tried to model a certain evolutionary behavior with a ca. This video is fascinating, where do you recommend I read up more on neural ca's, seems like a fascinating next project?
I've thought about it! I may eventually add an option to expose that value, but for the moment you cant do it through the UI. If you don't want to wait for me the project is open source: github.com/MaxRobinsonTheGreat/webgl-convolution
@@EmergentGarden thank you. I do hope you will add it at some point, kernel 4 if I'm not mistaken? But yea, already opened it & started to go over the code. Not a strong js wiz, but it seems doable :)
Or maybe it's just an indication that life isn't as complex as we assume. Hence why I'm not a fan of neural networks and AI, I'm convinced that one day soon we will produce something capable of suffering. And seeing how we already treat creatures capable of it today, we won't be kind to our creation.
I wanna combine this with something like Deepdream by Google or better - new Gaugan by Nvidia. Of course everything generated in real time with the option of layers - that would be interesting to watch, especially on high :D
I tried just inverting the gaussian activation function and didn't get the worms, but I did notice worm-like patterns in the noise, so based on my shader experience i tried putting a "hardness" exponent on the pre-inversion gaussian and that seems to be at least close to right float activation(float x) { float hardness = .6; return 1. - pow(1./pow(2., (pow(x, 2.))),hardness); } You can adjust hardness a bit and still have something like worms, but 0.1 in either direction will result in collapse to black or expansion to the kind of screen filling pattern you get without the exponent. I don't think this is EXACTLY the function shown here but hey.
What do you mean "the filter is inverted from the panel"? You only show the filter with an outline, you're not showing what/where the reflection is and you're not even saying why it's intuitive or why the opposite would be unintuitive.
Why does this expand to the upper right? 4:19 When I calculate the upper right, I do get -.5 as a result. And when I lay the grid over the pixel in the bottom left, I do get .3 as a result. Can somebody PLS help me. I am really frustrated! Thx
The filter is actually inverted, meaning it's flipped over it's x and y axis, so the pattern is also inverted. This is usually how convolutions are implemented. Sorry, I should have made this more clear.
Somehow, I feel like the ”worms” activation function should be implemented in unrelated AI projects in order to study its emergent properties. Whether or not the convolution in ”worms” is a fluke might hold some sort of significance, don’t you think?
if i could programm with glsl thsi would be so cool, but i'm stuck at python level, i can get a basic understanding but i don't know how to properly use the operators etc, so if i write code it's very unoptimal (still some cool interactions i could get by trying to make a modulus filter to get positional info out of x, but that was with 5 if-statements in something i could've done in 2 python lines...)
I mentioned it briefly in the video, but didn't clarify it super well. The filter is inverted, meaning it's flipped over both it's x/y axis. This results in an inverted pattern, and this implementation is pretty common for convolutions. I may explain in a future video why I find this more intuitive, where a visual aid would be very helpful. Hope this clarifies any confusion!
i thought already that it seems more like an outwards effect filter than inwards, since if i made a 1 in the bottom left it didn't get the cells the value from the bottom left, it exported the cells value to the bottom left cell.
Unlike cross-correlation (not transposing the matrix), convolution has many sexy properties in regards to commutativity, distributivity complex conjugation, differentiation, and fourier transforms. You can merge kernels into one bigger one because of associativity, just note most machine learning libraries implement it as cross correlation since the weight are learned.
There’s a good visual explanation of the inversion here th-cam.com/video/KuXjwB4LzSA/w-d-xo.html
The cells don't have to be arranged in a square grid. They often are, because that's an easy and efficient way to quantize space in computer memory; But they don't *have to* be. You could also have hexagons, or triangles, or indeed an irregular graph of random points.
Yeah lots of cool variations, I just simplified it to give context for NCAs.
Technically, so long you use coordinates(as in perpendicular XY), you will always will be on a 'square' grid, even with floats.
@@overloader7900 That's incorrect.
@@overloader7900 well not necessarily; but you would always have something that can be mapped to a square grid
Also the cells could have other values, like 0.5.
I don't think, a simplified definition being used in the video is bad, but the following would be a more general defenition:
A cellular automata is made up of cells arranged in a grid that have values. The values of the next timestep are calculated via a convolution of the previous timesteps values.
This is the kind of stuff Computer Science should be about. Not creating the architecture for the newest dating algorithm. This is what the world needs right now.
This just cracked open my mind to all kinds of new possibilities and ties right in to existing skills ive already developed. Thank you so much for the work you put into this video ❤
I commented “this is the most underrated channel under 1000 subs”. And now you have 2.13k a few days later. Love to see it.
Woah! this is another level above the cellular automata (and fractals) I was playing around with forty years ago on my Commodore 64, thanks to a column in Scientific American.
BASIC was too slow and I had to learn opcodes to do the actual cell processing, with operations directly on the screen memory.
It would be cool to see a part two about how the more complex cellular automata work, such as the self regenerating ones you've mentioned
I'm planning to play around with them more!
@@EmergentGarden I can't wait to see the upcoming video then!
Your channel is a hidden gem, I just watch your videos on repeat in the background when programming
i think your channel is going to grow pretty fast
it isnt common to see so good content so early
your program is fascinating, it almost feels dream-like. I'm having a lot of fun slightly tweaking numbers on the worm pattern to see all the new results. I feel like layers of the universe have been pulled back, and I'm getting to see how all the things function through relatively simple numbers!
These are the coolest videos I’ve ever seen. I’ve been coding shaders in glsl for a couple years now, and you just gave me a ton of ideas. Thank you
Thank you so much! I had so much fun with it!! I made this function
float activation(float x) {
float y = 1./(1.+pow(2.7182,-x));
float z = ((x/y) + (y/x));
if (x
the "return z/x" part should always make a number greater than 1. is this intendet?
I was litirally just watching all your videos and was just out of content lol. For my highschool project I'm also making a natural selection simulation. But your life engine is so much more interesting and made me wish I saw this earlier so I could make something more like your life engine. Anyways your videos are so interesting keep it up :).
Same here lmao
Have you figured out all the details of how it will work?
I'm just curious; how is work on your program going?
I was messing around with the worms save (essentially keeping the code part the same) and stumbled upon an interesting filter.
It has a few rules that I noticed:
1. When I wiggle the mouse around quickly enough in a small enough area, a blob will start to form and grow. But these blobs come in two variations (which I haven't figured out how specifically create one type or the other. My only guess is how concentrated they get before they start growing?) that forms a wall between each other.
2. Two blobs of either Type 1 or Type 2 will absorb into each other when they meet, but when a Type 1 and a Type 2 meet each other a wall is formed.
3. If one type engulfs a smaller opposite type, if the opposite is small enough it will get eaten.
4. Finally, a Type 1 will become a Type 2 (and vice versa) when wrapping the screen vertically, but for some reason stays the same type when wrapping horizontally.
Such odd behaviour from something like this. Rules are created from something that doesn't inherently have those rules. Not as interesting as finding something that looks like watching bacteria, but something neat nonetheless.
If you want to see for yourself, just load up the worms save and use this filter:
-0.1 0.7 -0.1
0.7 0.0001 0.7
-0.1 0.7 -0.1
I started with the Worm save, entered the filter above, and hit Reset State. The resulting pattern is interesting, but nothing like what you described. Are there any other settings to modify to recreate it?
@@adsilcott In the reset options, hit clear to give the screen a blank slate. Then you can move the mouse around to make the bubbles. You should notice how some of the blobs you make merge and some refuse to merge at all. Eventually that will all expand to fill the screen.
It should still do it even when you hit reset, it just creates blobs all over the place and might be hard to notice the rules I notice at play. And also remember that there isn't any visual way to tell the difference between the two blobs until two of them meet.
Hopefully this clears it up for you. If not, then I'll try to explain better, or maybe upload a video or something lol.
Sounds like the two types are offset from each other, like the black and white bishops in chess. Just a guess.
Love this video, impressive work!
Short comment though: This is not neural cellular automata. The neural part is of CA is TRAINING the Neural cellular automata so that the filters learn to replicate existing patterns. That's what's neural about it. In this video the filter values are a given. The way it's explained is more akin to implementing continuous cellular automata with activation functions.
SmoothLife
Rarely do I come across a video as inspiring as yours. I've dabbled in simulating a reaction-diffusion system as well as population dynamics, but this just makes me excited to explore even more! Thank you so much for making and sharing this video.
Nice to see you here samter! I like your channel too.
@@TheRainHarvester I'm glad to be here, and thank you for checking out my channel! I just have to say that there's just so much other, better stuff out there too. For instance, I recently ran across Dave Ackley's channel, and he's a professor who works on artificial life whose whole channel just has a really nice vibe.
th-cam.com/users/DaveAckley
I work on NCAs and this is an amazing video that gave me a much cooler intuition
This is beautiful and fascinating. Thanks to computers and browser tools like yours everyone can do experiments about emergence which would be a great opportunity for those who rather stick to the theory of an intelligent creator as opposed to very simple initial conditions that eventually lead to high complexity.
And what was the source, or the origin, of that "simple" initial conditions?
@@MaximoPower2024 We don't know yet but it does not have to have been an intelligent entity.
@@Gosuminer I like thinking that there is no point in arguing since it’s technically impossible to ever define the start of the existence of anything. I am not religious but I cannot deny it likely will never be found what came before the universe, if there are other universes, etc. therefore I cannot actually disprove higher powers. I do believe that god doesn’t affect anything if he were to exist but I certainly cannot rule out the fact that we will never know if he did
Fascinating stuff, please never stop.
It's wonderful isn't it? I had the same feeling of being onto something deeply profound when playing with rendering fractals. Lovely little video!
Excellent video - just the right pace for me and well explained.
Очень интересная идея. Взял себе в разработку для курса по клеточным автоматам.
Awesome video! Here's a suggestion: You could generalize the idea of neural cellular automata by allowing cells to contain additional state variables besides just alive/dead; with a single additional variable, for example, you could simulate some pretty interesting reaction-diffusion systems!
I am considering using this for my master's thesis in music composition. Thank you for sharing your knowledge :D
Cool vid. Looks like a sweet place to try out different reaction diffusion patterns.
working on a neural automata in c++, just found this great channel, subbed
thank you for joining us in the journey to the digital micro verse.
The first thing, I ever made in Python was Conway's Game of Life, but on a hexagonal grid, and with looping edges. It was finished less than 24 hours after I started learning Python, which was a few days ago.
sounds fun. either you are extremely good at picking up programming language or it isn't as hard as I thought.
Anyways, you convince me to learn it this fall.
@@NoSTs123 That's awesome!
I know how I teach myself things efficiently, I had already taught myself a some minecraft bedrock edition command block stuff and Scratch before, but always got stuch because of those programming languages' limitations (mostly the fact, that the code can not add new variables.).
Python is a good place to start learning programming.
@@Illogical. Thanks
@@NoSTs123 From the way, that you wrote your comment, it seems like there are similarities between how we think. That is a good thing.
@@NoSTs123 It's not either, or. Both are true.
The wall was too high
As you can see
No matter how he tried
He could not break free
And the worms ate into his brain
Your videos are getting so much better!
You are so inspirational, your videos have really helped me in making my own evolution simulation game thing
this video is so SOOTHING and INTERESTING, thank you!!
That's what thoughts look like. Immediate impression. Way cool.
Love your videos. I feel we are getting at the very fundamentals of the universe.
I would really recommend putting a Fourier series in the activation field. Keeps giving me more unique results.
So Conway's game of life is basically a edge case of NCA.
Ich habe vor 40 Jahren meinen ersten Kontakt zu "LIFE" und dies auch selbst programmiert. Es war schnell klar das man aufpassen muss den Begriff "Zeitlichen Ablauf" nicht aus den Augen zu verlieren. Also habe ich aus dem fiktiven "Jetzt" Situation erst komplett getrennt das "Next Step" errechnen lassen und dies mit einfachen Inkrement Befehle weil das eben schnell gegangen ist. Jede Zelle wurde nur zweimal angesehen vom Programm. Dann das "jetzt" gelöscht und das "Next Step" zum "jetzt". Wenn man das nicht macht bekommt man Effekte als wenn man mit einer altmodischen TV Kamera auf den von der Kamera aufgenommenen Wiedergabe Röhren TV drauf hält. Eine Rückkopplung des Analogen Bildsignals. Das scheint hier das gleiche Verfahren zu sein und man darf nicht vergessen das die alten Bildröhren TVs das Bild von oben nach unten und links nach rechts gezeichnet haben. Hier ist es evtl. eben Digital ein "Jetzt" und "Next Step" Problem im Grunde fehlerhafte Ausführung der Funktion.
Guys, we just fell through the rabbit hole~!
Feature required: new function to map value to color. Mirror the core on both direction to match the convention in CV.
If you want to be serious about the epilepsy warning on your website you must not make the animation autoplay. It would also help to make the warning a big, central popup with a prominent "yes, I understand" button and a "no, close web page again" one.
The autoplay pattern is configured so it can't be very flashy, I figured it was safe enough. My intuition may be wrong though, I will eventually make the popup more prominent
@@EmergentGarden
I'm not an expert on epilepsy and what triggers it. Clicking/Reloading through some random patterns I agree that they are not directly flashy, but certainly jarring. Some do develop a flashing pattern after a short while though. (Now that I think about it, a big part could be my monitor and the relative size of one real pixel to one pixel in the simulation. If I zoom in there is indeed no flashing going on).
After a few reloads I got the following pattern that quickly develops into flashing patches on my monitor:
0.1049 -0.5843 0.6364
-0.5714 -0.644 0.9084
0.8545 -0.4166 -0.7815
With the default identity function.
I don't know if this is already implemented, but for the life engine, maybe having something like an eye, which is a combination of some cells, only be possible to produce if there's a specific pattern. So for example yoh have to have maybe some 'useless' ones until you can get an eye.
Another example could be hands and throwing things. So you have to evolve some kind of something similar to hand, to have thay
So we do live in a simulation
On the brain of an ape yes.
I love this thing! It reminds me of the backgrounds of Yume Nikki, I feel like this sort of thing would feel right at home in a weird little rpgmaker game.
Truly mind blowing! Thank you for all the videos.
Amazing work... I got interested in these topics about a year ago when
Really good channel. This is a hidden gem. Keep it up.
Hii, this is very interesting. Could you make a part 2 on a more detailed explanation of different patterns and its results?
Fascinating, thank you for showing this
Very cool. Now we need a generic algorithm that modifies the filter and has a fitness function based on how many other species are currently in the picture as well as how much space it takes (fitness = diversity + dominion) and have several species live on the grid at the same time. Evolution all over again
very cool video, youre so underrated its a crime
Warping the grid would be cool, like how gravity works under relativity. The higher the value at a space, the smaller it shrinks, down to a minimum size. The scaling effect would have to warp its neighboring spaces on each simulation step to simulate a gravitational wave, which would propagate out in all directions, and cause the strength of the warping to drop off with distance. You could play around with all those parameters, as well as functions that determine the amount of shrinkage, and how the warping space effect spreads. The convolution would have to be scaled based on the size of the space I guess. And I also think that the convolution would have to be applied to the warped version of the grid, somehow, like via a projection onto the warped version of the grid.
As for how you'd warp time, if you wanted to make it even more relativistic, I'm not exactly sure, but it would be cool if that could be done as well.
Now I wonder what would be the behavior if we could quantum-entangle cells based on how much they interact (I know this is not how QE works, but redefining existing physical phenomena makes it more interesting)
You could achieve time-dilation by applying a convolutional expression of relativity. Using a sigmoid over the "uncapped" velocity of each cell provides a naïve approach, but why not use some numerical approximation of Einstein's field equations, applied as a further convolution over the input?
Let's consider our world as having arbitrary base units, analogous to SI base units for simplicity. We can let each cell be a 1 m^2 surface in our 2D gridworld, with energy equal to the value of the cell. You could even go wild and use another activation function, or a separate convolution over the input to compute said energy.
Each cell must therefore have a mass, and a (2D) density - we can choose the fundamental constants of reality in our model to be the same as real life, or we could choose a completely new set if we really felt like it with potentially wacky results. The equations we've derived that best describe the universe we inhabit don't require the constants to be any value in theory, we just found out what they are for OUR universe.
Let's treat "energy" as a measure of the kinetic energy of the particle; you could even separate out into two channels for representing energy and mass separately. We don't necessarily need to however, and we could just treat each cell as having a rest-mass of 1 unit. Taking this approach, let's extrapolate out our model into 3D.
Sounds weird for a grid, but the third dimension in this case is time. The "3D space to 4D spacetime" is what's known as a Minkowski space, so let's consider the 2D to 3D version as a similar enough thing, with a Euclidian (flat) geometry under the absence of curvature.
This brings us to the "bending" analogy, but with visualisations that are actually understandable to us - the lycra-sheet demo of bending 2D planes into 3D objects. Adding in a channel for rest-mass and taking a 3D convolution over both channels at once should be sufficient to represent the spatiotemporal interaction.
TL;DR - use a 3D grid with one layer for kinetic energy and the other for rest-mass, then use a rank-3 tensor as a kernel rather than a rank-2 tensor (matrix) to do a 3D convolution.
@@SirPlotsalot thanks so much for the thoroughly thought out reply. I'm a software engineer but that's beyond my current level of understanding. I'd love to make an app or something that lets you play around with gravity and such, all the parameters you were talking about. I think if more people got to play around with physics like that, more people would be into it.
@@R2Bl3nd i would definitely read up on deep learning stuff, it's so useful for this sort of understanding
@@SirPlotsalot yeah will try eventually. I'd have to try to keep it interesting though, I usually make some kind of game or dynamic simulation to accompany some concept I'm learning.
I can’t wait until you learn about modular synthesis!
i'm sure I'm not the only one who sees it, so eventually we're going to have violent video games where the characters health is gonna be based on this principle. walking around the scene like Westworld automatons.
If you set the centre weight for Conway to 0.5, then you can do a simple range test between 2.0 and 4.0. 3 neighbours is always less than 4, and 2 neigbbours + 0.5 is greater than 2. Then maybe subtract 3.0 from that and use 1 - abs() or whatever.
Probably best for modeling neurogenesis, and group neuronal differentiation in developing organisms.. of all kinds.
Wow. Just found settings which creates sierpinski triangle from a middle point!
this is a beautiful picture
Imagine a 3D version of the life engine
This is interesting, I got an idea. Maybe we can use some algorithm to generate random functions and use OpenCV routines to detect whether the CA reaches a stationary state after some time, so we can know what activation function and kernel lead to a pattern. I saw a talk on TH-cam about how DL can be used to discover physics equations, which can be useful, but I can't remember the name of that video.
The name of the talk is the next great scientific theory is hiding inside a neural network, for anyone interested
This is awesome - do you have any plans to develop say, a forum/site where we can share cool patterns we find?
Excellent video. Thank you
I coded almost the same thing (without UI) for editin images XD
Great video! Needs more views!
your videos are so good
I think i could program this qt my own computer in like 30 minutes.
Sounds like fun
Thank you for this interesting video
So string theory = matrix theory
The link to vizualiser gives permission error
Yes. Accurate interpretation!
Love your work
Hello! Very interesting. Can I get the link to the NCA simulation app? Thanks!
When i saw this video's thumbnail i thought of something way different.
"Strange, computational microverse"
great video and it is truly amazing how far Cellular Automata has went. Is there any communities around this stuff? Like subreddit or discord server that you are part of?
Nice! Is there a place to share interesting filter values that one finds?
didn't expect to find you here
5:44 *real value. ("Decimal" refers to one way to notate numbers, not the numbers themselves.)
Hey, enjoyed the video, thanks! On a technical note, the original paper did learn a function that generates the final pattern so the "neural" part makes sense, however, in your case it seems there is no learning and you are only applying a filter + activation function. Maybe "continuous" cellular automata is a better term than neural?
Is there a random number generator in the language used for activation functions?
I wanted to add some noise too the activation but couldn't find any rand() or random() function.
Really cool! Just sharing a few things I made here:
Conway's Game of Life, but generalized to floats
```
{"reset_type":"center","filter":{"0":1,"1":1,"2":1,"3":1,"4":10,"5":1,"6":1,"7":1,"8":1},"hor_sym":false,"ver_sym":false,"full_sym":false,"activation":"float activation(float x) {
\tif (mod(x,10.0)>=1.5&&mod(x,10.0)=3.0) {
\treturn x/10.0+1.0;
\t}
\t
\treturn x/10.0-1.0;
}","color":[1,0.1803921568627451,0.1803921568627451],"bg_color":"#000000","persistent":false,"skip_frames":false}
```
Interesting thing about this is that the pre-loaded game of life and I both used almost exactly the same approach? They made the more reasonable decision of using 9, and I used modulo to compress the code, and of course later made it into ranges instead of integers. Still interesting, though.
Watercolor paintbrush
```
{"reset_type":"random_bool","filter":{"0":0.10000000149011612,"1":0.3499999940395355,"2":0.10000000149011612,"3":0.3499999940395355,"4":-0.05000000074505806,"5":0.3499999940395355,"6":0.10000000149011612,"7":0.3499999940395355,"8":0.10000000149011612},"hor_sym":true,"ver_sym":true,"full_sym":true,"activation":"float activation(float x) {
\treturn x/1.75;
}\t\t","color":[1,1,1],"bg_color":"#000000","persistent":false,"skip_frames":false}
```
Tried to recreate some sort of watercolor paintbrush. Paint dissapates and expands for a little bit before settling into a stable state. If you need a brighter color, paint more over the same spot
Great, thank you very much!
great content!
Hi Emergent Garden I loved ur video! I am currently studying cs and cog sci in Canada and recently undertook a project where i tried to model a certain evolutionary behavior with a ca. This video is fascinating, where do you recommend I read up more on neural ca's, seems like a fascinating next project?
Great video 🎉
This is very interesting. Are there anyway to gain the value of the active cell in question in addition to the calculated kernel value?
That is, could an float activation(float x, float cell) {
return x*(cell^2);
}
Or some such be added?
I've thought about it! I may eventually add an option to expose that value, but for the moment you cant do it through the UI. If you don't want to wait for me the project is open source: github.com/MaxRobinsonTheGreat/webgl-convolution
@@EmergentGarden thank you. I do hope you will add it at some point, kernel 4 if I'm not mistaken?
But yea, already opened it & started to go over the code. Not a strong js wiz, but it seems doable :)
Or maybe it's just an indication that life isn't as complex as we assume. Hence why I'm not a fan of neural networks and AI, I'm convinced that one day soon we will produce something capable of suffering. And seeing how we already treat creatures capable of it today, we won't be kind to our creation.
6:25 looks like a good simulation of sand dunes
What tool did you use to visualise the convnet with the 9 drawing in 3D? Really intuitive visualisation.
would be nice to be able to change the simulation speed and the size of the mouse pointer to see what is happening if one breaks up structures
I wanna combine this with something like Deepdream by Google or better - new Gaugan by Nvidia. Of course everything generated in real time with the option of layers - that would be interesting to watch, especially on high :D
Wow, didn't know you were active.
awesome video :)
Ahh yes the spaghetti space monster very nice 🧐
I tried just inverting the gaussian activation function and didn't get the worms, but I did notice worm-like patterns in the noise, so based on my shader experience i tried putting a "hardness" exponent on the pre-inversion gaussian and that seems to be at least close to right
float activation(float x) {
float hardness = .6;
return 1. - pow(1./pow(2., (pow(x, 2.))),hardness);
}
You can adjust hardness a bit and still have something like worms, but 0.1 in either direction will result in collapse to black or expansion to the kind of screen filling pattern you get without the exponent. I don't think this is EXACTLY the function shown here but hey.
What do you mean "the filter is inverted from the panel"? You only show the filter with an outline, you're not showing what/where the reflection is and you're not even saying why it's intuitive or why the opposite would be unintuitive.
Why does this expand to the upper right? 4:19
When I calculate the upper right, I do get -.5 as a result.
And when I lay the grid over the pixel in the bottom left, I do get .3 as a result.
Can somebody PLS help me. I am really frustrated! Thx
The filter is actually inverted, meaning it's flipped over it's x and y axis, so the pattern is also inverted. This is usually how convolutions are implemented. Sorry, I should have made this more clear.
@@EmergentGarden Wow okay thanks a lot! You make great content. I am really enjoying it :)
Very cool! Has any work been done with adding additional convolution/activation layers?
Somehow, I feel like the ”worms” activation function should be implemented in unrelated AI projects in order to study its emergent properties.
Whether or not the convolution in ”worms” is a fluke might hold some sort of significance, don’t you think?
if i could programm with glsl thsi would be so cool, but i'm stuck at python level, i can get a basic understanding but i don't know how to properly use the operators etc, so if i write code it's very unoptimal (still some cool interactions i could get by trying to make a modulus filter to get positional info out of x, but that was with 5 if-statements in something i could've done in 2 python lines...)
Now add all the string theory rules and create the entire universe in the simulation.
very cool