9 ms·
Particle Life
- billytetrud 3y agoThis is fascinating. It's like a more complex game of life than John connoway's. It's crazy that little creatures seem to form at such small scales easily with these parameters. It's almost like the parameters of our real universe intentionally made it difficult to form life, rather than easy as some people seem to think.
- at_a_remove 3y agoThey are less creatures than molecules. Now, mind you, as some complex sets of rules approach steady state I can pretend they are far-flung stellar empires with colors ascribed to each type of system of government (and have). What is fooling you is the motion. This is sustained because the system has no conservation principles built in. You can make A-B pairs where B is attracted to A, A is repelled by B, and off they go, zoom. Were the meta-rules devised such that conservation of energy or momentum and such were baked in to whatever system you devised, you would see less exciting structures which would more resemble a late-stage pentamino explosion in the Game of Life. With a sufficiently large processor, I would like to see this in three dimensions and more options for force, such as dropping off as the inverse of r or r-cubed or even r * log(r), or some "repulsive at a distance, attractive at very close quarters" particles. I have a feeling that such a system would grind to a halt even with clever optimizations.
- billytetrud 3y agoAh that's interesting, I can see how that would result in a lot more dynamic behavior.
- dustingetz 3y agoneed analog computer for that :)
- noduerme 3y agoThis already does look like it has falloff... mutual attractors clearly seem more attracted to nearby particles than to larger groups further away.
- wetmore 3y agoI assume it falls off at inverse of r squared, which is why the person you're replying to is mentioning other functions besides that one.
- noduerme 3y agoI read them differently. >> I have a feeling that such a system would grind to a halt even with clever optimizations. I took this to mean that they thought there was no falloff calculated at all. If there is, I don't see why substituting a different function, e.g. cube vs square, would be significantly more CPU-intensive.
- at_a_remove 3y agoYou focused on just one clause. Consider the whole: 1) Three dimensions, not two. Therefore distance is not the square root of (delta-x * delta-x + delta-y * delta-y) but the cube root of (delta-x * delta-x + delta-y * delta-y + delta-z * delta-z). More operations. 2) Three dimensions, not two. As you start increasing the number of dimensions, the simulation feels more and more empty. One hundred particles on a line a thousand units long is crowded. One hundred particles on a grid of one thousand by one thousand feels like more "room" for that same number of particles. In a volume of a thousand by a thousand by a thousand, one hundred particles feels too few, and one would naturally increase the number of particles. Naively, which is to say without optimizations, the number of force computed grow as N-squared. More operations. 3) Cube falloff goes by r * r * r, rather than r * r. More operations, by fifty percent. And I did suggest some more exotic functions in there which certainly could be more daunting.
- mattashii 3y ago
- itishappy 3y ago> I would like to see this in three dimensions... Oh, there's one of those too! I don't see ways to change the falloff though, just the magnitude... https://hunar4321.github.io/particle-life/particle_life_3d.html https://hunar4321.github.io/particle-life/particle_life_3d.h...
- squigz 3y agoThere's no reason to believe life is particularly rare in the universe either, though.
- billytetrud 3y agoThere are, in fact, reasons to believe that. Nothing definitive of course. But the fact that we haven't been absorbed by a von neumann swarm or something like it places strict limits on the prevalence of life and/or what stages that life can achieve. One would either have to belive that intelligent life is vastly less likely than non-intelligent life, or that life itself is quite rare, or that life simply hasn't been around for much longer than life on earth.
- squigz 3y agoI don't see not being eaten by a swarm of machines as evidence of anything - but it is interesting to me that you'd qualify all this with "or what stages that life can achieve". So simple life could be extraordinarily commonplace, and considering the context of this post...
- billytetrud 3y agoIt is a fact that we haven't been eaten by a swarm of anything. Facts are evidence. If you don't understand that, I don't think we'll be having a productive or fun converstion. Sound more like you're interested in making innane snarky comments to fuel your own ego. Good luck with that.
- squigz 3y agoWould you like to actually address the point I made about simple life?
- billytetrud 3y agoIf you made a point about that, it was not clear to me. Perhaps you were implying that simple life could be very common even if intelligent life isn't. While yes, that is a possibility, that says nothing of its probability. Were that the circumstance, it leaves the question open as to why simple life would be common but intelligent life not common.
- hsnewman 3y agoThis shows how life is emergent from simple rules.
- downboots 3y agohow does it show it? what is meant by life? are rules necessary or just transitions? what enables rules at all?
- hyperific 3y agoPhysical and chemical properties of organic molecules give rise to emergent life-like structures/patterns. Molecules interacting via hydrogen bonding, solubility, hydrophobicity and hydrophilicity - repulsion and attraction - can produce protomembranes under the right conditions. In this demonstration, particles with certain rules can interact in such a way that self-organizing structures emerge.
- matt-attack 3y agoA general question by those that support ideas like Intelligent Design seem to focus on the notion of order from randomness. Specifically the natural intuition is that the vast amount of order associated with life could never arise on its own from just randomness. It's encouraging to be able to so quickly demonstrate that in fact order can emerge from chaos. Even if the organelles or molecules or whatever you might consider them in these simulations don't map specifically to organelles or molecules or cells in our world, the general concept is important to understand.
- downboots 3y agowhere do the rules come from? Is it randomness all the way down? how come they run at all? how can a lifeform in a dynamic mess of jiggling things have a claim to understanding?
- smusamashah 3y agoNone of these simulated systems show replication evolving out of random rules though.
- block_dagger 3y agoLife, uh, finds its particles.
- FpUser 3y agoReally liked it
- theophrastus 3y agoWell done: 3d is an option! Always wondered what emergent properties result from simple rules worlds when the dimensionality goes from 2d to 3d.
- jasonjmcghee 3y agoThis is a much more complete implementation, but I took a crack at this a while ago using compute shaders in Godot 4, if that's interesting to folks! https://github.com/jasonjmcghee/compute-shaders https://github.com/jasonjmcghee/compute-shaders
- beders 3y agoIt is amazing how easily self-sustaining structures emerge from such simple rules. Mesmerizing.
- Buttons840 3y agoIs there any "sustaining" in the simulation? Is death a possibility? If not, then there is no "sustaining".
- MagicMoonlight 3y agoThere was no death for the original life. Rotting is caused by living organisms. Being eaten is caused by living organisms. Disease is caused by living organisms. They could not die until death evolved. They could be physically destroyed but that’s not that likely.
- Buttons840 3y agoInteresting thought. But how could death evolve when death is a prerequisite for evolution? I suppose death is a "soft" prerequisite.
- spacecadet 3y agoSuper cool! Earlier this year I created a zero-player simulation using pygame and several AI coding assitants to see how capable they might be. In the end I had to clean up alot, but Im happy with how it turned out. https://github.com/derekburgess/simcraft https://github.com/derekburgess/simcraft
- bloopernova 3y agoofftopic: I got a new PC for xmas, and hadn't really stress tested it to make sure the fan management curve was correct. Running the linked site's demos made the fans work and they're really responsive. Cool stuff!
- dang 3y agoRelated: Particle Life Emerges from Simplicity - https://news.ycombinator.com/item?id=34156592 https://news.ycombinator.com/item?id=34156592 - Dec 2022 (1 comment) Particle Life Simulation - https://news.ycombinator.com/item?id=33680845 https://news.ycombinator.com/item?id=33680845 - Nov 2022 (1 comment) Particle Life - https://news.ycombinator.com/item?id=21875720 https://news.ycombinator.com/item?id=21875720 - Dec 2019 (7 comments)
- airesearcher 3y agoThis is so great!!! Nice work!
- pbowyer 3y agoThis is the most interesting one I generated: https://hunar4321.github.io/particle-life/particle_life.html#7447219393037 https://hunar4321.github.io/particle-life/particle_life.html... It eventually settles down to one large and unstable blob and another stable. Neither move so that's it. But before that it did what I had expected to see with objects meeting and merging
- thanhhaimai 3y agoTagging along: https://hunar4321.github.io/particle-life/particle_life.html#22158356003053 https://hunar4321.github.io/particle-life/particle_life.html... This one is really fun for me. It has a lot of actions and good shapes.
- scotty79 3y agoThis one is really dynamic: https://hunar4321.github.io/particle-life/particle_life.html#66203850674077 https://hunar4321.github.io/particle-life/particle_life.html...
- ygmelnikova 3y ago[dead]
- deadbabe 3y agoI’m not really understanding what the “life” part of this is.
- Buttons840 3y agoIndeed. If we described this as a "neat circular patterns simulator" would anything be lost? Is there reproduction? Is there evolution? Is there death? It appears not. Those are essential to life.
- emmanueloga_ 3y agoI suspect it is called life because some of the observed patterns looks a lil bit like something you would see while peering at a petri dish on a microscope (if you squint? :-). Perhaps it is implied that with the right rules you would be able to generate "the real thing".
- elwell 3y agoIt's an iteration on Conway's "Game of Life".
- superb-owl 3y agoI'd love to see this on a toroidal surface
- justinl33 3y agoa Mobius strip, even
- sockaddr 3y agoFascinating. This reminds me of nanopond
- chuckadams 3y agoLooking at the 3d js version right now. This might be my most favorite thing since the original Conway's life or maybe the old Primordial Life screen saver from the 90's. Have you considered adding shader support? I'd love to see a slowed-down more "blobby" version running full-screen. Probably turn my mac into a space heater too, but right now that's a bonus ;)
- emmanueloga_ 3y agoWhat are the philosophical implications of these life models? Is it implied that life as we know it may also have a simple set of rules like this that generated it? Or is it just a game? (as in Conway's GoL). Found some info here, seems like these are open questions [1]. -- 1: https://en.wikipedia.org/wiki/Artificial_life#Philosophy https://en.wikipedia.org/wiki/Artificial_life#Philosophy
- michae2 3y agoI never considered it before, but by comparison this makes me realize that Conway's Game of Life is wave-based rather than particle-based. That is, in CGoL the rules apply to locations of the grid rather than objects traveling across the grid. I wonder if this system could also be constructed in a wave-based fashion? Also, it seems like in this system the speed of light is infinite, since every particle acts on every other particle each frame, regardless of distance. In CGoL there is a speed of light, since cells can only influence their immediate neighbors each frame.
- brap 3y agoIf this doesn’t convince you spontaneous life is possible I don’t know what will
- utkarsh858 3y agoThis is not spontaneous, all the parameters have to be carefully tweaked to get some tangible stable complex structures. Also initial set of parameters are 20 which is not simple! Compared to that the complex structure is not much complex.
- shlomozippel 3y agoAnother similar implementation, including music responsiveness: https://vuzic.app/ https://vuzic.app/
- BirdbrainEng 3y agoIf anyone is more interested in this kind of stuff, then I can recommend checking out "Smooth-life" and "Lenia", the latter of which has a couple different, more complex variants... "Flow Lenia" or "Particle Lenia" come to mind in relation to this particular (pun intended) topic.
- ath92 3y agoThat's a funny coincidence, I recently made something similar: https://webgl-particle-life.netlify.app/ https://webgl-particle-life.netlify.app/ (source: https://github.com/ath92/particle-life https://github.com/ath92/particle-life) This version does everything in webgl shaders and keeps all state for the simulation in textures / uniforms. This allows it to simulate and draw more particles. Unfortunately it may not run on all devices because it uses some less supported webgl extensions.
- grumblehound 3y agoReminds me of Hiroki Sayama's Swarm Chemistry: https://www.youtube.com/watch?v=BpN-DE3o6u8 https://www.youtube.com/watch?v=BpN-DE3o6u8 https://bingdev.binghamton.edu/sayama/SwarmChemistry/ https://bingdev.binghamton.edu/sayama/SwarmChemistry/
- Lerc 3y agoI watched the Youtube video on this yesterday and have been itching to try a webgl shader implementation ever since.
- franky47 3y agoOne of my first coding projects at school was Conway's game of life, but I found the black and white a bit too boring so I pushed the assignment further by introducing RGB "genes", and give spawns a combination of their parents' colours (with random mutations). It's very fun watching which "faction" might take over the board. Demo: https://genetic-life.surge.sh/ https://genetic-life.surge.sh/ Source (ported from the original C++ into Rust/WASM): https://github.com/franky47/genetic-life https://github.com/franky47/genetic-life
- MagicMoonlight 3y agoEven with such a basic system you immediately start to get self-organising little bubbles of life. If something had a way to replicate in these bubbles, you would have the first cell.
- bezdomniy 3y agoI made a multithreaded Rust version of this (while learning Rust): https://github.com/bezdomniy/rust_particles https://github.com/bezdomniy/rust_particles you can run it with: cargo run --release No input yet, just randomly initialises params each run. But it runs with 4000 particles on my machine.
- smusamashah 3y agoThere is also https://exophysics.codeberg.page/ https://exophysics.codeberg.page/ which turns particles into moving creatures.
- utkarsh858 3y agoThe project is quite cool. I found myself tweaking for some good amount of time. But the thing is it does not demonstrate that complexity can come from simplicity. To make a 'life' there are 8 parameters to be modified across a range and 'fine tuned' to get some tangible stable complex structure, all to be done by already conscious beings ( Users anyone? ). So much for simplicity
- sgentle 3y agoI found a pretty fun set of rules: make a cycle of -0.4 between the colours (eg G->R, R->Y, Y->B, B->G in 3d or G->R, R->O, O->C, C->G in 2d) and set the other factors to 0.1. The particles form semi-stable rotating rings until they get too close to another ring. It's quite fascinating to watch. Messing with the viscosity changes the stability and radius of the rings
- jantypas2 3y agoVery cool -- shame I don't have a wall TV to just run it on. I was however, disappointed -- I saw it as a T-shirt brand "Particle Life" for physicists. The T-shirts would have slogans such as "After listening to you, I realize you're just an unfortunate jiggle in the quantum field, so I feel totally justified in ignoring everything you say"
- mfbx9da4 3y agoThe code walkthrough was excellent and very elegant
- aDeveloperCase 3y agoThat's impressive. I had a similar concept in mind when I started experimenting in 3D with what I now call "Altphy" (alternative physics), but I've not been able to really make it work as intended (really, is far from working). Also probably the logic and idea behind it too much for real time processing. I'm sharing it only because maybe pieces of that code (or the idea itself) can progress into something one day. source: https://github.com/aDeveloperCase/altphy https://github.com/aDeveloperCase/altphy
- LoryGilman 3y agoMixing up Conway's game with colorful 'genes' is pretty wild, like coding with a rainbow palette. And about those blobs – it's like they're putting on their own little drama show, then just decide to chill. Also, gotta love the action and cool shapes in that simulation. It's like a mini superhero movie, but with shapes instead of characters.
- swarmlover 3y agoInteresting, similar to these evolutionary swarm models https://www.youtube.com/watch?v=A3iRTIWrJn8 https://www.youtube.com/watch?v=A3iRTIWrJn8 https://www.youtube.com/watch?v=YEobkdbCrvQ https://www.youtube.com/watch?v=YEobkdbCrvQ