The example at the end with the spread out yellow reminds me more of a fungus that spreads out. I would have liked to see the connecting lines in that one. The network of yellow feeding the main bodies. The explosion helps to spread out a new network when first created. Very interesting emergent behavior.
@programmingchaos8957 Жыл бұрын
That's a great analogy. Other people have likened it to filter feeders. I skipped the connecting lines because they are just a mess. In part because the 'main body' can also be spread all over. I hate to restrict what evolution can do, but I'm thinking some rules so particles that are too spread out get detached and die might be necessary to create more comprehensible results.
@madcio Жыл бұрын
Biggest problem for this simulation is that organism actually needs only yellow cells. Rest is uneeded (at most, they help spread yellow cells around, but it is not like you need bunch of colors to do that). I think you need to give other colors some other vital functions, as discussed at end of video. Though I kinda like this world, where cohesion is not neccesarily needed. You can spread out and be fine. Maybe some settable option where program kills cell if it is too far away and too long away from rest? It would be interesting to see if same behavior evolves (yellow cells spread out, but not too far away since it kills them). I feel allowing some time (instead of killing it instantly) before cell dies could change some things in interesting way. I think energetic cost of creating new offspring and living in general should scale with number of particles (you could also have different cost for each color etc). In this case we can allow organism to create as much particles as it's genome wants - it will simply die if it cannot cover energy cost of existence. Note we need to remember "ideal" organism for offspring creation, as actual organism might lost some cells during its life, and unless we want to model Lamarckian kind of evolution, that should not impact offspring. Another idea is allowing particular cells create other cells during life (obviously paying energy cost for it), depending on what genome says about it. That would allow more natural reproduction and growth. That one seems to be major undertaking, as it is hard to save that kind of data in way that would be evolvabe. Some guy made multicelluar "trees" that could point to solution: kzbin.info/www/bejne/f32UeaKdhNpoeJI
@programmingchaos8957 Жыл бұрын
Great comments! You're right that only the yellow 'mouth' cells are needed for the solution where they spread out. In other evolutionary runs they maintain cohesion and move around sweeping up food, for those cases two colors are necessary (I'm pretty sure) to create motion. But the rest are unnecessary. It would be an interesting experiment to see if having more colors makes evolution easier even though its not strictly necessary. It wouldn't surprise me if the extra colors somehow help the evolutionary process along (or possibly the opposite and slow it down). I've started to play with adding more capabilities, energy storage particles, attack/defend particles, herbivore/carnivore particles. And some of the rules you suggest, if particles get too far apart they die (slowly to give them time to come back). And particles that die remain as 'food'. Getting a good initial balance is hard, especially because Processing is relatively slow, so you have to be careful to avoid population explosions. (A common one I ran into was initially poorly fit individuals die and get replaced until an effective scavenger comes along and it's population blossoms due to all of the dead individuals and the simulation grinds to a halt.) I really like the idea that organisms reproduce by budding a small subset of cells that have to collect enough food to add new cells until they are full size and can bud as well. Thanks for the link to the trees video, I have watched a few of them, but haven't gotten to all of them yet. As always, too many ideas, not enough time. :)
@prietjepruck Жыл бұрын
Hi Terry, What a great Idea this is. By now I've tried every way to optimise the code of your last tutorial and was looking for a new challenge and boy did you deliver. These challenges really stimulate me to hone mi skills. Organic life that emerges from simple rules keeps fascinating me. Thanks a lot. I can't wait for your next tutorial. Greetings from the Netherlands.
@programmingchaos8957 Жыл бұрын
Fantastic! There is a slightly overwhelming number of things to try. I'm tempted to rewrite it all in C++ so I can experiment on our University's cluster computer - running lots of variations at once - but haven't figured out how to observe the outcomes easily in that environment with dozens of runs at once.
@SteveTaylorNZ Жыл бұрын
Keen to see what optimisations you have implemented and how?
@prietjepruck Жыл бұрын
I divide the field into grids the size of the interaction radius. In each cell I check every particle with the particles of the cell itself and it's 8 neighbours. First I check all the cells exept for the borders. Thus I don't have to check for interaction with cells arround the corner. Then I check the borders without the corners and then the corners. Each colom of the grid without the borders runs on one thread. Each border runs on one thread and the 4 corners run on one thread. On a ryzen 9 with 32 threads it has about 40 FPS with 20_000 particles. If you are interested in the code just let me know. Cheers, Adriaan.
@programmingchaos8957 Жыл бұрын
If I understand correctly, because the max interaction distance is known you can divide the worlds into cells of that size and only have to look at neighboring cells 'one away'. Very clever. It should allow for much larger populations. Having evolvable interaction ranges makes it trickier. But I could either put a hard max on the evolved range, which is not unreasonable. Or keep track of the current evolved max of any of the particles and use a value a bit larger than that to minimize how often the cell size needs to be changed. Thanks for the suggestion.
@LogicEu Жыл бұрын
This is incredible
@programmingchaos8957 Жыл бұрын
Thank you! I thought it was pretty cool. I'm hoping that someone (or me if I can find the time) will make some more complex rules - red particles, can eat green particles, blue particles store energy, orange particles defend against red particles - that sort of thing and see what evolves.
@reviraemusic11 ай бұрын
I had this "same idea" a couple of days after playing with Particle Life. Although I had no idea on how to execute it so I ended up studying another great project called BioSim. Thanks for helping us navigate these ideas.
@programmingchaos895711 ай бұрын
There's a lot of different ways to make interesting evolutionary versions, mine was just a very simple one - and even it led to some interesting results that I wouldn't have expected. One thing that surprised me, but made sense in retrospect was the need to also evolve the particle starting positions. I'll have to take another look at BioSim, thanks for pointing it out. If you come up with interesting version of Particle Life I'd be interested to hear about them.
@bruno56017 ай бұрын
I spent so many time watching those game of life videos and it seems to me pretty straight-forward: - Create a set of rules - Create a space which those rules to be applied - Watch emergent behavior (or system collapse) begin It means that, with the right set of rules you might emulate particle systems or anything else, but you will probably see emergent behavior. The main issue to me is that you have to face issues such as limited space where the simulation may live and processing time to actually delivers the evolution of the systems. And it also makes sense to me that this not just a computational limitation, emergent behaviors and increase of system complexity also means that the system contains, process and generate more information. Basically the more complex the system behavior, more computational resources it will take. Now I will wonder, what would it look running such systems on FPGA, enabling systems like this to even deliver some real-time properties. Maybe even adding some rules that are driven by external environment (like sources in simulation from sensors outside it or drains for outputs).
@programmingchaos89577 ай бұрын
In some ways they are straight-forward. But I wouldn't say that you will probably see emergent behavior. There are a lot of rules/spaces that don't lead to interesting behaviors and, making it even more difficult, even for rules/spaces that do lead to interesting behaviors its probably only for specific parameters and even starting conditions. So, it can take a lot of 'searching' to find something that leads to interesting emergent behavior. Interestingly, in many cases complex, emergent behavior doesn't make the processing time any worse. If you are updating every particle or every cell the number of particles or cells matters, not what they are doing. Unless you have clever optimization that identifies and ignores 'static' regions. But you are definitely correct that processing power/memory can be a limitation for many of these systems. 10 particles won't do anything very interesting. 1000 particles are interesting, but it's entirely possible that 100,000,000 particles would create emergent behaviors that you can't see or predict with only 1000 particles. An FPGA would be an interesting way to tackle this. Or programming it to run on a GPU, which is pretty simple for cell based systems like Conway's game of life, but trickier for particle based systems like this.
@bruno56016 ай бұрын
@@programmingchaos8957 I guess you could mimic some particle behavior with different set of cell state. One could get use of different cell states that could propagate waves, create stable states within a set or a moving set of states that can be a representation of a particle. You understand that you are completely accurate that there is an infinite amount of different parameters, set of rules and initial conditions that might would create unremarkable results, but it would be just astonishing running some in a bigger space, in higher rate and letting them evolve information on an unconventional system. Ultimately figuring out what a system like that could generate for a emergent behavior in case you just give it some tuned interaction to outside the simulation.
@programmingchaos89576 ай бұрын
Different cell states is a great idea. In the 2D version I developed an evolutionary model where sets of cells represent an 'organism'. Then the sets can evolve their own rules to create emergent behaviors (video is on the channel). You're right that it would be very interesting to see a much bigger simulation.
@ie23046 ай бұрын
This is incredibly cool! It would be interesting to see if this could be adapted to do abiogenesis, a big draw of the original Particle Life.
@programmingchaos89576 ай бұрын
I'm glad you liked it! I'm curious how you would set up a model to do abiogenesis using this evolutionary approach. Also, if you're interested I'm about to post a 3D version of the same type of evolutionary particle life model.
@MetehanCebeci-l6d Жыл бұрын
Gonna save this video to watch later when I have more time. I just discovered your channel and based on the titles/thumbnails I think I'm really going to enjoy your videos. Please keep it up
@programmingchaos8957 Жыл бұрын
Thanks! I hope you enjoy them.
@RupertBruce9 ай бұрын
For the cell division, it might be helpful to have a cell boundary or skin. When the cell splits into two and if the boundary has a 'charge' type force applied externally (like poles repel), the clone would automatically be repelled
@programmingchaos89579 ай бұрын
Nice idea! If the 'skin' had (evolvable) elasticity it would also create more constrained 'organisms'. I wonder if there's a way to combine it with differential growth which includes attractive forces between neighboring 'surface' particles.
@RupertBruce9 ай бұрын
@@programmingchaos8957 if the skin cells have an energy cost, if the collective wants a bigger skin or extra features added to the skin then the collective has to work harder to find more energy
@programmingchaos89579 ай бұрын
I like the idea, although I wonder if it's moving away from the particle idea, where any type of particle can be on the 'outside', to a completely new system. Skin life(?) where the size, shape, and features of the skin evolves.
@themekahippie991 Жыл бұрын
Yo, I love Processing! It was my first intro to programming any sort of graphics or games back in high school, and how I learned some Java without realizing it. Definitely gonna have to mess around with this. By the way, have you considered parallelizing individual worlds to make them massive? The short range of all your forces seems ideal for that, and it could give enough space for different biomes.
@programmingchaos8957 Жыл бұрын
Processing is a ton of fun. If you're interested there's quite a few other Processing projects on the channel. But I'm always looking for new ones, were there any projects that particularly inspired you when you were starting out? Parallelization is a great idea. I have been thinking about it for our cluster computer - and moving everything to C++ for speed. Harder to visualize then, but it could be worth it to see what evolved. Thanks for the suggestion.
@antiprime466511 ай бұрын
@@programmingchaos8957I used to use processing for stuff like this but I love running more complex entities and having a much larger number of them so I used sdl and opengl to setup some stuff and now I can use multithreading or compute shaders to speed things up massively. Was a ton of work but def worth it.
@BeautyInMath4 ай бұрын
After watching this video and doing a little search in the web, I found out about the Particle Lenia and the energy-based formulation, which seems to be related to this topic. I have a lot to catch up :P
@programmingchaos89574 ай бұрын
I also have to catch up on Particle Lena. If you find any particularly good resources feel free to pass them along.
@BeautyInMath4 ай бұрын
@@programmingchaos8957 Found a couple. 1. Particle Lenia and the energy-based formulation website by Alexander Mordvintsev, Eyvind Niklasson and Ettore Randazzo. 2. Lenia website by Bert Chan. Again, I can't share links here, but you can find easily. Cheers! :)
@nembobuldrini10 ай бұрын
This is extremely interesting and very well explained! Keep up the good work!!
@programmingchaos895710 ай бұрын
I'm very glad you found it clear and helpful. There's lot's of other videos in the channel - please enjoy.
@oystercatcher9437 ай бұрын
This is incredible. I’ve always been interested in simulations like this and this seems especially able to generate complexity from simple well designed rules. I’m experimenting right now with a GPU simulation of life inspired by the alien-project but that’s a world away from what I can implement or run on my computer. I will take on board some of your excellent ideas. I think to encourage larger groupings some selection pressure to be able to survive but shrink when food was scarce but would kill off very small organisms would be an interesting experiment
@programmingchaos89577 ай бұрын
Thank you! I'd be very interested in hearing how you experiments turn out. I've been trying rules where there are distinct attack and defend particles. But I like your idea the size (# of particles) of the organism defines the winner. With some other rules that smaller organisms can reproduce using less energy. I've often seen 'fruit flies' evolve, tiny organisms that can reproduce with very little energy/food, which would encourage the evolution of larger predators. Nice idea!
@SplashT9 ай бұрын
its so cool and will be compiled to screensaver with some parameters/settings 🤩🥰
@programmingchaos89579 ай бұрын
A screensaver is a fantastic idea! Although for me it might make it hard to start working - I'd just stare at it😁
@flameofthephoenix8395 Жыл бұрын
It would be nice if each cell had a different energy level where the mouth cells distribute it the most to cells near them but also to cells further away just not as much, then if a cell isn't receiving enough food from the other mouth cells it will start trying to survive on its own as a new species at which point it will apply variance to the values of that new species that split off, when a new species gets created it will slowly form back the cells.
@flameofthephoenix8395 Жыл бұрын
The method of forming back cells I think would start by alternating between forming a few cells at first then switch to generating just one type of cell at a time before generating last a specific cell that would kind of be the egg cell so they have the chance to get food before forming eggs.
@flameofthephoenix8395 Жыл бұрын
To introduce more cohesive multi-cellular organisms you could have food cells give food to all cells regardless of what creature they come from, then in turn the cells on other organisms will fail to recognize the difference between those food cells and the cells of their organism.
@programmingchaos8957 Жыл бұрын
Interesting idea. I was thinking of something simpler, when a cell is too far away from either the mouth cells (now I want to replace the circles with images of horrifying toothed maws :) or the center of mass of the organism it just dies. The idea of them surviving on their makes them like spores. They would need a way/rules to gain energy so they could start to divide and create the other cell types based on their values. Maybe that should be a separate type of cell, some die if too far away, but this type can grow and divide(?)
@programmingchaos8957 Жыл бұрын
I think that ideally this would also include the idea of nutrient types or essential amino acids, rather than just food. So, different types of cells could produce one or more, but not all, of the amino acids and so they have to form cooperative groups to survive. Could be very interesting in studying the very beginnings of multi-cellular life. Great ideas!
@flameofthephoenix8395 Жыл бұрын
@@programmingchaos8957 Perhaps, however not only does it avoid the mouths spreading out like spores, but also has the added benefit of adding more evolutional pressure towards distributing the mouths evenly around the organism if it fails to do so it won't be able to sustain the entire organism and some parts will split off and likely die.
@bottlekruiser Жыл бұрын
From a quick look, comments don't seem to have said this yet, and it's not like it would have stopped me either way We could actually implement a "physics"-based metric of energy expenditure: work done by interparticle forces within the cell
@bottlekruiser Жыл бұрын
Also At a glance, your rules don't seem to forbid either "multicellular" organisms of several particle groups clumped together symbiotically, nor having one group split into multiple cells to forage more efficiently Would also be interesting to try and give the particles an ability to feel forces from food particles, to "perceive" although it would probably degenerate into a strong attraction at the max distance allowed. The one with scattered yellow particles reminds me of slime molds. wait's that one *did* have the food forces
@programmingchaos8957 Жыл бұрын
Definitely could implement an energy use based on size! And add genes for the size/mass of each particle that relates to both things like how much energy it can store or, if it included attack and defend type cells, how much damage they could do, but also how much energy it takes to move them. I suspect it would evolve tiny 'fruit flies' that buzz around using minimal energy and larger 'spiders' that sit still to avoid using energy, but dash out to get flies that buzz past.
@programmingchaos8957 Жыл бұрын
There are forces that allow the organism particles to be attracted or repelled by the food particles. So organisms can 'sense' the food. The food particles just sit there. You're correct that the rules don't forbid either multicellular organisms or 'divided' organisms. The multicellularity I like because it allows for mutualism, symbiosis, etc. I'm less sure about the divided organisms. In a bigger model I would be tempted to put in rules where particles that are too far from their center (of mass?) slowly starve. A couple of views made the comment about it being slime mold like. I never would have thought of that analogy.
@bottlekruiser Жыл бұрын
The beautiful part about moving away from hardcoded agents in favor of emergent ones is that the resulting alife isn't constrained to discrete agents either :3 Have you seen that evolutionary flow lenia thing?
@programmingchaos8957 Жыл бұрын
I often have the problem that I expect a particular alife model to behave a particular way and it's hard to break away from those expectations. E.g. when I first saw the distributed versions I thought the model was 'broken' and it took quite a while to realize the code was fine and evolution had just led to a surprising solution. I have seen Lenia, but haven't studied the details yet.
@TheCicciacco5 ай бұрын
Hello Terry, thanks for the video! I am first time viewer and oh boy! you are an excellent educator! I am a PhD in Theoretical Evolutionary Biology and I love this kind of evolution simulations, which are not used enough in our field. Thanks for putting an evolutionary spin on particle life! I was waiting for someone to do it. I have one main question for you: I noticed your mutation is quite aggressive (big changes) and frequent (all genes change at all reproduction events), I think this could hamper a little bit your selection process as you possibly go through a lot of random search. I was wondering if you could see if you get any difference in the forms that evolve and the adaptive value of the average organism if you implement a less aggressive version of mutation (I suspect many organisms die quite soon due to incongruous forces combinations). Normally, biological mutations are a stochastically infrequent event (in our DNA usually 1 mutation per generation, meaning infinitesimal chances of mutation, but in simulation usually settle for 1/100 1/1000 probabilities) and its change is normally small-ish (up for debate, but it normally is the case) and incremental (at least in many cases it is assumed to be, and works as a decent approximation). However, the system seems pretty solid already if it manages to produce viable forms in just a few hours! Which is very promising for future more complex additions. Also you might be interested into replicator theory (if you are not already), which presupposes that the basic unit of evolution is not the organism but the entire cycle of reproduction (meaning that the copying itself is as important as the getting to be able to copy oneself), there are many ideas and some models floating around in there which could maybe give you some clues about a more realistic copying/division mechanism. I was wondering if you could see if you get any difference in the forms that evolve and the adaptive value of the average organism if you implement a less aggressive version of mutation (I suspect many organisms die quite soon due to incongruous forces combinations). Thanks again, happy to have discovered you!
@programmingchaos89575 ай бұрын
Hi! I'm thrilled that you enjoyed the video and that the topic came through clearly. I agree that the mutation is extremely aggressive. It's pretty typical in the genetic algorithm community to use a 1/num_genes rate, i.e. on average one gene mutates per iteration, but it also includes elitism (keep at least one copy of the best individual unmutated, in a generational model) and is focused on rapid optimization rather than artificial life modeling. And this mutation rate is a lot more aggressive than that. I only played with the rate a bit, so it's definitely possible that a lower rate would work better. I suspect that part of the reason this high rate works well is that the solutions are pretty simple: enough force to hold the particles together and forces to be strongly attracted to food. It's also the case that there are relatively few 'lethal' mutations - the only one I can thing of would be forces that cause an organism explode - so a high mutation rate isn't so 'dangerous' to the organisms. I'm working on more complex versions that require finding other particle types to 'grow' and predator/prey models both of which should require more nuanced solutions and I strongly suspect that you're correct that in those cases a lower evolution rate will be necessary to find solutions. I'm not familiar with replicator theory - can you send some links? I've been thinking about ways to improve the reproduction. My current idea is that during reproduction a 'juvenile' creature is created with fewer particles, before it can reproduce it has to find enough generic particles to grow into an 'adult'. I have done some research on cooperative co-evolution, treating the unit of evolution as the whole team/pack, which produces interesting results - but that was pre-KZbin. If you're interested I just posted a video on a 3D version of a very similar model.
@TheCicciacco5 ай бұрын
@@programmingchaos8957 Hello Terry, thanks for the reply. Yes I think starting with fewer cells and collect/grow new ones is a great idea, and could also lead you a step closer to a more "natural" type of reproduction/copying. I guess you are already aware of that, but this is what in biology and evolutionary biology is called the developmental process, and it brings in a lot of fun little dynamics such as phenotypic plasticity, maternal effects, etc., etc., which make evolution much more fun. Curious to see how you plan to tackle the problem. Thanks for explaining why you think the system is robust, and interesting that there seem to be very few combinations of forces that lead to a complete breakdown of the organism. Again points out that this system seems to have a nice level of stability allowing evolution to mess around freely. On this point one thing I did not catch from the video is the level of diversity of solutions in a single run and the speed at which fitness/diversity plateaus. I am familiar with genetic algos and have done some work on that too and indeed in our publication we improved the results of previous versions of a specific algo by lowering mutation rate and making it differential for different genes. Maybe this could be interesting for you. I made a mistake btw in my previous message it is "reproducer perspective" or "process perspective" not replicator perspective. Here is a link to the original pub (Griesemer 2006), but I learned of this from the work of Johannes Jaeger (who also has a channel on KZbin with many of his lectures). I think model wise the landscape is still a bit barren on this concept, and that this kind of Alife models are the way forward. books.google.fr/books?hl=en&lr=&id=AN8UDAAAQBAJ&oi=fnd&pg=PA183&dq=griesemer+2006+evolutionary+process+perspective&ots=FiDserB59y&sig=dky6b9RET4JcqtvFSkqKEZdPvHA#v=onepage&q=griesemer%202006%20evolutionary%20process%20perspective&f=false
@programmingchaos89575 ай бұрын
Thanks for the link and the references. I need to follow up on those. In a single run most of the diversity disappears within a few hours and one dominant phenotype emerges. With such a simple environment the competitive exclusion principle applies very strongly. On the other hand, different runs lead to very different outcomes, so there seem to be a lot of fairly equivalent solutions. For development I currently have 'food' particles that supply energy and 'stem' particles that when collected become the next type in the organism's genome and are added to it. Now I just need to add a clustering algorithm, so if an organism breaks apart (subsets of particles get two far apart) it becomes two organisms.
@dkm44706 ай бұрын
I'd like to advocate that Particle Life lays a perfect foundation for a new and desperately needed scientific paradigm that connects (theoretical) physics with biology. But at this point I'm still seeing Renaissance art: a beautiful intuition. What is your take on this?
@programmingchaos89576 ай бұрын
That's an interesting idea. Certainly the simple physical rules of particle life lead to biological looking systems. But I would think you would need more general rules, very generally like the rules of thermodynamics, to explain what's going on in particle life at a larger, more general level.
@dkm44706 ай бұрын
@@programmingchaos8957 Yeah I agree! So first off l would say that particles must somehow be elementary. Perhaps it means we need Newtonian physics again as opposed to Einstein's. Then let's say that energy is equal to the sum of displacement of all particles (or something like that). Then, "eating" particles counteracts the principle of thermodynamics. In your simulation, which btw is awesome, how would you think universal energy could be preserved as a constant?
@programmingchaos89576 ай бұрын
Hmm. If you want constant total energy one approach would be to remove the 'friction' force, reinstate Newton's third law, and include mass in the calculations. Then the total energy of the system should remain constant(?) But I'm pretty sure that then the system would end up in an equilibrium state that wasn't as interesting. What makes life on Earth possible with all of its interesting variations and behaviors is the constant influx of energy from the sun. We need to constantly add energy (in this case by breaking Newton's third law and allowing particles to accelerate without balancing forces) to overcome entropy and get interesting patterns. Maybe there's some approaches that involve relating the influx of energy, measured as the particles' increasing speed/kinetic energy, with the complexity (i.e. non-entropic) of the patterns that emerge.
@dkm44706 ай бұрын
@@programmingchaos8957 Great point! My primal intuition was that particle life would applicable to both the microscope- and telescope- perspective, setting the range between elementary particles and any body within the universe. That's because, in my own implementation I was able to fluently alternate between "orbiting planets" and "interacting cells". Pseudoscience to the core, of course, but still. But you're absolute right that changing the parameters also changes the energetic boundaries of the system, to the point any particle life system never needs to be closed per se. I don't know... I just feel like there's something more scientific than just art to this paradigmn.
@josesantos260311 ай бұрын
It would be interesting if these oganisms loose particles in time, such as they have a digestive system. And these lost particles would be expelled to the environment to be "eaten" by other organisms.
@programmingchaos895711 ай бұрын
That's a very clever idea. I am playing with a version where if an 'organism' dies because it runs out of energy it's particles remain on the map and can be scavenged. Which is similar to your idea. The main issue I'm running into is the 'dead bodies' leave so much food around when a scavenger finally evolves the population explodes and the program grinds to a halt. Your approach might work better by making it more conrolled/gradual release of extra energy
@juergenkern676310 ай бұрын
@@programmingchaos8957 couldnt you make it so that if too many particles (including food, corpses and cells) are present no food is added? Or that the amount of food spawned is equal to the amount consumed by staying alive of a set number of organisms, and reproduction has a cost proportional to the amount of new cells, so that the total amount of energy in the system stays constant and too many organisms would rapidly starve?
@Artilife19 ай бұрын
Great video, I've often though about evolution in particle life. I don't know if you've ever heard of Assembly theory. I feel like a more interesting approach might be to simply let the system evolve with all particles being individualls, then use a k-means cluster or other clustering algorithm at the end of an arbitrary number of steps to get the "organisms" and evaluate the assembly score, the mean assembly score of the entire simulation could then be used in a evolutionary algorithm or gradient decent over the simulation parameters to optimise the system towards life like behaviours. In theory by prioritising assembly score, evolution of organisms might arise naturally. Any thoughts?
@programmingchaos89579 ай бұрын
Thanks! I'll have to check out assembly theory. So, every particle would have it's own set of 'genes' that would determine it's forces. And (after a set time period) particles that formed interesting assemblies would be selected for the next generation? Assigning fitness to interesting assemblies would be tricky, but with the right fitness function it could drive interesting patterns. It also might be possible to stick with the 'food' model. Particles that pick up food share it with all nearby particles. But particles still evolve independently. That could evolve particles that favor symbiotic behavior. Although I don't think they could be as complex as the current version where sets of particles evolve together. But it would be interesting to test.
@Artilife19 ай бұрын
@@programmingchaos8957 Not quite, you'd be evolving the environment. Every particle of the same type would act identicaly like in standard particle life. As for the fitness function, that's what the assembly score gives you, in short it measures the complexity, frequency, and ease of construction for an assembly of particles. The higher the assembly score, the more common, larger l, and easier to get there it is. In a well tuned system, self replicators should emerge. The difficulty indeed is in creating a loss function for measuring assembly.
@programmingchaos89579 ай бұрын
Ah, now I understand. That is a great idea. I'll have to think about the loss function.
@A-human-that-have-a-name5 ай бұрын
At 16:09 I saw a cell on the middle left reproduce with out eating enough food😅how
@programmingchaos89575 ай бұрын
Great catch! When a creature reproduces it's offspring appears at a random point in the world. If a creature has an offspring in its location the forces between the creature and its offspring often causes them both to 'explode' and die, especially early in the run evolutionary process before they've evolve effective forces to hold together well. I'm pretty positive that what happened here was a creature of the same 'species' somewhere else on the map reproduced and it's offspring just happened to appear on top of the existing creature. The whole 'where should offspring appear' question is a limitation of the model. I've been thinking about a version where there is a short period after reproduction when the external forces are turned off so the parent and offspring don't interact. Or just have offspring appear near to, but offset from, their parent rather than at a random location.
@jonathanclaudinger6 ай бұрын
excellent video! thank you sir
@programmingchaos89576 ай бұрын
Thank you! I'm glad the you enjoyed it.
@lorenzoanastasio516910 ай бұрын
Amazing content! Great job :)
@programmingchaos895710 ай бұрын
Thanks so much!
@ananttiwari133721 күн бұрын
cool!
@programmingchaos895721 күн бұрын
Thanks!
@programmingchaos8957 Жыл бұрын
And thanks to @briankramer7162 for some of the suggestions that led to this video.
@Fortplayzthis6 ай бұрын
Honestly, you didnt have to code an entire evolution system because the normal particle life already kinda does that
@programmingchaos89576 ай бұрын
You're correct that normal particle life definitely creates life-like forms. But they are just 'random' combinations based on whatever the rules are. With the evolutionary version each 'organism' (set of particles) has it's own set of rules, which can evolve over time based on how fit the organism is. E.g., in this case the rules change over time to make the organisms better at collecting food particles. But the rules could be changed so they could, for example, prey on each other creating whole ecosystems.
@Fortplayzthis6 ай бұрын
@@programmingchaos8957 my opinion has now been changed
@Fortplayzthis5 ай бұрын
@@programmingchaos8957well, that is true as well a normal particle life simulation doesn't really evolve. One thing I'm curious about is how we're you able to identify each organism differently? Did you just average out the attraction and repulsion forces and in a radius every particle is part of an organism? Also one way you might be able to improve this simulation is by adding a bit of randomness to the movement of each particle. But miniscule like 4 pixels. And also the attraction forces could be randomized for each particle by 0.0050 which might add a bit more of life to the simulation. One way to optimize your simulation too (if it runs on a tick counter or something) is to make the simulation run slower. It will obviously take more time but you could add more particles and make the world bigger meaning more space for organisms and more organisms themselves. And to favor more clumped together organisms you could make it so if a consumer particle is too far from the nearest particle of its organism, it doesn't collect food. And if possible could you put this simulation online? Like for the people that don't have a PC that supports the simulation file but still have a good device they could just go on a website that simulates for them. It will obviously cost money but.. well at that part I have no suggestions. Also super computer net. People can donate computing power for any amount of time by downloading a file that adds computing power to the main server that is running the simulation. That way you could have more particles and more organisms and possibly evolve multicellularity and have a big big world. And maybe you can add a small chance that when a new organism is made it has a new color. The chances will be really low, but it would allow for more complex organisms. Also when a cell dies it turns into food.
@programmingchaos89575 ай бұрын
Thank you for all of the suggestions and comments, there are some great ideas here. Some of which I've consider and some of which I haven't. An organism consists of a set of N (an adjustable parameter, but 40 for most of the runs) particles. They share the same 'self' forces - i.e. the forces between those 40 particles. And they share the same 'other' rules - i.e. the forces between each of those 40 particles and other, non-self, particles. They share energy and if they collect enough energy they 'reproduce' creating a new set of 40 particles that are treated as a separate organism that inherits the same forces, but with small mutations to the strengths and distances associated with the forces. So over time the sets of particles evolve forces that hold them together and make them collect food more efficiently. Note that an organism is always exactly N particles. I would like to test a version where they can evolve to have more or fewer particles, but haven't gotten there yet. For most of the runs shown there is a rule that if a particle gets too far away from the other 39 it dies, is removed from the simulation - which keeps them together. There is an example where that rule is turned off - in which case the particles spread throughout the simulation to be more likely to capture food. Adding a little random noise is an interesting idea. I don't know what effect it would have, but it's possible the organisms would evolve in some way to take advantage of it. The biggest issue with an on-line version is that it would take a while to rewrite the code, and it would have to be quite a bit more robust. It's one thing to write code that only the owner is going to be using, its a much harder task to write code that lots of people will be testing, because they will almost certainly find ways to break it. Honestly I was hoping someone else would do it. I have access to some quite large super computers through my University, just haven't had the time to convert the code to run there. Prioritization is hard, keep going with the model, or do a video on another topic? I like the idea of dead particles becoming food. But it makes getting the system balanced very hard, the first set of organisms die creating a lot of food and the population explodes - and the simulation grinds to a halt. By the way if you're interested I just published a couple of videos on a 3D version. One video covers the basic model and the other is an evolutionary model similar to this one. Thanks again for all of the input, I really appreciate it.
@Fortplayzthis5 ай бұрын
@@programmingchaos8957 It's good that you have access to more powerful computers but with online supercomputers it's way more powerful. Infact people once used them to run possibly hundred million calculations in a second. The only example I know is Minecraft @ home when they tried to find a seed with the tallest cactus so they made an optimized algorithm to find the fasted way to find one but it took too long to run. They tried getting a better PC but failed. Then they found that some other people ( including scientists ) have made supercomputer nets to run many simulations at a time on one merged online computer. So with the Minecraft community they made a way to donate computing power for any time to Minecraft @ home. Also I'm curious. Is the computer you ran this simulation on windows 10 or 11? Because I have a windows 11 (originally with windows 10) and it has a broken screen but I can connect it to another screen via HDMI. I would love running this simulation on my computer. If so, could you maybe give us a download link for windows 10? ( or maybe 11 )
@1hockieCh Жыл бұрын
Did you use that one exe. Zip code?
@programmingchaos8957 Жыл бұрын
This is the raw code, not the executable. If you unzip the folder it contains a few subfolders for the 'main' code and the associated class. Start Processing (which is free from processing.org) use the file menu to open the main file PC_ParticleLife_Evolve.pde and it will include the other files. Then you should be able to run it. From Processing you can also build a stand-alone executable file. Note this is a rough project made for you to learn from and customize, it's not meant to be a polished piece of software with sliders, etc. Thanks.
@mikebellamy10 ай бұрын
This is not a simulation of evolution it is an example of intelligent design!
@programmingchaos895710 ай бұрын
Most people would consider this a (simple) version of evolution. Intelligent design is generally considered to involve designing the details of the organisms by hand, which I'm not doing. I'm creating an environment and defining some rules of 'physics'. But the actual genetic values that define how the organisms look, behave, etc. arise through a combination of mutation, inheritance, and selection, which is the definition of an evolutionary process. Importantly, this means that I don't know in advance what the outcome is going to be. In fact, it never occurred to me that the 'ambush predator' type creatures seen in some runs were a possibility, much less that it would be a successful strategy. I only expected to see much more contained 'organisms'. If the final strategies that we observe are something I never imagined it's pretty hard to claim that I 'intelligently designed' them.
@mikebellamy10 ай бұрын
@@programmingchaos8957 _"Most people"_ don't understand statistical mechanics. Any system of particles (real or virtual) left to a random process constrained only by a boundary and set of rules of interaction is no different to mixing chemicals and adding or subtracting energy. For any given energy level if held constant the system will progress to an equilibrium state and there it will remain forever. The microstates through which it passes are both unpredictable and unexpected in their microscopic arrangements so not designed as such but the design of the system is fixed. Evolution is therefore impossible in the sense that innovation beyond the given design is impossible. But innovation within the system is also impossible because the path to equilibrium is an unavoidable constraint and whatever microstates occur are only those the predetermined design rules will allow. That design was intelligently done. If evolution is to replace a designer then it must be shown to innovate and do real novel design work but in your system all design was finished before it was run.
@programmingchaos895710 ай бұрын
I’ll start at the end of your comment, I’m not trying to replace a designer. I’m interested in the emergent phenomenon that arise from evolutionary models. Evolutionary models lead to interesting emergent behaviors and solutions that were not intentionally included by the programmer. E.g. I didn’t know what to expect with this model, many companies use evolutionary models to solve problems that human designers struggle with, NASA has used evolutionary algorithms to design antennae unlike any human designs, etc. I would not claim that these systems ‘innovate’ because innovate implies intention. I would say these models (i.e. evolution) ‘produce’ or ‘lead to’ interesting and unexpected solutions. I’m not sure what you would count as “real novel design work”, but I can say that what emerges is not intended or expected by the original programmer/designer. So maybe this is a matter of semantics. It's worth emphasizing that evolutionary systems are chaotic, which means it’s not possible to know what states it will pass through without running the system. Thus, although it is true that “… whatever microstates occur are only those the predetermined design rules will allow…” it is also fairly misleading. I literally can’t know what microstates, i.e. interesting behaviors and solutions, the system will exhibit without running it. It’s hard to claim that I designed those behaviors and solutions given that I can’t know in advance what they will be - they are an emergent property of the system. Furthermore, even though I programmed the system, I just implemented simplified versions of physics and evolution taken from the natural world. So, it’s not even a very original design, just a poor copy of the natural world. Hence, my original comment that this isn’t what most people mean when they say ‘intelligent design’ - I assume that most people who believe in an intelligent designer (i.e. god?) also believe that the designer is omniscient and knows in advance what they are doing and what the outcome will be. Which is definitely not the case in my program. We could ask the question who designed/innovated the 'organisms' in this model? Or who designed/innovated the snowflakes in the video on fractal snowflakes? I don't think I designed them because I didn't know what would appear. I don't think the system designed them because it's just a program. They, the creatures and the snowflakes, are interesting, emergent microstates of the systems rules. One could take a systems view - I can’t be the innovator because I don’t know what’s being created and the model isn’t the innovator because it’s just a program following rules. Innovation only occurs because of the whole system: the programmer and the running program. (This is one of the standard arguments against Searle’s Chinese room thought experiment claiming that computers can’t understand.) Most of the evolutionary biologists, mathematicians, statistics, and computer scientists I work with (myself included) do have an understanding of statistical mechanics. What you describe “Any system of particles (real or virtual) left to a random process constrained only by a boundary and set of rules of interaction…” applies to our Universe, i.e. a (very, very) large set of particles constrained by rules of interaction. And your “... path to equilibrium is an unavoidable constraint... … equilibrium state and there it will remain forever ” is the path to the eventual heat death of our Universe (assuming current models are correct, I’m certainly open to them being revised based on future data). From this viewpoint there is no innovation in Universe, everything was pre-determined by the initial rules (and the initial conditions, because these are chaotic systems the initial conditions are critical and you should mention their importance). Of course, this idea has been around for a long time and a lot has been written about it, see, for example writings on the ‘clockwork universe’. Rather than worrying about whether ‘innovation’ is real, I am interested in how (from a statistical mechanics view) the rules of a system produce interesting and unexpected microstates. For example, how inheritance, mutation, and selection, i.e. evolution, can create complex and interesting microstates, i.e. artificial or real life with interesting behaviors. All life on Earth being a relative microstate compared to the scale of the Universe. One last note, even if we assume that your position is the most important one, it doesn’t automatically imply the existence of a designer. The rules of the Universe (or this Universe if you believe some of the multiple universe theories) could be random and just happen to lead to interesting microstate like people. (The weak anthropomorphic principle supports this view.) Apologies for going on so long, but this is a very interesting and complex topic.
@mikebellamy10 ай бұрын
@@programmingchaos8957 Well thank you for such a long considered response. I am glad to see we agree the microstates of any system are only those allowed by the rules of the system and the second law. So I must show you why that is all that is required to falsify the theory of evolution! Firstly what you call _"Evolutionary Models"_ as used in the NASA aerial model resulting in a completely unexpected arrangement of maximal efficiency. It's an optimization algorithm applied to a specification (ie design) called a Monte Carlo Method. It is so constrained it cannot do anything else but asymptote to the most optimal solution which if re-run will generally produce the same result. Ok I agree the algorithm is the same as for evolution. *But;* The important differences between evolution by natural selection in the wild and the Monte Carlo methods are: 1) Probability of selection of a good change is
@dadsonworldwide323810 ай бұрын
1900s public school you would definitely get sent to the office if you said anything about programs or code in biology class lol In the 80s if happened to often you'd end up with a diagnosis of ADHD in that similar Cambrian explosion lol
@fortcraftgaming21366 ай бұрын
Give me some clasky csupo eyyyy i deas effects
@programmingchaos89576 ай бұрын
It does resemble some of their animations - I never would of noticed that. Thanks for pointing it out.
@Lightconelabs11 ай бұрын
I teach how to make these and I have a student who created one that I think is better if you're interested
@programmingchaos895711 ай бұрын
Definitely! I kept the rules fairly simple for the video. I've been working on a more complex version, but getting if balanced is tricky. I'd be very interested in seeing what they came up with. Thanks!