Lenia - Artificial Life from Algorithms

Sdílet
Vložit
  • čas přidán 5. 06. 2024
  • I quite like to mess about with systems called "Cellular Automata", so I wanted to share a Rust library I have been working on to simulate the Lenia system. And on the way, I also describe the steps it took to get to Lenia, as well as how the Conway's Game of Life, SmoothLife and Lenia cellular automata work in a quick way.
    I, unfortunately have misled you in the video just a tiny bit... Namely, Already the SmoothLife system of cellular automata technically introduced the "integration step"... indeed, it would be impossible to simulate some of the shown SmoothLife systems without the integration step part. Some would perhaps even say that SmoothLife is more powerful and more general and a more faithful generalization of Conway's Game of Life than Lenia. And, well, if we allow for all of the experimentation and little upgrades that people have made over time to SmoothLife, then it ends up not being dissimilar from Lenia in general indeed.
    This will most likely not be the last video about Lenia you will see from this channel, for I have some upgrades in mind for the Lenia system myself... ones that should allow Lenia to truly be the most general type of Life-Like system of cellular automata. As well as something that should make it more... "physics-like", shall we say. But when will I get to all that, only time will tell.
    =|Links|=
    lenia_ca crate github: github.com/BirdbrainEngineer/... - this one also has badly drawn images of the Lenia algorithms, which could make the algorithm more clear.
    lenia_ca crate documentation: docs.rs/lenia_ca/0.1.0/lenia_ca/
    Project code: github.com/BirdbrainEngineer/...
    Online Basic Lenia (not mine): chakazul.github.io/Lenia/Java...
    Lenia paper: arxiv.org/abs/1812.05433
    Expanded Lenia paper: arxiv.org/abs/2005.03742
    SmoothLife paper: arxiv.org/abs/1111.1567
    Asymptotic Lenia paper: direct.mit.edu/isal/proceedin...
    Flow Lenia paper: arxiv.org/abs/2212.07906 (Particle Lenia is based off this)
    Particle Lenia Blog: google-research.github.io/sel...
    Golly (program to simulate Life-like cellular automata): golly.sourceforge.net/
    Infinite Life in Life: oimo.io/works/life/
    Shadertoy SmoothLife simulation1: www.shadertoy.com/view/XtdSDn
    Shadertoy SmoothLife simulation2: www.shadertoy.com/view/XtVXzV
    =|Featured videos|=
    • Artificial Life uses M...
    • Asymptotic Lenia
    • Particle Lenia
    • The Incredible Story o...
    • Math's Fundamental Flaw
    • Coding Challenge #85: ...
    • Neat AI Does Conways A...
    • Neat AI Does Conways A...
    =|Music|=
    Creative Commons CC-BY
    744 Music - "untitled" (0.00 - 1.41 & 8.45 - 10.56)
    Ecco - Timeless Ocean:
    Fredrik Häthén - "Ecco the Dolphin - Medusa Bay" (1.40 - 2.57)
    Ruclefia - "Ecco The Tides of Time - Title Theme" (5.09 - 8.43 & 10.57 - 11.52)
    CZcams Audio Library:
    Wayne Jones - "Resolution" (2.58 - 5.07)
    Pixabay:
    Lexin_Music - "Interstellar Space" (11.58 - 13.15)
    =|Chapters|=
    0:00 - Conway's Game of Life
    1:39 - SmoothLife
    5:02 - Lenia
    7:26 - The Spectacle of Lenia
    8:42 - How Lenia works
    10:55 - Why make Cellular automata
    11:55 - Project code
    12:51 - Outro
  • Věda a technologie

Komentáře • 179

  • @BirdbrainEngineer
    @BirdbrainEngineer  Před rokem +64

    I hope you liked the video, make sure to discuss below, or if you have any ideas or questions about these cellular automata then comment away below! I read all comments that I receive :) And feel free to share the video around!
    Make sure to also check the description of the video for the links to all the code, papers and featured videos, as well as discussion on a few extra nuances on these cellular automata!
    Also don't worry, there will be mechanical engineering content in the future - I simply want to work on some of my other hobbies as well!

    • @zach4505
      @zach4505 Před 7 měsíci +1

      If someone were to ask me what a neural network looks like while it's being trained, I would say it looks something like this.

    • @centarian2559
      @centarian2559 Před 4 dny

      Is there anywhere I can download the program that runs multi-layered Lenia?
      I have a few ideas for interactions that I want to test out but I can't find anywhere I can download the programs.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 dny +1

      @@centarian2559 I am not sure if there is a simulation program that has Lenia capability built in yet. What I created in this video was a Rust crate/library called "lenia_ca" which, when set up correctly, would simulate the interactions. However, all the graphical display was something I just botched together and used the core library with. While both, the core library and my botched together graphical display are available as source code on GitHub (check the video description), as it stands right now, you'd need to manually insert all the parameters yourself in the code and compile the program (in release mode for better performance) and run it to see the result.
      I'm not sure if I'll be up for making a proper program with a gui for simulating Lenia at this time... maybe when I am travelling around US next year it'd be something fun to tinker at during the long rides.

  • @bluebunnexyt8289
    @bluebunnexyt8289 Před rokem +167

    truly a production quality video, gives me nature documentary vibes, and made the content readily understandable imo. very well done!!

    • @Skaffa
      @Skaffa Před 3 měsíci

      i was thinking the same

  • @simplifyitofficial
    @simplifyitofficial Před 5 měsíci +29

    This video gave me goosebumps about what a computer is capable of with a simple set of rules. I don't know why no one talks about it. You gave me a very big inspiration. Thank you

    • @dannyhefer6791
      @dannyhefer6791 Před 4 měsíci +1

      Imagine a simple set of rules and 15 billion years...
      I can't help but think about non-darwinian evolution and such, link all that to the origin of life, and wonder about... well, many things.

  • @Alayric
    @Alayric Před rokem +53

    Nice. I've been interested in Lenia for a few years but never really dug into it or made my own. I'm learning Rust and I intended to develop my own to practice, and saw yours is in Rust! 👍
    Kudos for crediting everything (borrowed videos and music) in the description, not everyone does that.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před rokem +11

      Have fun with Rust and the coding! If you want to make an efficient algorithm then make sure to use fast-fourier-transform based convolution ;)

  • @PunmasterSTP
    @PunmasterSTP Před 11 měsíci +35

    This was incredible! I've always been a fan of artificial life, though ultimately I haven't delved too deeply into it. This video was one of the best introductions to Conway's Game of Life and cellular automata in general, and I hope it gains a lot more exposure. Keep up the fantastic work!

  • @samuelthecamel
    @samuelthecamel Před 7 měsíci +10

    This is such an underrated video. It's super high quality, it explains everything you need to know from the basics, and it shows just how cool these simulations are!

  • @graydhd8688
    @graydhd8688 Před 7 měsíci +10

    Holy moly this is so amazing!!!! This was utterly fascinating, and the way you presented the math, with little footnotes saying what things are, I didn't tune out at the symbols lol- I actually was able to understand what they were! I wish 'complicated' math were presented that way more often. With footnotes of their use. I'm good with following logical operations, I just have no logical operations for the calc symbols in my noggin.

  • @ekkekrosing8454
    @ekkekrosing8454 Před 8 měsíci +8

    I used to be really interested in lenia and artificial life simulations.
    At that time there barelt was any videos about the topic
    This video is a godsend for anyone who is interested in Lenia, keep up the good work!

  • @qedas3495
    @qedas3495 Před rokem +8

    I'm very glad I stumbled on this video because CZcams is recommendeding everything related to Conway's game of life, your channel seems to be very interesting

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před rokem +2

      Thanks!

    • @PunmasterSTP
      @PunmasterSTP Před 11 měsíci +2

      I saw a video by @neatai6702 a while ago where he determined that Conway's Game of Life is a hugely popular search term, so there's definitely some consistent visibility.

  • @user-cp5xz4tg4e
    @user-cp5xz4tg4e Před 6 měsíci +3

    I think I went through my own mental computational evolution through this video. Even more reason to continue learnings more areas of math. My brain is exploding with ideas now thank you.

  • @PLeonTube
    @PLeonTube Před 7 měsíci +2

    Jajajah! You are the first programmer I see confessing you write spaghetti code! Kudos for your hard work. Beautiful contribution, indeed!

  • @TanvirOnYT
    @TanvirOnYT Před 2 měsíci

    This is one of the most beautiful thing I've ever seen in my life. And the most beautiful thing I've seen in this year so far.

  • @SnowmansApartment
    @SnowmansApartment Před 8 měsíci +6

    this is really cool. Wasn‘t aware there was much beyond the game of life. This makes me want to give this a try :)

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 8 měsíci +1

      It's certainly a nice programming exercise with a satisfying end result! I have also added Bert Chan's online version of "Basic Lenia" in the description.

  • @Briskbreeze256
    @Briskbreeze256 Před rokem +11

    This is gonna blow up I'm sure. This video is fantastic!!

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před rokem +2

      We shall see, CZcams seems to have absolutely nuked the impressions for this video some hours ago... never seen it be this extreme haha... We'll see, maybe the algorithm decides to pick it up again at some later date :P

    • @PunmasterSTP
      @PunmasterSTP Před 11 měsíci

      Yeah fr!

    • @LegendLength
      @LegendLength Před 8 měsíci

      @@BirdbrainEngineer It's a popular field in general (voxel manipulation). People seem to love videos about the topic when they can find them. Seems to be a real emerging field (i'm working on a 3d one).

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 8 měsíci

      @@LegendLength Well, usually you'd want to know how to manipulate the voxels; With Lenia and many other similar cellular automata, we are unable to predict what the end state after x+1 (+1 because the only step we *can* predict is the next step) steps is. Stephen Wolfram would even say that such systems are "computationally irreducible", meaning there exists no algorithm to predict the end state that can avoid simulating the system step-by-step. Maybe chaos theory can shine some light on the properties of cellular automata in the future. Or perhaps we are just wrong about computational irreducibility, that'd be exciting.

    • @LegendLength
      @LegendLength Před 8 měsíci

      @@BirdbrainEngineer Here i'll be using bit manipulation on the voxels. So it's similar to game of life in that it's just blind processing. But you get the advantage that a bitwise instruction is just one clock cycle. So comparably fast to image kernels etc..

  • @vyldim3401
    @vyldim3401 Před 3 měsíci +1

    History channel vfx after 12 AM:

  • @teacupanimates
    @teacupanimates Před 11 měsíci +1

    im happy to see a lenia video that isnt 2 years old! thank you!

  • @Thats_A_Dummy_Name
    @Thats_A_Dummy_Name Před 11 měsíci +2

    One more generalization would be truly mindbending: Rules which are itself spatial and allowed to be altered by other rules. This way evolution could truly take over. Rules can then dominate other rules and would dominate the population. Other rules which are less strong would die out.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 11 měsíci +1

      That's a nice idea... although quite difficult to implement, and the simulation would get a fair bit slower (as well as much more memory intensive)... dramatically so if we allow the kernels to change over time as well. In addition, at that point Lenia is like a single layer of a weird convolutional neural network haha.
      Currently the next generalization that will end up generalizing Lenia to the point where it is the superset of all life-like cellular automata, is to enable the growth functions to have any number of inputs, as opposed to just a single convolution's output.

    • @Thats_A_Dummy_Name
      @Thats_A_Dummy_Name Před 11 měsíci +1

      @@BirdbrainEngineer totally agree. The perspective to have rules which act as genes are worth all the troubles. 🤗

    • @PunmasterSTP
      @PunmasterSTP Před 11 měsíci

      Yes I had the exact same idea! I thought about simulations of chemical reactions where the individual reaction rules could "diffuse" across the grid, but I'm not sure how widely something like that has been implemented, or if it's been implemented in a cellular automata system.

  • @superjerkk
    @superjerkk Před 9 měsíci

    i watched all your videos, you;re doing really cool stuff!

  • @EnriquePage91
    @EnriquePage91 Před rokem +5

    I am super stoked to see this new video on my latest obsesion - Lenia. What I am not so happy about is the fact that I was planning on making my own video on the GLSL code I’ve been working on, and you’ve clearly beaten me to it… DARN!!! Hahaha anyway. Cheers. About to press play - can’t wait to see what you come up with and I’m sure we can both agree, Bert Chan is incredible. And so is Lenia.

    • @EnriquePage91
      @EnriquePage91 Před rokem +3

      What an incredible video - congratulations! I am so happy there is now more material on Lenia on CZcams thanks to you. Especially considering the super high quality of the editing.
      10/10 thanks for this 🙏🏼 I hope see more in the future !

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před rokem +4

      The code is written in pure Rust, it is completely CPU based, just quite heavily multi-threaded, compiled with optimizations for performance... and my cpu is a fairly beefy Ryzen 7 7700X. A GPU based solution will certainly be faster, so go for it! I was going to make a gpu based Lenia library some time in the future... maybe... I have some ideas I want to try out, and making a gpu based Lenia would certainly aid in that.

    • @PunmasterSTP
      @PunmasterSTP Před 11 měsíci +1

      I'd say you should still go for it. The more widely Lenia is ported and the more it gets shared on CZcams, the better!

  • @TonyTheTrain
    @TonyTheTrain Před 7 měsíci +1

    I've been familiar with game of life for a while now and it didn't really "hook" me. I see why its so cool. This video was great.
    Given input constraints and a feed back loop on the "rules" based on the outcome, this could become the basis for a type of nueral network.

  • @echtertill
    @echtertill Před 6 měsíci +1

    Totally underrated video... I LOVE it ❤

  • @vindi167
    @vindi167 Před 9 měsíci

    I have never heard of Lenia but now I'm REALLY interested.

  • @Kram1032
    @Kram1032 Před 12 dny

    I think Asymptotic Lenia is a great idea for making Lenia more real-life-plausible.
    There is another very nice variant, Flow-Lenia, which makes Lenia far more robust and also seems to me to at least partially tackle one problem Asymptotic Lenia has. It introduces mass conservation of sorts.
    I would love to see those two variants combined into one to see if something even more plausible emerges.
    If we managed to implement full mass conservation, it'd potentially become possible to literally simulate Lenia in a petridish with carefully balanced reagents.

  • @TheJunglist
    @TheJunglist Před rokem +2

    Loved this video, thank you!

  • @stefanguiton
    @stefanguiton Před rokem +2

    Excellent work

  • @puffdaslvmpy5519
    @puffdaslvmpy5519 Před 4 měsíci +2

    I'd like to see this simulation scaled up to a degree similar to the scale between single biological cells in the real world and large multicellular organisms or even small animals. I wonder what kind of larger more complex organisms this simulation could produce?

  • @isaacgoicovich5182
    @isaacgoicovich5182 Před 10 měsíci +1

    Incredible video!

  • @deathbyseatoast8854
    @deathbyseatoast8854 Před 11 měsíci

    a cool exercise in seeing emergant properties for sure.

  • @Edward-pw6zz
    @Edward-pw6zz Před rokem +3

    awesome video!

  • @bitnertinkers
    @bitnertinkers Před rokem +1

    Awesome really like your videos!!!

  • @desolatedsouls
    @desolatedsouls Před 7 měsíci

    2:03 That's it. The video is a masterpiece. Amazing progression!

  • @ericstorm4613
    @ericstorm4613 Před 7 měsíci

    Awesome video quality!

  • @Woltvint
    @Woltvint Před 3 měsíci +1

    Amazing video! I have to try some of these out for myself.

  • @ojcg_
    @ojcg_ Před 7 měsíci

    Gorgeous video.

  • @chrisjudge705
    @chrisjudge705 Před 8 měsíci

    GENIUS video, hyper many multi-dimensional thanks for this video. Best wishes from Berlin

  • @neithanm
    @neithanm Před 8 měsíci +2

    I wish we could simulate simplified versions of basic organics like aminoacids and... see something magical happen.

  • @haoranwang3408
    @haoranwang3408 Před 8 měsíci

    DOPE! SO interesting! "Smooth" makes them look alive!

  • @mr.duckie._.
    @mr.duckie._. Před 4 měsíci

    Lenia doesn't feel like life, it feels more like HORRORS BEYOND MY COMPREHENSION
    10/10

  • @knownas2017
    @knownas2017 Před 2 měsíci

    My guy's gonna program an entirely new universe.

  • @Olisha.S
    @Olisha.S Před 7 měsíci +1

    This blew my mind. I want to go program it now 😅

  • @zergosssss
    @zergosssss Před 6 měsíci

    amazing video, i don't often leave a comment, but your video did deserve one
    +1 sub

  • @noobyplayz2840
    @noobyplayz2840 Před 4 měsíci

    this is the third video in a row that started with conways game of life im gonna overload from information about it at this point

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 měsíci

      It's the most classic cellular automaton and understanding at a good level how Conway's Game of Life works is sort of needed to really understand the next steps taken and why they are a generalization of cellular automata, and how cellular automata are tied to continuous automata. Since this video attempts to give a basic understanding of these steps to arrive at a generalized cellular and/or continuous automaton like SmoothLife or Lenia, then it was necessary to include it. In the future, it will not be included, unless I decide to make a rework of this video or maybe one day a video talking about all of the different types of cellular and continuous automata and how they relate to one-another.

  • @taureanwooley
    @taureanwooley Před 6 měsíci

    An oscillating microscope using the equations was more intense in understanding the usage of the Conway game to explain something "!bigger!"

  • @MrCoillote
    @MrCoillote Před 9 měsíci

    this look so microorganic, diatom like ! beautifull !

  • @TimScarfe
    @TimScarfe Před 11 měsíci +1

    Nice video!

  • @Desslosh
    @Desslosh Před rokem +3

    Woah, great video. I specially like your voice and the way you narrate. You made it completely epic.

    • @Desslosh
      @Desslosh Před rokem +1

      I forgot to mention, I really like that you synced the movements and cuts with the music. That's great level of detail, and must have taken a lot of time.

    • @PunmasterSTP
      @PunmasterSTP Před 11 měsíci +1

      @@Desslosh Yeah, for how good the quality of this video is, it deserves many more views than it currently has.

  • @secretadmirateur5979
    @secretadmirateur5979 Před 8 měsíci

    Man it’s amazing!

  • @scally9341
    @scally9341 Před 3 měsíci

    A lot of these really look like quantum fields, atomic electron clouds, or even larger atomic structures and living cells. I have a feeling Lenia and related (potentially more advanced) methods will prove very useful in learning more about the natural world. How wild would it be to use machine learning or AI to iterate these systems and solve for specific problems inside this problem space? Imagine optimizing for traveling "organisms", or optimizing for the growth of one at the expense of another. So much possibility lies in the emergence created by such systems.

  • @cloudedarctrooperdtq3532
    @cloudedarctrooperdtq3532 Před 4 měsíci

    Particle lenia looks like what you might see under a microscope...
    That is... Incredible...

  • @FelixNielsen
    @FelixNielsen Před 3 měsíci

    I am certainly blown away by this, and that's saying so, but there is a problem, I think. Comparing Lenia to gAme of life, if a bit like comparing comparing an intergalactic space ship to a bicycle. They both fall into the category of transportation, but comparable they are not, not really.
    However, I've seen a number of advanced automatas and this is without a doubt the most impressive, in terms of the least complex in relation to the complexity of the result, apart from game of Life, naturally.
    I very much enjoyed the video, it was very well done and you've got yourself a new sub.

  • @GerardCalvo
    @GerardCalvo Před 6 měsíci

    Great video and the visuals are fantastic! What tools/libraries did you use to create the 3D visualizations (2D and 3D)? It really feels like a documentary!

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 6 měsíci

      The simulations were done with a simple visualizing program I wrote (can be found on my GitHub, link in the description... but it is pretty difficult to use, didn't mean it to be used by others really), and I simply recorded the output from the simulation with OBS. For the 3D examples I exported each frame as a collection of 2D slices saved as .png files, then used a python script in Blender to make it into an OpenVDB file, which I then immediately open again inside Blender. I then used volumetric shaders to give the simulations a bit of color/flair based on the values of the voxels and placed some lighting to get a satisfying representation of the simulations.

  • @itryen7632
    @itryen7632 Před 10 měsíci

    I was hoping that someone would make another video on this.

  • @BLoudermilk
    @BLoudermilk Před 11 měsíci +1

    Excellent video! Are you using manim? Your production quality is astounding

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 11 měsíci +1

      I did not use manim, as it would have meant learning the library and the last time i wrote any python was like 4 years ago. I did think about it though, and if i make videos that have mathy parts in it in the future, I may have to learn it.

  • @MisterQuacker
    @MisterQuacker Před 3 měsíci

    Great video good soul! Enjoy your day

  • @descriptionsuchandsuch4709
    @descriptionsuchandsuch4709 Před 3 měsíci

    Wow really great Video about such a cool topic.
    As your program is written in Rust, would it ne possible to use the gpu through wgpu somehow?

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 3 měsíci

      It's certainly possible to use the gpu to speed up the calculations a bit, but I have not figured it out yet... maybe I'll get to it this year, probably not, though, as this year's Cellular Automata video is going to be about advancing the field of study a bit/making a proposition.

  • @theuniversevoyager
    @theuniversevoyager Před 6 měsíci +1

    Giving continuous values to cells makes me wonder if the cellular automaton would also be useful for simulating quantum effects. Have you considered this?

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 6 měsíci

      I certainly was not the first one to wonder it back when I first thought about it... It should be possible to simulate certain kinds of wave functions, but I'm not sure it would be in any way "useful". Having said that, something I have wondered about regardless, is whether simulating wave-functions and interactions between them through cellular automata, we could learn/discover something... some process, some quality, some value which would have an analog in real quantum mechanics and hasn't been discovered just yet...

  • @echtertill
    @echtertill Před 6 měsíci

    Thanks to the YT Algorithm for showing me this

  • @TiagoTiagoT
    @TiagoTiagoT Před 9 měsíci +1

    Could the channels also be made continuous, a spectrum instead of a collection of channels? Would this change introduce any interesting possibilities?

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 9 měsíci

      I'm not sure what you mean by continuous channels?

    • @TiagoTiagoT
      @TiagoTiagoT Před 9 měsíci

      @@BirdbrainEngineer Just like how space and time were made continuous, make it spectral instead of RGB.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 9 měsíci +1

      @@TiagoTiagoT Well... first problem is how to assign source channel(s) for the convolutions? I can think of only 2 possibilities - you have only a single output channel (and a continuum of "convolution channels") or you have an output channels per convolution channel. You'd then need to make *all* of the parameters (with the exception of *dt*) free parameters. The kernel generation would probably have to be constrained to always be a radially symmetric kernel, that way you can define the look of a kernel based on a polynomial in range [0..1]. You are then able to set all of the channels continuously by providing the free parameters based on polynomials (probably defined in range [0..1] to match with the rest of inner-workings of Lenia).
      (If you yourself want to take on this project then I have some optimizations for this as well)
      So yes, in theory it is possible to make the channels continuous... the problem is that adding channels is relatively expensive in terms of computation. Eg. the single channel 3d Lenia examples run on my rather beefy pc at around 1 to 2fps (and that's with a field size of 100x100x100). This could be sped up somewhat by the use of a GPU, though GPU computing brings it's on strict problems. When making a 2d computable version of this smooth-channel-Lenia, each channel you end up generating to increase the channel gradient smoothness, is like an increase of resolution in the third dimension - actually a bit worse than that, even. So with current desktop computation power you can certainly say goodbye to real-time simulation of such a system, which would make finding potentially interesting sets of parameter polynomials a fairly time- and energy consuming ordeal.
      Maybe one day far in the future I would tackle this system... For now, the next Lenia system I tackle is going to be one which fixes causality in any continuous-time cellular automaton.

  • @olhoTron
    @olhoTron Před měsícem

    You did it in Rust eh... now I feel compelled to do it in glorious Go!

  • @finefreefine9994
    @finefreefine9994 Před 7 měsíci

    Smooth life with activation functions is so similar to a neural network. Seems like cellular automata supersede neutral networks, kinda makes sense to me.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci

      The Author of the Expanded Lenia paper points out that the cellular automata approaches that of a convolutional neural network. The big difference from neural networks is that there is no long-term memory(weights) in cellular automata, only the current activations, nor is there any bias. It would be possible to add both of those to make a (even) more generalized version of Lenia functionally equivalent to a single layer of a convolutional neural network. But I am not entirely sure about what would happen to these solitons. If the weights and biases were at first initialized to a single/similar value respectively at first, then the solitons would probably appear but get more unstable over-time as the weights and biases get updated - could think of this like leaving some sort of pheromone trails. If the weights and biases were initialized to random values at the start, then no solitons would probably exist, as the weights and biases would dominate the simulation and the averaging effect of a convolution operation would mean that the activations would be roughly the same everywhere.

  • @Sagitarria
    @Sagitarria Před 7 měsíci

    I love this. I am curious, though about if there’s anything similar that respects conservation of matter and energy.

    • @Sagitarria
      @Sagitarria Před 7 měsíci

      just found flow lenia and particle lenia both attempts at tracking

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci

      Yes, flow lenia, and particle lenia that is based off of flow lenia guarantee conservation of "mass" (or however much is possible with floating point errors anyways).

    • @Sagitarria
      @Sagitarria Před 7 měsíci

      well it's all very good in all of the forms. I'm doing my PhD on applying eMergy analysis to gis models of watersheds and have been looking for inspiration on pattern formation PDEs that are able to be consistent with eMergy accounting. there might be something here@@BirdbrainEngineer

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci

      Fascinating stuff!
      I'm not sure what kinds of patterns you require but some things to consider when using any kind of Lenia for soliton (when dealing with cellular automata we call any bounded and stable pattern a soliton) generation is that a single ruleset, meaning the shape of the kernel(s) & the activation function(s), usually generates only a handful of different looking solitons. Now, with Flow/Particle Lenia there's technically an infinite set of different looking solitons as you can just keep adding "mass" and it will end up with something that must necessarily look somewhat different from what was there before... but the overall structure and behaviour of the solitons would remain self-similar as far as I am aware. So, to get different looking solitons and variants of them, you'd need to seed plenty of different looking rulesets.
      Something to consider as well is that most variants of Lenia are computationally quite demanding, so it may or may not fit with your specific needs for an algorithm.

    • @Sagitarria
      @Sagitarria Před 7 měsíci

      i'd love to see a lit review with the core papers. I'll have to spend some time investigating. thank you.
      what I'm up to will probably not use Lenia specifically and instead just do convolutions of GIS data.
      @@BirdbrainEngineer

  • @rafakliber9147
    @rafakliber9147 Před 2 měsíci

    love the video. quick q tho: at 10:4 i am unsure why the sum goes over i. I get that you convolve a select channel j per each kernel k. Then you take the growth function of the result. for each Gk you multiply by a weight coefficient Wk. each weight belongs to one channel i tho, you do not sum over all weights, right? (also otherwise the indicies dont really work out)

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 2 měsíci

      I am not good with mathematical notation, and I do remember that while making the video I was not sure how exactly to really represent the whole algorithm, but I guess you might be right that the i does not belong under the sum there, as the result is for the i-th channel in the first place. My mind works much better with algorithmic way of thinking rather than with mathematical notation... I straight out get a headache every time I need to make sense of mathematical notation in papers for something haha.

  • @AlexandHuman
    @AlexandHuman Před 7 měsíci

    I believe it heard somewhere that there are people who think that all of the rules of physics came to be what they simply because it is what "survived" that is, at one point, all iterations of all the rules were thrown together in one big melting pot, metaphorically. What "survived" out of all of those interactions and such was we what understand to be physics, or science as a whole to put it broadly. What if you took a huge open Lenia field and did a similar thing? It would be hell to simulate, but if it works, one could find a set of rules that fit nicely together.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci

      Maybe you are thinking of constructor theory, which is somewhat adjacent to cellular automata.
      Humans have a tendency to explain the theory of everything based on the best knowledge available- and what is "trendy" at the time. My personal opinion on the matter is that whatever process conjures reality is infinite in complexity and while our models can describe reality better and better as new theories come along, it would never be the real theory of everything.

  • @JacobNax
    @JacobNax Před 6 měsíci

    It's fine that its spaghetti. It's a concept after all that looks very promising. I wonder what can be achieved with "Fine Tuning".
    I would also try to go the data oriented way to make it even faster for cpu to read millions of cells very fast by utilizing the cpu cache when you are making deterministic reads every time step.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 6 měsíci

      The algorithm uses FFT to calculate the convolution over the whole field at once. I also used the multi-threaded version of the FFT function provided by the library. The growth function is then applied by a multi-threaded iterator iirc, and considering these libraries are the go-to libraries to use in rust for these purposes, then I would imagine cache locality has been thought about in the implementations of the libraries. The best way to make it faster is to use a GPU, which would probably give an order of magnitude improvement in the speed.

  • @AKiwiBird
    @AKiwiBird Před 4 měsíci

    There should be a full spectrum of different kernels there can be, and somehow new ones can be added by the simulation

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 měsíci +1

      Changing a kernel of a channel globally is technically not too difficult, it would simply mean that the simulation would run 2x slower due to having to re-run the FFT on the kernel as well.
      Making kernels local (so different parts of a single channel could have different kernels) is computationally extremely expensive, as using FFT based convolution would no longer be the effective route, and you'd have to use the plain old multiplying and adding kind of convolution on each pixel. The memory complexity would also increase a fair bit then, as you'd most certainly have to store the kernel at a given pixel position as a set of parameters instead, so at least a 4x increase in memory usage.
      Adding channels on runtime is possible (though computationally gets demanding once you start to have dozens of channels), but for it to be "interesting" you'd need to also figure out in what way the new channel's activation function is generated, how to update the weights of the other channels and so on... So, while technically not impossible, it's kinda hard and computationally demanding.

    • @AKiwiBird
      @AKiwiBird Před 4 měsíci

      @@BirdbrainEngineer Oh that's too bad. (damn you really do read every comment)

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 měsíci

      There are not that many comments coming in (yet, anyways), so I can keep up haha.

  • @Atomchild
    @Atomchild Před 8 měsíci

    This needs to be sonified.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 8 měsíci

      I guess something could be done based on the fourier transforms of the different channels but I'd wager most of the time it wouldn't sound all that good.

  • @academyofuselessideas
    @academyofuselessideas Před 6 měsíci

    pretty cool... though, i wouldn't call this system cellular automatas anymore since they are not too discrete (although, one could argue that anything written in a computer is discrete)... One can think of this systems as different universes with the rules of physics given by the update rules. Under that light, I wonder if one can come up with some sort of measure of "life". For example, one could measure some sort of entropy of the states of the system, and define life as those entities that delay the reduction of entropy... it would be interesting if one come up with some measure like that.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 6 měsíci +1

      Lenia is a type of continuous automaton. While the "Continuous Lenia" system itself is technically not a "cellular automaton" due to its fundamentally continuous space-time and definition by differential equations, the way we simulate Lenia is by using "Discrete Lenia", which most certainly is a cellular automaton. The two systems are never quite equal to one-another but can become arbitrarily similar. These differences do actually manifest themselves to an observable degree, especially when pushing the timestep of the Discrete Lenia to be extremely small. I believe already at *dt=0.0001*, the hallmark Lenia glider(_Orbium unicaudatus_) ceases to be stable over long periods of time in the most basic Lenia instance.
      As for measuring entropy and other values, it's one way to detect whether the simulation has entered a steady-state. Usually we'd simply use the total "mass" of the simulation as opposed to entropy but one could use entropy too. So, if the total mass/entropy has ceased to increase/decrease, or if it has a periodic oscillation, then it means the simulation has entered a steady state. These steady states can be one of three outcomes - The values have died out and you only have "nothingness". The pattern has "exploded" and filled the whole space. A soliton has appeared. The latter of which of course is the most interesting event usually.
      If it will ever be proven that Lenia is Turing complete, then there's also the possibility that the mass/entropy never settles and remains chaotic (halting problem). Of course, in bounded space (like how we simulate these things), there can never be endlessly chaotic systems, they would eventually settle(either as a a proper steady-state or a loop over time), but it could take longer than the lifetime of the universe to get there :P

    • @academyofuselessideas
      @academyofuselessideas Před 6 měsíci

      @@BirdbrainEngineer Thank you so much for your detailed answer... all this is very thought provoking! 🤯

  • @user-tr4oz9cj6p
    @user-tr4oz9cj6p Před 5 měsíci +2

    Why gliders look similar to Ptychopariida

  • @whatitmeans
    @whatitmeans Před 6 měsíci

    nice video, hope you could extend it further on why the shapes resembles the color patterns shown by cuttlefish, and also, Are you aware of this paper?: "Emergent Bioanalogous Properties of Blockchain-based Distributed Systems", Oleg Abramov et al. Orig Life Evol Biosph. 2021 Jun.... I think it deserves his own video, the conclusions give me shivers.

  • @josesantos2603
    @josesantos2603 Před 7 měsíci

    Could you make a video about 4d, 5d Lenia?

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci +3

      It's quite literally simply a generalization of dimensions. Which is to say that the dimensionality of the field and the kernel does not matter, as long as they match. The reason why there aren't that many 3d or higher dimensional Lenia simulations done is because it is computationally very demanding. Firstly, for example the 3d variant ran at basically 1fps on a 100x100x100 field... that's a small field size and already it is rather difficult to compute. Of course using a gpu for the computation would speed it up by a factor of 10 perhaps. (granted you have a solid gpu).
      In addition, storing the field (and kernels if you use FFT based convolution like one should) starts to take up an immense amount of memory. I store each pixel as a 64bit floating point number... technically it would be just about good enough to use a 32bit floating point number, so lets assume that. Say we have a 5d field with a very modest 200 pixels for each side, that'd be 200^5=320.000.000.000 total pixels. Multiply that by 4 to get the number of bytes we need to store and we get that simply a single channel of the field takes up 1.28 terabytes of data! This does mean that as it stands right now, simulating 5d Lenia is basically only possible with a supercomputer.
      In addition, it becomes more and more difficult to find stable patterns at higher dimensions. Reason being, there's just so many more degrees of freedom that things tend to either only die out or immediately become chaotic.

  • @the_linguist_ll
    @the_linguist_ll Před 4 měsíci

    Can Lenia run doom?
    (Jokes aside, used this a couple of years ago, and loved it)

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 měsíci

      That's actually a very interesting question, because it comes down to asking whether Lenia is "Turing complete" or not. So far nobody has proven either way, but if it is... then yes, there's some way to set up a Lenia simulation to produce the possibility to play Doom haha.

  • @quarticle5762
    @quarticle5762 Před rokem +1

    very nice! the mechanism kind of reminds of neural networks

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před rokem +2

      They are similar indeed, but the way the operations are actually applied end up being the difference.

  • @zacland
    @zacland Před 4 měsíci

  • @Jediluvs2kill
    @Jediluvs2kill Před 9 měsíci

    Kernerls of accoustic vibrations from ohm like shapes from salt with on speaker

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 9 měsíci

      Do you mean standing sound waves as demonstrated here? czcams.com/video/wvJAgrUBF4w/video.html

  • @keroloswasseforjustkero4680
    @keroloswasseforjustkero4680 Před 8 měsíci

    "We get this" viewers get a shock❤

  • @Jediluvs2kill
    @Jediluvs2kill Před 9 měsíci

    Mygod have we docoded life?

  • @tom-on
    @tom-on Před 7 měsíci +2

    so when does this become sentient

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 7 měsíci +1

      Who knows, first we need to agree on a rigorous definition of sentient, which, as you can imagine, is a difficult and unsolved problem.

    • @flameofthephoenix8395
      @flameofthephoenix8395 Před 7 měsíci

      Likely once it starts benefiting humans.

  • @Valgween
    @Valgween Před 3 měsíci

    pretty cool but is it possible to build a computer in Lenia that runs Doom.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 2 měsíci

      Someone already asked that some weeks ago haha... The answer is... Both! A certain Lenia ruleset can simulate Conway's game of life, which is Turing complete, therefore in that case Lenia itself is also Turing complete and could compute anything that could ever be computed, including Doom.
      At the same time, there are some rulesets that are trivially not Turing complete (eg. The ruleset that would simply simulate diffusion/blurring).
      For any given ruleset, there is no known way to easily tell whether the ruleset is Turing complete or not. If somebody could figure it out, it'd be extremely big news and very useful outside of the field of cellular- and continuous automata as well.

    • @Valgween
      @Valgween Před 2 měsíci

      thanks didn't expect a serious answer for my not so serious comment.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 2 měsíci

      @@Valgween Haha, sorry, this kind of computer science is something I just have to nerd out over. And it's not every day you get to let someone know of a frontier of humanity's knowledge that is tied to one of your interests! :D

  • @bonk747klm
    @bonk747klm Před 11 měsíci

    pls tell me where can i play lenia

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 10 měsíci +2

      Since Lenia is mostly used as a topic of research for certain fields of study, then usually it is expected that one will construct their own, either by building it from ground up or compiling/running source code available on GitHub (there are a few repositories to choose from). As far as I am aware, there are no programs or web-pages that have implemented a comprehensive Lenia simulator.
      That being said, here's a javascript version, which simulates a rather small sized channel and only has some pre-determined kernels and rules. It is also only the "Standard Lenia" system, not the expanded one. chakazul.github.io/Lenia/JavaScript/Lenia.html
      There are also a few Shadertoy examples made, with a couple different variants in each one (requires changing a number in the shader code on the site), for example www.shadertoy.com/view/7lsGDr

  • @privateprivate1865
    @privateprivate1865 Před 4 měsíci

    What about Is life with consciousness/ self awareness

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 4 měsíci

      Well, what even is consciousness and self awareness? If we quantify what we mean by those concepts and draw a line between what is conscious and self aware and what is not, then we would be able to say whether Lenia creates conscious and/or self aware entities. Of course, the answer is that we would probably not consider these solitons conscious nor self aware just like we don't call a single molecule or elementary particle conscious nor self aware.

  • @danthiel8623
    @danthiel8623 Před 2 měsíci

    interesting

  • @guguxz
    @guguxz Před 5 měsíci

    Which area of ​​mathematics studies these things?

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 5 měsíci

      Conway's Game of Life is very much tied to "Automaton theory". And while continuous automata share some characteristics with discrete automata, I don't think there is a formal field of study for continuous automata (may it be simply continuous space, continuous time, continuous space-time or any other more complex automata). I suppose since the truly continuous versions of some continuous automata can be described as differential equations, then mathematical analysis also comes to mind.

    • @TypicalPythonCoder
      @TypicalPythonCoder Před 3 měsíci

      I think it's the game theory

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 3 měsíci

      @@TypicalPythonCoder Game theory would have something to say about it if the "resources" were limited (eg. maybe game theory has some insights into how flow- and particle Lenia work), but generally I don't think that things learned from game theory can be applied well to understanding the dynamics of cellular automata like Lenia.

  • @um_idkw
    @um_idkw Před 8 dny

    this video is almost a year old ^^

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 8 dny

      Yeah... life is too busy to make videos unfortunately :/ I'll probably make another cellular -continuous- space-time automata video this year though... but after summer

  • @Khiladi_99
    @Khiladi_99 Před rokem +1

    Here before 1K views!

  • @obrabinhodasquebradinhas6740

    I'm brrazilian and can understand your english, very good my friend! For too see, my english is a big shit kakakakakakakakakaka, but you are turn on?! I'm going trying for everkkkkkkkk tk🇧🇷🇧🇷❤❤

  • @Neptune185
    @Neptune185 Před 14 dny

    Where do you code in?

  • @stuart6478
    @stuart6478 Před 6 měsíci

    wow. and all it needs is for you to turn on the computer and attach it to a monitor so it can be viewed is pseudo 2d.

  • @cyanuranus6456
    @cyanuranus6456 Před 11 dny

    More Digital Organisms

  • @demogorgon4244
    @demogorgon4244 Před 8 měsíci

    so i guess life = winamp visualization now.

    • @BirdbrainEngineer
      @BirdbrainEngineer  Před 8 měsíci

      Lol, winamp visualizations are much more rudimentary and can not produce a soliton of course... but some people have said that these would make for a nice visualizer for music... I'm just not entirely sure how one would interface it to a steady stream of 1d data :D

  • @qondonyon
    @qondonyon Před měsícem

    8:17 my eyes when i rub them

  • @bobhardcore6707
    @bobhardcore6707 Před 3 měsíci

    sinus - cosinus > sin

  • @keeentmoder
    @keeentmoder Před 6 měsíci

    эпелепсики привет

  • @amv240
    @amv240 Před 4 měsíci

    Yo. W. T. F. ! ! ! 😮😮😮😮😮

  • @matiaspolanco7517
    @matiaspolanco7517 Před 5 měsíci

    saquense un colab xd

  • @streetos
    @streetos Před 18 dny +4

    Please mix your music lower, it's way too loud compared to your voice

  • @KWifler
    @KWifler Před 8 měsíci

    Make it for Android and iOS.

  • @question_mark
    @question_mark Před 4 měsíci

    i'm not sure if you need to calm down 💀

  • @claudiamanta1943
    @claudiamanta1943 Před 6 měsíci

    😂 No. You have a very weird idea about what life/ being alive means. I’ll give you a hint- it’s not movement.

    • @KanonenBengan
      @KanonenBengan Před 6 měsíci

      Movement is one of them.

    • @claudiamanta1943
      @claudiamanta1943 Před 6 měsíci

      @@KanonenBengan Not really. Somebody who has total locked-in syndrome or catatonic schizophrenia is alive.

    • @KanonenBengan
      @KanonenBengan Před 6 měsíci

      @@claudiamanta1943 blood circulation is a moving thing.

    • @claudiamanta1943
      @claudiamanta1943 Před 6 měsíci

      @@KanonenBengan you tryin’ to be clever now or have you genuinely lost all common sense?

    • @KanonenBengan
      @KanonenBengan Před 6 měsíci

      @@claudiamanta1943 internal movement doesn't count?

  • @milune777
    @milune777 Před 5 měsíci

    Great video!