It's interesting how the prey cap seemed to play an important role in the simulation- when there was one big preyblob left, it seemed to have all of the prey in it, so no other prey could really reproduce, but when the predators were able to start breaking up that blob, the prey population suddenly exploded over the whole rest of the map
Yeah, the hard cap was a huge problem, the prey population stayed at the maximum for almost the entire thing, and never dropped especially low. I’m assuming that computer resources are the limiting factor, and a smaller map with a similar cap might help.
@@thiccityd9773 one could improve the cost of living depending on the amount of beings of the same kind. So when there are a lot of prey, they need more energy to reproduce. Theoretically, they could get an unlimited amount of beings. However, they won't as reproducing gets more and more expensive. On the other side, Predators consume more energy, when there are already a lot of them. This should too result in a soft cap. Hard-coded maxima seem to have some problems
yeah this occurred to me too, i think this observation could be merged with the observation about "plants" as a source of prey energy and reproduction to allow plant growth and replenishment to serve as a more natural "cap" for prey
My theory at 19:40 is that over time, as the prey in the center replicated, they slowly lost some of their evolutionary traits that helped them avoid/eliminate predators; there wasn't any evolutionary pressure to keep those traits because they were relatively well protected by the prey on the borders. So, when the border prey were killed, it left the center more vulnerable.
I think that another factor is that some of the predators from the corner blob with the clustering strategy found their way over to the center blob where the strategy worked very well
Pray that attacks gets killed first as they are at the frontline. Pray that stays back has time to reproduce. Even if group has power to defend, individuals don't have incentive to do that.
I think what happened at 19:20 is that after the collapse of the Corner Prey Blob, some predators managed to migrate to the Center Prey Blob, where the prey weren't adapted to deal with the corner predators' aggressive strategies. The corner prey had evolved alongside them, so they were better adapted to deal with them, but the center prey were by that point probably a totally different species, who didn't have the traits necessary to defend against the corner predators. I'm guessing the center predators also quickly went extinct when the corner predators started expanding, but that was something we couldn't see, because they looked the same. In other words, the Center Blob had a relatively balanced ecosystem, which got destroyed by an invasive species, and then a new balanced ecosystem emerged (the scanner ecosystem).
I agree with your theory and as such think it would be a cool addition to assign color coding to "genes" or values of the entities that are mixed in some way and rendered as their body color. That way we could start to see groups of species with similar traits visualized separately. The stronger the divergence in values/tactics, the greater the differentiation of color.
i disagree entirely.. the issue was the population cap, the prey was at cap for most of the simulation, and as such even a colony that should have been fine, holding its own against the predators wasnt able to reproduce at certain moments, and instead, prey in the middle of the map or in another colony reproduced, and every time that happened, the predators gained an advantage, as each of their packs never decreased in size (enough of the predators roamed the empty space and died, so the predators reproduced and were immediately attacking where it counted) at least until the colony was wiped out.. the only time the prey population dipped, was when the predators started chewing into the last blob colony, it was essentially all the prey concentrated into one spot, with a few random stragglers out and about.. the colony was able to sustain its reproduction, because all of the new prey were going tot hat colony.. until enough of the roaming predators died off, and it became all of the predators attacking all of the prey in a single point, and the predators have a 2x advantage in an equal fight, and that eventually lead to the reproduction rate of the prey to fall behind the consumption rate of the predators.. luckily at this point enough of the roaming prey managed to reproduce enough to self sustain, but then the colony disappeared, and it became a slow wave of propagation and death Solution? totally uncap the predator population.. and cap the prey population to a multiple of the predator population (otherwise the prey will just fill the screen killing the predators) this will allow the prey to not be 'at cap' most of the time, and if a colony gets surrounded, that colony will die out, but it will allow other colonies to explode in population (because the predators exploded in population)
@@tears_of_asariel3198 Well that explains the corner prey's demise, but still it seemed that the centre blob was full of stationary non-moving prey adapted to live within the safety of the blob.
A critical mechanism for prey that seems to be missing is food source. There is no incentive for prey to NOT clump together and stay in one place. Would be interesting to model something like grassland food per grid square, being depleted over time depending on number of prey occupying that square.
Yes! Even better if the food source coevolves with the prey, just like in Huegene. That way patches of different colors would naturally emerge, possibly creating different niches and boosting speciation. Might be even more interesting if the predator's prey color preference also coevolves at the same time with the prey color
We can assume they live in a nourishing substrate. But it would be good not to cap max number of pray but max number of pray in certain area. Or maybe chance to reproduce depending on number of pray in the vicinity. Also 4 hits to neutralize a predator is too much IMO. Better predator eat pray in one hit but pray deactivates predator in 2. Or randomly with some chance e.g. 50% or 30%. Could be interesting to explore the idea of predators eating predators too.
@@revimfadli4666 as far as I understand, there is no incentive of cells to survive. It just so happens that those which are more capable to "survive" stay "alive". Which is a fascinating mechanism if you ask me. I think those sticking together will survive more, otherwise they will be eliminated by the other kind quickly. But I'd like to have the source code and play with it. I don't know if that's available or not.
@@akostadinov by incentive I meant something to "reward" and differentiate cells which are more "capable", through different effects from the environment in response to their actions. Making prey take 2 damage to kill is an example, as predators that happen to pack hunt would have less risk of being killed by their prey, while also kill said prey faster, and thus they would be more "capable" and tend to "survive" better. Similarly, giving prey a fighting chance would "reward" ones that pack together since they have a chance to kill incoming predators, thus increasing "survival" rate and their "capability"
This man doesn't get enough credit for this, absolutely epic simulation. I thought it was interesting how the predators that found the 'wall ramming' technique first also died out first because they killed their prey very quickly
That second point was true until the predators got down to that last colony. If you watch closely, you can see a small few groups from the second to last colony survive a journey to find the last colony. That trait that allowed them to efficiently kill a colony _AND_ find the last colony got replicated, which seemed to aid in the creation of the stable "scanner" ending.
It's hard to be sure. But if they had enough mobility, odds are that just a few of those original predators managed to make it to another colony, and ended up taking over that prey genepool because the originals just couldn't compete with them.
Yeah that was really cool, you could see how it became almost a migratory pattern with the predators following them and the roving front of prey killing off straggling predators.
It seemed like an ecosystem was developed if too many predators ate too many prey it's ultimately self destructive and eventually there would be no food left to eat and that's why at the end they formed a single migratory line allowing the prey to reproduce behind them and the cycle repeats
I like the fact that even not having a way to communicate with each other, the predators were able to create formations and even turn the phalanx to flank the pray mass
Another think I noticed is that the predators didn't just rush the enemy, they advanced slowly enough that their frontline didn't thin out. The only problem the predators had was if they chased a prey behind them they lost sight of the frontline, but then again, the scanner strategy is kind of like a circle of life.
Emergence man, by combining simple actions that result from simple inputs, it’s possible for large groups of relatively dumb things to accomplish great things. Stuff like ant colonies.
19:23 I think it could be a case of the prey changing, not the predator. The prey in the middle of the blob were sheltered from predators for a very long time, so they didn’t get a chance to evolve accordingly. When the predators broke through the first strong layer, they were visited with a bunch of under-evolved prey that they could easily eat
I have a couple of ideas: 1. Instead of keeping the prey stuck with a short range of vision but a wide field of view, and the predators a long range of vision but a narrow field of view, both kinds of entities should have an "eye shape" gene where vision range and field of view are inversely proportional to one another. 2. Have a third kind of entity, "plants", which are eyeless blobs that can't move on their own, but stay still and multiply if kept alive for long enough (Prey don't do this anymore - their reproduction is based on how any "plants" they've eaten, like predators). They're eaten by prey, and while predators can't eat them, they can push them around (maybe they can develop weird strategies around this, like a wave of predators carrying some plants around to attract prey).
Plants would be good but there is a saying: If they have eyes on the sides they hide (eyes on the side means they have wide but short view and hide means prey) and if they have eyes in front they hunt (front meaning long but short view and hunt meaning prey)
@@eyallevin6302 plenty of predators have/had eyes on the sides of their heads, though - for instance, fish, whales, possibly crocodiles depending how you count it, and many theropod dinosaurs. prey animals with forward-facing eyes are a bit rarer, but they do exist - they just tend to be animals with more need for good depth perception than a wide field of view (so, you'd be most likely to find this in arboreal animals - some monkeys, for example, are small enough to be prey to many other animals, but still have forward-facing eyes)
Yes-at the end, the predators were essentially “farming” prey. By bunching up into one front, predators eat nearly all the prey, then allow them to grow back until the exact right amount of time has passed for them to be in maximum abundance before eating them again.
@@Ardias59I think a interesting thing would be cool for the fov and the range to be changeable with evolutions, that would creat a ton of different strategies
The reason why the giant blob might have been decimated by the predators could be the prey's in the middle getting too comfortable in their safe spot. Which meant there was more room for weaker creatures to breed, making the warrior prey die off and the weaker prey survive. Which ended up benefiting the predators since they became easier to kill. Changing the whole ecosystem
no, the predators had an inherent advantage with more health, so once the predators learned how to take less damage while dealing damage via battle formations, there was nothing the prey could do. then, just like Alexander the Great, the predators rolled up the flanks and got a double envelopment, which enabled the predators to functionally outnumber the prey in zones of combat. i dont think its anything to do with degeneration, the predators simply solved warfare, as the title suggests (phalanx, an ancient military formation).
@fisheryboi835well yes and no. Bad times temper people, good times soften them. Most of social progress happen in good times built by good men which get those emotional stability from firsthand or secondhand experience of bad times (someone who experience bad times and become a good men often raise good men as well). Once stability pass, comes stagnation where good man are slowly replaced by bad man and bad times comes long after. Why social progress didn't happen during bad times? Because the good man is busy fixing the ill in society rather than progressing forward. This is in timescale of century mind you.
This is truly fascinating, seeing the AI learn to behave in a similar manner to real life animals and then ultimately evolve into a shield wall is so surreal to me. Loved the editing and music, nice job. I'll be eagerly waiting for more.
I was going to make a joke about how the predators are going to evolve to the point where they're going to farm the prey... Until they started farming the prey
Finally we can imagine that the simulation is close to the source code of life. It uses the same approach mechanism and represents perhaps a form of answer to : what is life. This is the first thought that comes to my mind.
Lots of ideas: 1) I think that a good way for prey to communicate would be pheromones. The prey will be able to produce and sense pheromones as a response to stimuli such as 'i see lots of predators' which would allow for complex behaviours and strategies. Maybe predators could also use pheromones, possibly even sense the preys' pheromones which would allow for even more complexity. Also there could be multiple different pheromones, for example red blue and green, which the prey could evolve to signal different things. How pheromones could be implemented in the simulation: Particle Approach: Upon stimulation, prey will release pheromone particles which other prey could see or smell. The number of particles they can sense will be proportional to the activation of the sensing neurone. Pros: Easier to code i think. Works with infinite number of pheromones Cons: Seems quite cpu intensive, as a lot more raycasting will be needed to see the particles. Image approach: Rather than the pheromone particles being an entity in the simulation, they will instead be represented by an image that overlays the whole simulation area. The RGB channels of the image can be used to represent different pheromones. Upon stimulation, the prey change the RGB values of the image at its position. For example if the coordinates of the prey are 20, 30 and it releases a red pheromone, it will increase the red value the pixels at or around 20, 30. Diffusion and dissipation of pheromones over time can be simulated by simply blurring and dimming the image every frame. To sense the pheromones, the prey would simply check the color at its coordinates, or take an average of the surrounding pixels. Pros: Runs a lot faster because its just performing basic operations to an image. The can be low resolution and still have full functionality. I think it would look cool to have the image as the background of the simulation. Cons: Complicated and harder to code, Only works for 4 types of pheromones, red blue green and alpha 2) Colors: Each entity will have a color gene that affects its appearance. This could be purely cosmetic, and show genetic drift as the entities mutate, which will allow us to distinguish between entities with different genes. Possibly, the entities would be able to see the color of other entities. This might lead to interesting behaviours, such as xenophobia ( prey preferring to group with prey with similar color because similarity=relatedness and grouping with related entities would help preserve its genes). Another possibility is that the color similarity of entities it sees will replace the 'object type' input, however this may encourage mimicry; predators to evolve a similar color to the prey so that the prey cannot distinguish it from other prey or vice versa which is quite OP but sure is interesting. 3) Eyesight gene: A gene that both increases vision range and decreases field of view, allowing these traits to evolve over time rather than being set at the start of the simulation. 4) More layers in neural network: The current neural networks appears to only have 2 layers. Adding more layers of neurones will greatly increase behaviour complexity, at the cost of performance.
honestly pheromones would be too much of an advantage and lower the amount of evolution in them. but even a simple pheromone concept would make prey not be able to stay still or group up without major issues xD
This simulation has an infinite number of possibilities. I've seen several proposed changes, but I believe the most interesting are adding plants that prey must eat to survive and sexual reproduction to reproduce. The males would be a little darker than the females and the females could not move for a few seconds to give birth. This could cause females and males to have two different roles and force them to stay in groups. I also saw several that wanted prey and predators to communicate with each other, but I think it would become too chaotic and prevent any group from creating.
The fact he needed to realize that for herding they need to be able to self defend and the rare commentary makes me really dislike this video. "Self learning AI" videos are all so lazy nowadays, just the same thing done by lazy hacks over and over, and youtube force feeds you them even when you click something else a dozen times.
@@ruolbu Not having the video be like "oh I realized that the carnivores need to be able to see eachother to develop pack dynamics" level of bullshit. I've seen dozens of these videos and it's always this low quality. I want someone to pop up something genius, something outside normal scope, but it's always the same thing pretending to be original content. SERIOUSLY google about AI learning with herbive/carnivores or whatever the hell, Do it now. You'll see what I mean.
@@no3ironman11100 no I mean your sentence that said "these videos are all so lazy nowadays", implying there where better videos in the past, and im curious what these were.
@@no3ironman11100 yeah I know what you mean, basic common sense shit that anyone would've thought of. "oh I wonder why my ai is basic and isn't developing any interesting strategies?" Me: Maybe because you aren't giving it enough reason to do so or the correct information ya dodo bird, JESUS FUCKIN CHRIST! Not to mention this predator vs prey sh*t is getting old sure it's interesting but can we move on to more complex stuff, hell i dunno like army vs army?!! Literally anything else, is there no creativity on youtube?!!!
There are so many cool directions this could take! Prey could experience two states- a "calm" state where they reproduce faster, and an "agitated" state where they move faster. Prey could learn to recognize the state of other prey. You could add cover- places in which prey could hide which are energetically expensive for predators to destroy. You could give each entity an "energy level" and monitor the trophic dynamics of the system. Excited to see what's next!
Great idea about the cover-places. My feedback would be to widen the cone of detection rays so predators and prey could be more aware of other entities to their sides (or behind?), but more significantly, stop the edge-warping in the model. The final display of the "rake" by the predators seemed false as the prey were respawning "under" the wave for the next wave to wash through the map - this would be very different if the edge of the simulation reflected real-world environment limitations (cliffs, coast etc). So, sure, the predation wave would be devastating, but then you're left with a swarm of hungry predators with nothing to eat.
@@Aegilops the looping map was done because the small size of the whole thing and movement speed. It sounded like with the very first simulation corner deathblobing kept happening. So for an effective sim that way a "round" map would be necessary to prevent corner deathbolbs, then from there add terrain features to see how that impacts development
I wonder if the defensive strategy might learn to flash agitated to call allies to the line, but then go back to "calm" even on the defensive. If they are holding the line, reproduction speed might be more useful than speed. It might also be useful to have a way for prey to send an alert that other agents can detect, even if it isn't in their cone of vision to symbolize a distress call. This could cause nearby prey to either run or prepare for combat. Prey might not bother with the alert so that unaware prey may distract the predator chasing them, but the distress call strategy could indirectly aid in the survival of the behavioral trait if close relative (who are more likely to share the trait) survive because of it. This is a rather complex behavior to learn, however. I wonder if having a way to recognize their close relatives would be useful. Related agents are more likely to have similar strategies and might be more reliable in a pinch for altruistic agents.
I'm note sure if the prey/predators are aware of the health of other prey/predators. Just adding this, along with some healing over time mechanism could create some many more cooperative behaviours
It looks like you essentially have 2 species of predator. Those that work together to from a front, and those that work alone to pick off stragglers. It would be interesting to have some way to indicate lineage. The first thing that comes to mind is color: having color be something that can mutate randomly as well. This way, if a particular mutation is successful, you can see it propagate through the population. I imagine you could switch between having them just be red/green vs showing their color for analysis of lineage.
I was asking myself the exact same thing about the prey! At the beginning of version 3, are those straggler prey specimens just again and again ones that simply leave the main bulbs - or is there a separate straggler species that manages to survive out there? Because some of them were really far out …
Also he could make a food web by adding a predator that eats the predators in this simulation...that way the predators lower on the food chain could develop different species...some that are better at avoiding the top predators when they are plentiful and other that are better at eating the pray species. Also you might see the prey species following the top predator species.
I suspect the prey species was just one species. It seemed to follow one type of Hurd type motion when around the prey and another one when looking for prey. It may have developed both an effective seek and an effective kill strategy which made it more deadly and created the wave.
The lone wolfs at 26:41 evolve into a new type of predator that's responsible for creating the path to the sustaining line at the end, they started hearding prey that slipped out of massive prey balls as prey balls were disappearing. By leading prey away from the masses they can potentially create other prey ball clusters and a lot of it was ended by the limits of the map or unevolved lone predators still work for themselves and overeating prey from moving heards
When watching the timelapse, it almost appears that the "super predator" (the generation that could somehow destroy the prey with ease) didn't develop in the main large blob of prey, but actually in the other major blob on the map. At 26:45, you can see a sudden change where the predators go from eating the prey on the outskirts of the upper right blob to completely decimating it. Then, when it is completely destroyed, most predators die soon after. However, it looks like a few predators from that area managed to randomly wander over to the other blob, and the places they wandered to is exactly where its complete destruction started. It's just a theory, but its interesting if it is true.
the 4 corner blobs are actually just one blob because the map is borderless. picture the first main center blob then draw a line horizontally and vertically. this would make it look like 4 blobs but its actually just one. hope this is understandable
This is correct. Though I'd love to see some tweaking of the population limits. It's not really a fair test if the prey run into their population cap. Another really interesting thing would be adding a colony of human controlled predator, using RTS like controls perhaps, and seeing how that would work. Also, if you think about it, the predators at the end achieved a perfect scenario - they kept enough prey alive to continue propagating while they pushed them endlessly north, eating their fill. They didn't eat them all and die from starvation but instead got to a point where they could continue to feed forever. Man, there's so much to think about with these kinds of things and I'd be so interested in the results after tweaking various parameters. Like how does it change if there's not "endless space", so they prey couldn't just continue north forever? How would it change if prey had a short range of vision for predators but had an extra sense that could detect fellow prey from a long distance, like a scent or sound analogue? I honestly wish I was capable of this kind of programming, it sounds endlessly fascinating.
@@Ashfold_Eberesche In the end the simulation found a way to max out both predator and prey populations into a stable system. I wonder what would have happened if an omnivore that was less specialized than either of them (Still needed to hunt to reproduce but could survive fine on it's own) was introduced.
@@lilbert4996 Oh! Now I understand why the battle line managed to form at the bottom just as those at the top ran out of food. I was starting to think they weren't all individual evolving minds but just an overarching AI trying to use them more effectively.
So, you're right, but just with the larger blob and the smaller blob. Predators from the larger blob evolved to pack into a wall and push, and thus gained the advantage, and then some migrated to the smaller blob where they employed the same strategy to great effect.
This simulation is a fascinating example of chaos theory at work. Despite the random initial conditions, what seems like a chaotic process eventually stabilises into an infinitely repeating (but never EXACTLY repeating) pattern. Wonderful stuff.
While it is exciting to point out something smart sounding is at work, you need to know if it *is* at work. Mutations (neural network) are entirely random which means that this simulation is not deterministic which also means that this simulation *is not chaotic.*
This is a result of entropy more than chaos theory, but there are elements of chaos there. Partly that chaos is restricted by the map boundaries, that being a square shape allowing the repeating predator sweeping strategy. But what we see here is entropy hitting its highest point due to order seen in the predators' behavior. The phalanx pattern and emergent sweeping strategy are examples of order that allow the highest population of predator and prey. Given many more variables akin to a food chain, we could see more and more resemblance to entropy in the natural world, but that isn't necessary to understand how this simulation emulates mathematical entropy. If entropy became this high in the natural world inside a closed box, the prey would likely start to die off too fast for the predators to thrive as they did here, simply because they are reproducing at a sustained maximum rate across the entire map given a specific period of time, and they would likely use up the entire map's resources (again, the food chain variables) before those resources could recoup.
The timelapse is actually stunning. You can kind of see the stages of evolution, in both kind of creatures. You can see the movement of evolution in the predators from devouring top left group, into bottom left, bottom right, top right, then some of the highly adapted predators hit the centre group and explosion happens. Great stuff!
Very very interesting one this time. I have a suggestion about the communication; maybe give the prey a binary signal that can be read and reacted too by other prey? Just having a method to communicate can lead communication to evolve irl, idk if this is very efficient though.
That sounds very interesting, although it may even want to be larger than a bit to create some sort of alarm or pheromone to warn others of danger or to go somewhere
@@KingOreo2017 I actually made the comment with his mentioning of communication in mind! Pheramones seem hard to code to me, but they're very very interesting. Alarms might be simpler.
@@griffinhunter3206 thats true. It would also probably be inefficient, but an alarm system could be interesting. Another cool idea would be fear, where prey have a fear meter which would increase by alarms or by seeing prey nearby die. Idk, that could be redundant though
I'd love to see how different environments would play a role. Put trees or rocks to obscure vision, water to help speed up or slow down depending on direction. I think there's some really cool ideas you could make with that. Also while the prey do need more ways to communicate it was cool to see that migratory pattern emerge so that predators didn't just run around and die once they ate everything in their immediate view.
Also he could make a food web by adding a predator that eats the predators in this simulation...that way the predators lower on the food chain could develop different species...some that are better at avoiding the top predators when they are plentiful and other that are better at eating the pray species. Also you might see the prey species following the top predator species.
@@colorado841 Rather make it anything can eat anything, combined with eating changing the unit's speed and/or size (size also increasing health pool), while waiting/moving reverses this again. That way you might naturally get diverging species and potentially multiple trophic levels.
At 19:40, it looks like the predators have refined a bite and pull back strategy. This means that each predator is only exposed for a very small amount of time, allowing them to spread damage and take fewer losses.
This is the first time in my life I have consciously cared to go up and turned up the quality on my youtube video just to see content better. Thanks for this amazing video!
19:08 The predators started winning because they (probably unknowingly) created a "wedge formation" that was once used by cavalry to break enemy lines. The wedge was shaped in a giant triangle, charging the enemy crating a "gap" in their lines where more of the predators could pour into, and hopefully split the defenders into two smaller groups.
@@karthiksunil219 actually, I think it's more of a case of "invasive species". the predators formed on the left which were probably from the previous group of predator/prey which wrapped around and used their tactics on new prey who had no idea how to fight back. I think that's also why there was a group of predators who stayed put around 20:10, they were the original predators of the area
It almost looks like Prey stopped "standing it's ground" in giant blobs, and just started backing off. As the Predators start "scanning", you can see Prey is dispersed and moving in the other direction (because the Predators behind the wave die off from starvation). Ergo, it's stuck in a loop. Edit: I know it'd start getting very complex, but it'd be interesting to implement a % chance for offspring to be born with a new trait, picked randomly from a large chart. All traits can be passed on (but not guaranteed), and can even be improved further (like leveling a skill in most games). I.e., increased sight range, slightly faster movement, birthing twins (or litters), etc.
This is basically a simple version of what happened on Earth, in terms of reaching an equilibrium; Where life is pretty well balanced until our long dead ancestors tipped the balance. As our evolution happened more, we used minerals like iron & coal, tamed animals like horses and built stuff like wagons and houses to further ourselves. It wasn't until climate change/global warming happened that we realized that there could be consequences to this, too.
You mentioned wanting to give your prey some sense of unseen danger. Maybe each prey passes a danger value to nearby prey, and the danger value gets reduced with each pass. Prey on the edge within contact distance send a value of, say, 10 to their neighbors, the neighbors send value 9 to theirs, they send 8 to the next group of neighbors, etc. Let them decide what to do with this information as it comes in and see what happens! Great videos!
This is probably the most interesting AI ecosystem project on UA-cam, a part three with the introduction of new factors like prey needing food would be amazing
These videos are all so amazing! Heres a few suggestions: 1. Reduce the map size. Maybe make it 4x bigger than the original rather than 16x. I say this because I feel that the population cap creates an unrealistic pressure that may look cool but causes weird things to happen. The smaller groups in the beginning are what cap the larger group in the center from reaching a larger size, and I feel that that is unrealistic. 2. Create some sort of "grass" the prey must feed on. I noticed throughout the simulation that the reason the predators couldn't break in and kill all the prey is because the prey in the center of each group basically just reproduced, creating thousands more of themselves which just threw themselves into the predators to keep them at bay. This basically meant that the prey didn't really need to evolve and caused the boring (but very cool looking) end where the predators just swept up and killed any prey they touched. A type of grass system, which could just be a value that by default increases by 1 every tick and decreases by lets say 5 every tick, wouldn't allow the over density of prey that is seen in this video 3. Make different species. I'm not sure how viable this is, but I noticed that the predators seem to split into 2 (maybe 3) different "species." One was the main line, which just rammed into the prey and tried to kill them, the swarm, which sat behind the main line and got any prey that dared to escape, and the nomads, which stayed between groups and killed off any prey groups that got too big. Maybe creating some sort of system that changed them different colors depending on how different their neural networks are could lead to some very interesting results. 4. Allow communication. I know you mentioned this in the video, but allowing the prey and predators to not only see each other, but to communicate, could create even stronger packs like were seen in this video. Prey could send off some sort of warning to other prey that they are being chased, or maybe even a fear response if another prey dies around one, and maybe the opposite for predators where a predator could tell others that there are prey nearby. I feel this would be very cpu-intensive and may not change the end result that much, but could be interesting to experiment with nonetheless. 5. Sexual reproduction. A small change, but maybe create a system in which you could toggle on sexual reproduction. It may not make that many differences, but could be an interesting thing to try and many change the result of an experiment if some feature you add keeps giving the same result.
About what happens at 19 minutes : it seemed to me that you had 2 species of predators. The one eating the corner green blob was very efficient, while in the middle the 2nd specie of predator was barely surviving. When the corner blob was completly eaten, the good predator specie roamed around to look for preys, and some of them found the center blob. Then started eating and reproducing.
I agree that the corner predators were probably better, but I think only very slightly, that slight advantage gave them all the spawns (remember the cap) and so once the cornered prey were gone, all those predators staved and allowed center predators to begin growing numbers. I would say only slightly better, and I don't think those predators migrated to the center since they die off so quicky without food.
I was thinking of a "comunication" methods between preys. What if you add a "light" on the back (similar to the eye) that turns on when they see a predator, and this light can be seen by the other preys (maybe by predators too, just to see if it has any effects on their hunting strategies). It could also have different degrees of intensity, for example if it's seeing a predator the intensity is 5, if it's seeing a prey with an intensity 5 light then it emits a light of 4 and so on. This might give the prey some knowledge of the direction where the predators are coming from.
Chemical signalling by bacteria works like this, with popupations being able to react to predator, prey and community density through this quorum sensing
It would be fascinating if the prey could choose the light intensity on their own by the inputs they get. Similar to how the output of the neural network helps them move, a smaller net could be created to interpret their inputs (surroundings) to shine into a light intensity from 0 to 1 which can be interpreted by it's peers. This makes for complex strategies for both prey and predator. A prey could interpret the inputs of another prey and deduct what it itself needs to do, responding to the light with its own movements. They could even keep responding to each other in a chain reaction of lights blinking. You could technically imagine these creatures strategizing, if these lights actually impact the output of the movement. You could separate different kinds of preys and their talking methods in separate colors. Since different mutations of preys are varied around the map, you could try dropping some preys from the corner of the map to the other corner to see how they react. The same could go for a predator too. Taking this into even more complexity would be if predators could see the lights of preys. This could mean counter strategies from the predators.
@@arpita1shrivas definitely, but as I said, if you just add communication output and input nodes, you don't have to do anything else and the neural net will figure out the best way to use the communication. I like the idea of having different color output and input nodes for more complex communication.
for prey communication you could give the prey a new ability to give a pheromone (a float between 0-1) and a new sense that averages the pheromone of all prey in a certain range. I hypothesize you'll see a few things from this. 1.) groups will form with "languages" will form where the group has begun to communicate and respond to communication and react to predators more effectively. 2.) when prey from other populations are introduced into new populations they respond in unexpected ways because they don't understand the group "language" 3.) if and when large populations of prey intermingle causes erratic behavior until population collapse eventually one language strategy remains
@@PastaSenpai incorrect. In terms of programming it is not to complicated to implement it's only adding one input node to the ai and the implementation is infinitesimal in difficulty compared to implementing an AI at all. In terms of complexity at runtime it could be as much as O(n^2) at most and that is being very conservative I'm confident it could be done practically nearly at O(n).
Nice work! This is a pretty cool example of a nonreciprocal phase transition. The transformation from scattering loop behavior of the predators to the steady "scanning for prey" state at the end is a great illustration of patterns that appear from basic local instructions. If you're interested, I'd recommend looking up flocking models for examples of other interesting predator-prey relationships.
I think the aggressive predators evolved in the top left at first which moved the whole prey blob over to the bottom and then top right (by going over the edge). After that blob got eaten up some of the predators can be seen going towards the other blob, after which there was the huge spike in predator population. It can be seen quite clearly in the timelapse at around 26:35 - 27:00
It looks like it perfectly balanced out a ecosystem where food and population can sustain them forever. This thing found balance like nature. what it could accomplish for humanity in a century are astounding and frightening.
It is lovely. The patterns underneath are particle, en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations?wprov=sfla1 But I was wondering what change would be needed to the model to give an advantage to waves and flocking? Maybe a cost to hunting at speed, or for information overload? A cheetah can run very fast (but only for a short distance) and can be confused by herds splitting in different directions.
Amazing! Adding female and male dynamics as well as resources for survival (food and water) would be really interesting too. You’d have to spread them much further out for the latter I think though.
I think the “big change” that happened was a combination of the best of the more well adapted predators from the northern group finding the center group, combined with the center group’s relatively unadapted and defenseless prey that resulted in very aggressive and effective formations for the predators
I like all the suggestions for colors, pheromones, grass values etc, and those are all things I thought about suggesting myself. However, one extremely simple addition would be adding current energy level as an input node -- it's a bit strange that animals dont know how hungry they are, and that would be extremely easy to implement.
That would definitely enable more intelligent schemes to keep individuals alive. As it is, they allow themselves to die off in those giant waves. It would be cool to see if a species evolved that tries to keep the individuals alive.
The predators seemed to learn that stacking on top of each other instead of roaming aimlessly caused them to basically "one shot" prey, causing basically no chance to fight back on the preys side
Very interesting showcase of simulated evolution! The way the predators began to bunch up together and wipe the entire map around 20:45 reminded me of something out of World War Z
It would be really interesting to see a simulation where the predator also have a predator. So there are 3 groups. Seeing how the pray adapts to both avoiding predators and attacking prey would be intesting
I was thinking similarly.. 3 faction in a ROCK-PAPER-SCISSOR balance... ( or even 5 factions with the additional LIZARD-SPOCK, for those that get the reference)
My theory of what the predators started to do was tiny halve circles creating flanks inside the front line of the prey. This creates little gaps on the resistant force making the front like a fluid of force instead of a straight line. Also, it reminds me how a paper burn after you light 1 corner. Another thing I noticed is tiny little blitzkrieg. It combines so many strategies and tactics at once it is beautiful. Thanks for the video I had no idea I needed. I love it. keep it up.
An excellent video. (4:38) For those interested, this is the most concise explanation of "Tragedy of the Commons" that I've ever heard. When resources are not properly managed, the users go extinct.
Very cool. Would be interesting to add a small hue change to the prey and predator as they take more damage. That way you can further analyse the strategy being used
Awesome work! An idea, if I may: perhaps preys could have to seek food too. Maybe each cell of the map could have a "grass" value that increases (or, should I say, "grows") over time. When a prey enters a cell, it eats some or all of the available grass and thus increases its energy, much like predators do when they eat a prey. That would force preys to move and would also naturally cap their number, without the need for a hard population cap.
Or there could be a different type of creature that can't move and is eaten by the prey, and that type of creatures reproduces by launching seeds that the predators could learn to spread, therefore increasing their prey supply
Amazing video! I’d love to see two new behavior facets: One - recognition of when a fellow Prey or Predator is a “relative” of you; something like knowing whether the Predator or Prey next to you has a common ancestor two or so generations back. I’d be curious to see if Prey group up less with those who aren’t “family” or if Predators would consider non-related Predators competition. Two: “Grass” for the Prey. The prey passively have more energy than the Predators, but it would be interesting to require them to eat another resource, which could lead to some migration or even defending resources. In addition, it would be cool if “Grass” randomly grew everywhere, but would generate at a higher pace wherever a Predator died. This could create very interesting feedback loops where Predators who overeat Prey to “extinction” would ultimately bring more Prey back into the area, avoiding the inevitable “clumping” or the interesting (if semi-boring) “rake” behavior we saw towards the end. I would love to see what else you come up with! Keep doing good work!
About one, them being relatives or not makes no difference for survival so i don't think they would naturally evolve that trait. Perhaps the creator would need to manually insert that into them
@@hello-hb1ll makes no difference for their survival, but could help their relatives survive thus making altruism a beneficial gene, as the gene replicates.
I’m going to go off on a limb and say that prey will actually group up with more distant relatives, to ensure that if one dies the others will not. This has little benefit, but it seems grouping up with relatives will have very little benefit if they can’t defend themselves. Edit: Such a behaviour would also prevent clumping, meaning if one hit the jackpot and reproduced without predation for a short timespan, it would split up and not have most of its genes become defunct mutant individuals.
If the prey (or predators) can recognize more related creatures, they might be able to be more confident in how the other creatures will behave and work better in groups. For example, it might make warning calls usable. A small group that figures out how to use warning calls can ignore less related creatures.
You should introduce a third variable, a blob (maybe blue) that hunts both predator and prey, this way, the red blob will have to adapt to being both hunter and the hunted, this would be an interesting food chain simulation I think.
Seeing the herd/group behavior emerge was extremely satisfying, nice job as always! I don't really know anything about AI but I would be really interesting to see the neural network "rendered" out to code to see the exact strategy that the entities are using. It might end up just looking like gibberish though lol.
Well technically you can't directly convert neural networks into code but for small networks like the one presented in the video you possibly can get the equations that the network has converged to . Mind me I am not good at explaining things but neural networks at their essence are a bunch of equations and what is actually learned are the coefficients. Hope this makes sense.
@@khengari77 I'm aware of what neural networks are and if you want to be very technical about it, yes ANY neural network could theoretically be converted to code. Just think about Turing completeness and it's enough to prove that it's possible
@@AngeTheGreat Man, I should have thought twice before replying. Anyways your videos are awesome and they came just at the right time . I have my graduation project and I need to do some simulations and your videos were very inspiring.
This is fascinating. I would sugest for the future to add some "neutral" entities (trees) that can not interact with prey or predator, but that serve as places to hide behind, and maybe as shelter for a reservoir of prey to reproduce more safely. Also for prey maybe to have 4 stages of life: Young (only 1 HP, , can't reproduce) Adult 1 and adult 2 (Can reproduce, full speed, full HP) and Old (Half HP, Half movement, can reproduce)
Worth the wait! There's definitely some interesting emergent behavior here. Wow the "wavefront" behavior was really cool! A couple of things I thought about: - Could you offload some frame computations to the GPU to improve frame time? - What if the entities had two dimensional size and didn't want to occupy the same space as other entities? You almost certainly couldn't do this without improving frame time before, but maybe some rules similar to components of Boids. - It would be cool to show a total count for each group on the graphs. - You probably did this already, but create a way to serialize the simulation state so it can be resumed. Include separation of the ruleset from the state plus definable migration for incompatible differences so that you could resume a simulation under a different ruleset. - Show average offspring count, average kills and average lifespan in ticks for each entity type. Some other really good ideas in the comments! You've got a lot to sift through. Looking forward to more!
Is the Boids suggestion inspired by the bibites’ usage of the boids system? Because bibites seemed to use boids for asocial behaviour to prevent viruses, and because being too close to eachother would cause them to deal damage. Here, though, Seperation would probably be ramped down where Cohesion would be ramped up, merely using it for even more extreme pack hunting.
The best thing to do here, to improve upon the rake behaviour rather than removing it, would be to add obstacles that can be detected and not moved through, and add a “fertility” mechanic where prey would get slowed increase of energy when moving over a recently moved over patch of ground, but the fertility of ground would slowly increase back to full. These two properly implemented, I predict, would result in rake behaviour developing slower (since the dominant prey-blobs the early grouper predators developed for would not arise), and prey getting the opportunity to go through gaps in the predator line made by obstacles, getting higher fertility land temporarily.
One thing that might encourage prey to evolve pack behaviors is giving them the ability to make warning calls that other prey can hear regardless of which way they’re facing, provided they’re close enough. Having others help look out for danger is a huge driver in pack behavior on earth Edit: ah, I didn’t watch all the way through before posting this. Maybe a good way would be to have a single “ear” input node and a “voice” output node. All prey within voice units of a given prey get sqrt(distance*voice) added to their ear input each frame. If there’s lag issues, this voice output could be evaluated on a random 50% of the population each frame. I’ve had success with that random evaluation method in the past. It may also be interesting to have different patches of the world provide greater benefit to prey at different times, migration patterns might arise that way. As well, having obstacles may lead to some interesting behavior.
Absolutely fascinating work. If you're trying to let prey communicate, I think you already have the tools for it. You were able to assign integer values to predator, prey, and neutral blobs, considering you aren't utilizing neutral blobs, you could give prey the action to switch between two states, 0 and 1. Being able to see each other in multiple states would allow the blobs to express a situation and react to a neighbor blob's situation.
I think adding pheromones would be an interesting fix to the comunication issue, letting them generate what chemical formula (16-bit integer) they give the pheromones. creating a pheromone would cost quite a lot of energy but 16-bits lets them share quite a bit of information with each other! I imagine after letting them simulate for a while you would start to see them using the pheromones to coordinate attacks or possibly to warn others about on-coming attacks :D I hit the bell icon and you should too!
16 bits seems like a lot, especially if you wind up using a single bit to encode positive/negative messaging, and the other 15 for various common situations. It also opens the door for organisms to 'misunderstand' the instructions, or even intercepting the other side's scent signals, much like how Toxoplasma Gondii rewires the mind of mice to be attracted to feline scents, rather than repulsed. Of course, if he's going to add that, he might as well go full-bore and rework reproduction too, adding gender and requiring a pair to breed and mixing the parents' neural nets as well as some variance.
En tant qu'étudiante en informatique en fin de cycle, je commence à toucher à l'IA et c'est une matière on ne peux plus fascinante. C'était les 30 minutes les plus satisfaisantes de mon année, merci beaucoup
this is so cool. i have some suggestions: 1) possible communication implementation: give the creatures two more action options. a value they can turn on and off, and an options to share that value. 2) have the duplication rate be effected by the number of pray, symulating a foodsorce like plants that is limited. 3) implement young, when a creature splits, the new creature is smaller for a few seconds 4) give the creatures a new input, how close they are to spliting. don't know how possible this is or if its evena part of the scope of your experiments.
I think what happened with that final prey blob was that the predators must have breached some kind of "critical line", possibly through luck or some of them happened to grow bolder at a key moment. All the prey on the edge of the blob had adapted to defending against the predators, keeping the inside of the blob safe. As a result, the prey on the inside of the blob faced barely any selection pressure, especially considering most of them hadn't been able to even _see_ any predators, and thus what would be inferior adaptations for the front line were able to thrive in safety anyway. When the efficient predators reached them, the prey didn't put up nearly as much of a fight, allowing the predators to swarm them, leading to a snowball effect where the predators reproduced even more quickly and could create an even denser front line to wipe the prey even faster. Afterwards, once the prey population finally fell below the cap, all the stragglers who had never been part of a protective herd were allowed to reproduce, meaning the massive walls of predators were finally able to find more food once their main source of it was gone. Interesting how the simulation finally seemed to become stable once the prey was _less_ effective at fighting back. Instead of one big stationary defensive group, the prey collective adopted a strategy of just "migrating" away from where the predators were.
An idea I just had would be to give both sides a way to communicate. Each predator and prey has a third output neuron for color, and they can also see the color of whatever being is in their view, so each viewline neuron would also have a color neuron. This might lead to some interesting pack movement where prey that are in danger signal to the other prey that there’s danger nearby with their color, and predators could signal where there’s food, and in any case it could lead to some beautiful images when zoomed out. You could even add *three* output neurons for RGB values, which could lead to something crazy.
I'm so curious why the front of predators towards the end were aligning with the grid, I bet there's some interesting math behind that, probably somehow related to the periodic domain. This really reminds me of simulations I used to do for propagating flames! It's so cool to see the same process show up in a totally different context. Really awesome video as always
It's because the diagonal is longer than the horizontal or vertical, so they settled into the lowest energy state. They could have just as easily gone left/right, but going diagonal with that strategy will always eventually decay into an up/down or left/right wave, at least once the ends of the wave loop around the map and meet.
It because, only the predators that eat the preys survive and those that stay behind starve. The preys just takes over the place and it goes on and on.
Khatharr is 100% right here, it's because the shortest, straight line here has the least energy (not energy as in simulation energy, but some abstract quantity that will tend towards a minima). If you wanted to actually go through the maths to work it out yourself, then you could use the Euler Lagrange equations and principle of least action to show that the straight line has the least cost. To explain it more intuitively, imagine some loop in this space (it's a little annoying to think about in this particular case since the space is a torus I think but point still mostly holds). Then, imagine some kink in this loop. This kink is going to have a higher ratio of predators : prey at that point compared to unkinked sections, and therefore it's going to tend to recede. If you keep having these kinks suppressed over and over, eventually your loop will settle towards its minimum length, i.e. path of least action if you want to use the mathematical phrasing. It's the *exact* same reason for why in world war 1 and 2 these huge salients would tend to collapse down back into more simplistic lines. It was obviously muddied there as there were things like terrain, supplies and so on to change the cost of any particular shape, but the principle holds. Super interesting maths, I was really impressed at the simulation when I spotted it!
I think an idea that could result into interesting formations would be the direction of strike: the prey blobs could do 1X damage if attacked from the front, 0.5X if attacked from the sides and 0.25X if attacked from the back
25:10 they found the perfect way to co-exist. Predators could win vs the preys but evertime they were to aggressive they went close to extinct. With this moving strategy they keep preys alive while surviving on their own. Very impressive!
I love these simulations so much because it really shows how the AI is like real animals. First, they just hunt to eat, and prey tended to stick together to see all around them, but when prey were able to fight back, predators started to hunt in packs. Edit: this also shows the relations between prey and predator populations in the real world When prey pop is high, pref pop is high. When prey pop is low, pred pop is loe
i think the aggressive strain that devours its prey at 26:35 is the one that goes on to devour the one in the corners and finally the big one that almost beats back the predators. you can literally see the swarm move from one prey to the next
Here's some ideas: Genetic relatedness: give entities a heritable color attribute and make it evolve slowly. Also add entity color data as input neurons (including self color). Entities can then learn to recognize their same-colored "brothers" and behave differently (aggressively or xenophobically) toward differently colored entities. Add an altruism behavior to the output neurons (give a portion of self energy to a nearby entity). Maybe add an input neuron indicating how "hungry" nearby entities are. Ranged attack: I know this one might not sound interesting, but I'll bet it would produce the most surprising results. (Fun fact to ponder: Homo sapiens is the only land mammal to use projectile weapons and the only eusocial marine animal is the pistol shrimp which uses cavitation bullets to stun its prey.) Basically just give entities a heritable attack range (shorter than vision range of course). If you implement both of these features, I'll bet you'll get really interesting "social" behavior out of them!
Isn't the "friend" vs "foe" the same as "one color" vs "some other color" to the network? It knows nothing about the difference in the beginning either way.
@@skaramicke No, because the color isn't allowed to evolve. Thus two entities of the same color have no way of knowing how distantly related they are (how many generations back until they share a common ancestor). That information turns out to be crucial to the development of altruistic behaviors in real life organisms.
A cool idea would be to add terrain so we could see if the AI can develop guerilla/ambush tactics. Like rivers, which are slow to cross so you can wait on the other side for the prey, bolders that must be avoided, Tall grass to hide in so that the predators must really hunt for them, berry fields in which the prey multiplies twice as fast so eventually the predator can spawn camp, high ground from which you can see hiding bots and the entire map etc.
THIS WAS BEYOND AMAZING!!! ❤ This is genuinely the most interesting thing I’ve seen in years on UA-cam. I watched every second of this and rewound many times 😂 You earned a new subscriber in me!
Evolution simulations are awesome. There’s also one about rudimentary geometrical ‘animals’ learning to walk in order to outrun one another. (Simple selection by the fastest 10% or so.)
@@MensHominis oh I know, those are very cool too. I know paleontologists have used those walking sims to model dinosaur skeletons to see the most likely way certain dinosaurs and other animals walked. Technology is soooo cool. I can still remember my first computer when I was 3 was a Macintosh with a black and white monitor when I was 3 years old in 1992. God how far we have come in such a short time blows me away
I think we should: 1) introduce obstacles such as rivers, with fords, forests, tall grass and reliefs. logic: -the reds could not cross the river, except through the fords. -reds hide in the tall grass to get close to their prey without being noticed. they should have a penalty of narrower vision, but an increase in hearing to perceive prey (i.e. 4 cardinal sensors with rays). reds in the forests should slow down their speed, while conserving their energy. reds can sprint 2x faster, but can't hold it for long Greens can cross the river, but consume 2% of energy due to the density of the fluid. greens can hide from predators in tall grass to escape them. they would have a visual impairment, but an increase in hearing. they have a reward for reproducing. greens in forests should have a premium for food and reproduction. greens are more resistant when running thanks to their stamina, escaping from predators more easily. the food runs out and the greens have to wander around the map looking for it. so you should introduce a food as a resource that spawns according to natural logic. the greener in the area, the sooner the food runs out in the area. you could make the food blue. you should introduce a sensor that is smelled by the agents at a certain distance... so that the closer they get, the more the smell increases. so the blues would wander less randomly and the reds could smell the carcasses. you should also introduce carcass logic... the greens starving, disappear after "x" time becoming a darker green or until they are eaten from predators.
This is fascinating! I was wondering if there was a way you could make the predator's "farm" prey. I noticed in the beginning, many packs of predators would die off because they killed off all the prey in the group they were attacking. Maybe if you added something like a mercy system, where there's a possibility that a predator can choose to spare a prey's life, as well as the ability for predators to count how many prey is in their view, then maybe those predator's which evolved to show mercy more often when there were fewer prey would survive for more generations.
My thought upon seeing the stable dynamic that emerged in the end was that it was a kind of "domestication" of the prey. Even though there is no communication, the local packs that form during evolution will often be "like-minded" due to local reproduction, and will also likely be collectively "punished" for showing too much greediness.
Excellent video! I believe strigmergy (substrate-based communication) could be a great candidate to get optimized communication between the agents of your simulation. Moreover, by letting agents deposit different substrates/react differently to those, the neural network could probably come up with many different strategies and could have quite some room to evolve in different directions.
That final simulation, the first time watching it, I thought it was a bit of a shame that the predators from the corner group overhunted and then starved off without being able to share what they'd learned. But then in the timelapse, you can see some of those efficient predators being "thrown" towards the remaining prey colony, and it was only when those arrived that that final colony started getting demolished! Fascinating to watch how such simple systems lead to such complex interactions
It would also be interesting to see what the damage done by each group (or average damage per prey or predator per time window) and how it changes over time.
Another idea for the prey to attack the predator is to create a "danger zone" where the prey can attack the predator (for example it will always attack from the front, but the sides and back are harmless, like with antlers on a deer). This might create some very interesting behavior where a bunch of predators will attack in a group from different sides (like wolves). You would probably have to add another input neuron tho with a direction per ray.
Its quite beautifull how the concept of evolution gets so close to just raw logic, as in you can argue in these evolutionary terms for the existence of everything. Also nice how we see Lotka-Volterra so clearly.
18:59 it's kind of interesting to see that that blob of prey has remained intact for so log at that point that the ones in the center are barely moving.
Excellente vidéo ! Le projet est très intéressant et les explications sont claires. Ça serait très intéressant d'avoir une vidéo du style "code review" ainsi que des informations techniques qui sont derrières tout ça (sur la machine qui fait tourner la simulation, sur le langage de programation, les librairies,...)
You should add a third group, a passive omnivore type. Years ago when I played around with a very primitive evolution sim I always ended up with deadlocks at best with pred and prey scenarios. Added in a third group that were equally dangerous to both but had a slower reproduction rate and less aggressive, truly interesting things started to happen and rarely the same situation twice. I would love to see it done with neural networking instead of simple switches.
I agree, prey need to be prey to something else. Maybe a few blobs where some are prey to others but predators to others. Like a rock-paper-scissors game/laws!
It'd be interesting to see each predator/prey have a distinct color coded by a gene that could randomly change slightly per reproduction. That would offer more insight into the different genetic lineages.
Absolutely beautiful work! It was strangely satisfying watching how predator, after finishing a large group of prey, also tend to vanish, leaving nothing in the end.
It's interesting how the prey cap seemed to play an important role in the simulation- when there was one big preyblob left, it seemed to have all of the prey in it, so no other prey could really reproduce, but when the predators were able to start breaking up that blob, the prey population suddenly exploded over the whole rest of the map
Yeah I think he should introduce a more natural way to keep the population down, so that ideally the hard cap doesn't get reached at all
this!
Yeah, the hard cap was a huge problem, the prey population stayed at the maximum for almost the entire thing, and never dropped especially low. I’m assuming that computer resources are the limiting factor, and a smaller map with a similar cap might help.
@@thiccityd9773 one could improve the cost of living depending on the amount of beings of the same kind.
So when there are a lot of prey, they need more energy to reproduce. Theoretically, they could get an unlimited amount of beings. However, they won't as reproducing gets more and more expensive.
On the other side, Predators consume more energy, when there are already a lot of them. This should too result in a soft cap.
Hard-coded maxima seem to have some problems
yeah this occurred to me too, i think this observation could be merged with the observation about "plants" as a source of prey energy and reproduction to allow plant growth and replenishment to serve as a more natural "cap" for prey
My theory at 19:40 is that over time, as the prey in the center replicated, they slowly lost some of their evolutionary traits that helped them avoid/eliminate predators; there wasn't any evolutionary pressure to keep those traits because they were relatively well protected by the prey on the borders. So, when the border prey were killed, it left the center more vulnerable.
I think that another factor is that some of the predators from the corner blob with the clustering strategy found their way over to the center blob where the strategy worked very well
In other words an easy life made them lazy
i also wonder if there was a "critical mass/density" that they hit
so they turned into dodos
Pray that attacks gets killed first as they are at the frontline. Pray that stays back has time to reproduce. Even if group has power to defend, individuals don't have incentive to do that.
I think what happened at 19:20 is that after the collapse of the Corner Prey Blob, some predators managed to migrate to the Center Prey Blob, where the prey weren't adapted to deal with the corner predators' aggressive strategies. The corner prey had evolved alongside them, so they were better adapted to deal with them, but the center prey were by that point probably a totally different species, who didn't have the traits necessary to defend against the corner predators. I'm guessing the center predators also quickly went extinct when the corner predators started expanding, but that was something we couldn't see, because they looked the same. In other words, the Center Blob had a relatively balanced ecosystem, which got destroyed by an invasive species, and then a new balanced ecosystem emerged (the scanner ecosystem).
I agree with your theory and as such think it would be a cool addition to assign color coding to "genes" or values of the entities that are mixed in some way and rendered as their body color. That way we could start to see groups of species with similar traits visualized separately. The stronger the divergence in values/tactics, the greater the differentiation of color.
Spearheads and Flanking
i disagree entirely.. the issue was the population cap, the prey was at cap for most of the simulation, and as such even a colony that should have been fine, holding its own against the predators wasnt able to reproduce at certain moments, and instead, prey in the middle of the map or in another colony reproduced, and every time that happened, the predators gained an advantage, as each of their packs never decreased in size (enough of the predators roamed the empty space and died, so the predators reproduced and were immediately attacking where it counted) at least until the colony was wiped out.. the only time the prey population dipped, was when the predators started chewing into the last blob colony, it was essentially all the prey concentrated into one spot, with a few random stragglers out and about.. the colony was able to sustain its reproduction, because all of the new prey were going tot hat colony.. until enough of the roaming predators died off, and it became all of the predators attacking all of the prey in a single point, and the predators have a 2x advantage in an equal fight, and that eventually lead to the reproduction rate of the prey to fall behind the consumption rate of the predators.. luckily at this point enough of the roaming prey managed to reproduce enough to self sustain, but then the colony disappeared, and it became a slow wave of propagation and death
Solution? totally uncap the predator population.. and cap the prey population to a multiple of the predator population (otherwise the prey will just fill the screen killing the predators) this will allow the prey to not be 'at cap' most of the time, and if a colony gets surrounded, that colony will die out, but it will allow other colonies to explode in population (because the predators exploded in population)
Yea thats exactly my guess too. I mean theres even a unique "biome" in the centre blob full of immobile prey.
@@tears_of_asariel3198 Well that explains the corner prey's demise, but still it seemed that the centre blob was full of stationary non-moving prey adapted to live within the safety of the blob.
A critical mechanism for prey that seems to be missing is food source. There is no incentive for prey to NOT clump together and stay in one place. Would be interesting to model something like grassland food per grid square, being depleted over time depending on number of prey occupying that square.
Yes! Even better if the food source coevolves with the prey, just like in Huegene. That way patches of different colors would naturally emerge, possibly creating different niches and boosting speciation. Might be even more interesting if the predator's prey color preference also coevolves at the same time with the prey color
We can assume they live in a nourishing substrate. But it would be good not to cap max number of pray but max number of pray in certain area. Or maybe chance to reproduce depending on number of pray in the vicinity.
Also 4 hits to neutralize a predator is too much IMO. Better predator eat pray in one hit but pray deactivates predator in 2. Or randomly with some chance e.g. 50% or 30%.
Could be interesting to explore the idea of predators eating predators too.
@@akostadinov but with that instakill, would there be incentive to hunt together? What about 3 to 2 damage ratio?
@@revimfadli4666 as far as I understand, there is no incentive of cells to survive. It just so happens that those which are more capable to "survive" stay "alive". Which is a fascinating mechanism if you ask me.
I think those sticking together will survive more, otherwise they will be eliminated by the other kind quickly.
But I'd like to have the source code and play with it. I don't know if that's available or not.
@@akostadinov by incentive I meant something to "reward" and differentiate cells which are more "capable", through different effects from the environment in response to their actions. Making prey take 2 damage to kill is an example, as predators that happen to pack hunt would have less risk of being killed by their prey, while also kill said prey faster, and thus they would be more "capable" and tend to "survive" better. Similarly, giving prey a fighting chance would "reward" ones that pack together since they have a chance to kill incoming predators, thus increasing "survival" rate and their "capability"
This man doesn't get enough credit for this, absolutely epic simulation. I thought it was interesting how the predators that found the 'wall ramming' technique first also died out first because they killed their prey very quickly
That second point was true until the predators got down to that last colony. If you watch closely, you can see a small few groups from the second to last colony survive a journey to find the last colony. That trait that allowed them to efficiently kill a colony _AND_ find the last colony got replicated, which seemed to aid in the creation of the stable "scanner" ending.
E
E
It's hard to be sure. But if they had enough mobility, odds are that just a few of those original predators managed to make it to another colony, and ended up taking over that prey genepool because the originals just couldn't compete with them.
You would love the bibites!
I love how the simulation found a balance at the end with the never ending line wave. Kinda reminded me of a refresh rate
Yeah that was really cool, you could see how it became almost a migratory pattern with the predators following them and the roving front of prey killing off straggling predators.
Homeostasis
Like a wave in the ocean
It mimics how ecosystems work which is quite interesting.
It seemed like an ecosystem was developed if too many predators ate too many prey it's ultimately self destructive and eventually there would be no food left to eat and that's why at the end they formed a single migratory line allowing the prey to reproduce behind them and the cycle repeats
I like the fact that even not having a way to communicate with each other, the predators were able to create formations and even turn the phalanx to flank the pray mass
That’s exactly how our ancestors developed communication as well. I can’t wait to see what kinda simulations we’ll have on UA-cam in 20 years 🤯
Another think I noticed is that the predators didn't just rush the enemy, they advanced slowly enough that their frontline didn't thin out. The only problem the predators had was if they chased a prey behind them they lost sight of the frontline, but then again, the scanner strategy is kind of like a circle of life.
Technically they do have a way to communicate: position and vision
you dont need communication when evryone thinks the same
Emergence man, by combining simple actions that result from simple inputs, it’s possible for large groups of relatively dumb things to accomplish great things. Stuff like ant colonies.
19:23 I think it could be a case of the prey changing, not the predator. The prey in the middle of the blob were sheltered from predators for a very long time, so they didn’t get a chance to evolve accordingly. When the predators broke through the first strong layer, they were visited with a bunch of under-evolved prey that they could easily eat
strong monke make good banana make weak monke make few banana
IT was the gigachad preds from the north who came over and stuck it to those lazy midlanders.
E
@@EEEEEEEE F
That is an excellent point, if that's the case then there's an element of evolutionary complaicency involved.
I have a couple of ideas:
1. Instead of keeping the prey stuck with a short range of vision but a wide field of view, and the predators a long range of vision but a narrow field of view, both kinds of entities should have an "eye shape" gene where vision range and field of view are inversely proportional to one another.
2. Have a third kind of entity, "plants", which are eyeless blobs that can't move on their own, but stay still and multiply if kept alive for long enough (Prey don't do this anymore - their reproduction is based on how any "plants" they've eaten, like predators). They're eaten by prey, and while predators can't eat them, they can push them around (maybe they can develop weird strategies around this, like a wave of predators carrying some plants around to attract prey).
And add water location who are safe zones ... Here is so many potentials
this would be so awesome
I was thinking about plants too
Plants would be good but there is a saying: If they have eyes on the sides they hide (eyes on the side means they have wide but short view and hide means prey) and if they have eyes in front they hunt (front meaning long but short view and hunt meaning prey)
@@eyallevin6302 plenty of predators have/had eyes on the sides of their heads, though - for instance, fish, whales, possibly crocodiles depending how you count it, and many theropod dinosaurs.
prey animals with forward-facing eyes are a bit rarer, but they do exist - they just tend to be animals with more need for good depth perception than a wide field of view (so, you'd be most likely to find this in arboreal animals - some monkeys, for example, are small enough to be prey to many other animals, but still have forward-facing eyes)
I love how the simulation literaly balanced itself into maximizing the amount of entities
E
"literally"
Yes-at the end, the predators were essentially “farming” prey. By bunching up into one front, predators eat nearly all the prey, then allow them to grow back until the exact right amount of time has passed for them to be in maximum abundance before eating them again.
Mhm. Nature also ends up maximizing life of both predator and prey in stable ecosystems.
I liked how early in the simulation the prey population split into distinct specialized herd/group defense and soitary-dodging populations.
Yeah, could be interessting to diversifiy prey species.
@@Ardias59I think a interesting thing would be cool for the fov and the range to be changeable with evolutions, that would creat a ton of different strategies
I'm definitely a solitary dodger.
The reason why the giant blob might have been decimated by the predators could be the prey's in the middle getting too comfortable in their safe spot. Which meant there was more room for weaker creatures to breed, making the warrior prey die off and the weaker prey survive. Which ended up benefiting the predators since they became easier to kill. Changing the whole ecosystem
Just like real life.
no, the predators had an inherent advantage with more health, so once the predators learned how to take less damage while dealing damage via battle formations, there was nothing the prey could do. then, just like Alexander the Great, the predators rolled up the flanks and got a double envelopment, which enabled the predators to functionally outnumber the prey in zones of combat. i dont think its anything to do with degeneration, the predators simply solved warfare, as the title suggests (phalanx, an ancient military formation).
@fisheryboi835 the good times weak men works EXACTLY like that. You're over thinking. Some stuff in life is just that simple.
@fisheryboi835 cope, boy.
@fisheryboi835well yes and no. Bad times temper people, good times soften them. Most of social progress happen in good times built by good men which get those emotional stability from firsthand or secondhand experience of bad times (someone who experience bad times and become a good men often raise good men as well). Once stability pass, comes stagnation where good man are slowly replaced by bad man and bad times comes long after.
Why social progress didn't happen during bad times? Because the good man is busy fixing the ill in society rather than progressing forward. This is in timescale of century mind you.
This is truly fascinating, seeing the AI learn to behave in a similar manner to real life animals and then ultimately evolve into a shield wall is so surreal to me. Loved the editing and music, nice job. I'll be eagerly waiting for more.
I was going to make a joke about how the predators are going to evolve to the point where they're going to farm the prey... Until they started farming the prey
It's eerily similar to herds of large animals migrating across the land, followed closely by a massive pack of predators.
Finally we can imagine that the simulation is close to the source code of life. It uses the same approach mechanism and represents perhaps a form of answer to : what is life.
This is the first thought that comes to my mind.
Lots of ideas:
1) I think that a good way for prey to communicate would be pheromones.
The prey will be able to produce and sense pheromones as a response to stimuli such as 'i see lots of predators' which would allow for complex behaviours and strategies. Maybe predators could also use pheromones, possibly even sense the preys' pheromones which would allow for even more complexity.
Also there could be multiple different pheromones, for example red blue and green, which the prey could evolve to signal different things.
How pheromones could be implemented in the simulation:
Particle Approach:
Upon stimulation, prey will release pheromone particles which other prey could see or smell.
The number of particles they can sense will be proportional to the activation of the sensing neurone.
Pros:
Easier to code i think.
Works with infinite number of pheromones
Cons:
Seems quite cpu intensive, as a lot more raycasting will be needed to see the particles.
Image approach:
Rather than the pheromone particles being an entity in the simulation, they will instead be represented by an image that overlays the whole simulation area. The RGB channels of the image can be used to represent different pheromones.
Upon stimulation, the prey change the RGB values of the image at its position. For example if the coordinates of the prey are 20, 30 and it releases a red pheromone, it will increase the red value the pixels at or around 20, 30.
Diffusion and dissipation of pheromones over time can be simulated by simply blurring and dimming the image every frame.
To sense the pheromones, the prey would simply check the color at its coordinates, or take an average of the surrounding pixels.
Pros:
Runs a lot faster because its just performing basic operations to an image.
The can be low resolution and still have full functionality.
I think it would look cool to have the image as the background of the simulation.
Cons:
Complicated and harder to code,
Only works for 4 types of pheromones, red blue green and alpha
2) Colors:
Each entity will have a color gene that affects its appearance.
This could be purely cosmetic, and show genetic drift as the entities mutate, which will allow us to distinguish between entities with different genes.
Possibly, the entities would be able to see the color of other entities. This might lead to interesting behaviours, such as xenophobia ( prey preferring to group with prey with similar color because similarity=relatedness and grouping with related entities would help preserve its genes).
Another possibility is that the color similarity of entities it sees will replace the 'object type' input, however this may encourage mimicry; predators to evolve a similar color to the prey so that the prey cannot distinguish it from other prey or vice versa which is quite OP but sure is interesting.
3) Eyesight gene:
A gene that both increases vision range and decreases field of view, allowing these traits to evolve over time rather than being set at the start of the simulation.
4) More layers in neural network:
The current neural networks appears to only have 2 layers.
Adding more layers of neurones will greatly increase behaviour complexity, at the cost of performance.
E
YES
5) Memory:
the ability to remember the approximate location of reds or greens, but it gets fuzzy and is eventually forgotten at the 15 second mark.
The only idea I have is mimicry. The prey can disguise as a predator to not get eaten while the predator can disguise as prey to keel them secretly
honestly pheromones would be too much of an advantage and lower the amount of evolution in them. but even a simple pheromone concept would make prey not be able to stay still or group up without major issues xD
This simulation has an infinite number of possibilities. I've seen several proposed changes, but I believe the most interesting are adding plants that prey must eat to survive and sexual reproduction to reproduce. The males would be a little darker than the females and the females could not move for a few seconds to give birth. This could cause females and males to have two different roles and force them to stay in groups. I also saw several that wanted prey and predators to communicate with each other, but I think it would become too chaotic and prevent any group from creating.
The fact he needed to realize that for herding they need to be able to self defend and the rare commentary makes me really dislike this video. "Self learning AI" videos are all so lazy nowadays, just the same thing done by lazy hacks over and over, and youtube force feeds you them even when you click something else a dozen times.
@@no3ironman11100 Could you offer examples of not lazy self learning AI videos?
@@ruolbu Not having the video be like "oh I realized that the carnivores need to be able to see eachother to develop pack dynamics" level of bullshit. I've seen dozens of these videos and it's always this low quality. I want someone to pop up something genius, something outside normal scope, but it's always the same thing pretending to be original content. SERIOUSLY google about AI learning with herbive/carnivores or whatever the hell, Do it now. You'll see what I mean.
@@no3ironman11100 no I mean your sentence that said "these videos are all so lazy nowadays", implying there where better videos in the past, and im curious what these were.
@@no3ironman11100 yeah I know what you mean, basic common sense shit that anyone would've thought of.
"oh I wonder why my ai is basic and isn't developing any interesting strategies?"
Me: Maybe because you aren't giving it enough reason to do so or the correct information ya dodo bird, JESUS FUCKIN CHRIST!
Not to mention this predator vs prey sh*t is getting old sure it's interesting but can we move on to more complex stuff, hell i dunno like army vs army?!! Literally anything else, is there no creativity on youtube?!!!
the timelapse at the end was incredibly satisfying, i find the movements really beautiful !
There are so many cool directions this could take! Prey could experience two states- a "calm" state where they reproduce faster, and an "agitated" state where they move faster. Prey could learn to recognize the state of other prey. You could add cover- places in which prey could hide which are energetically expensive for predators to destroy. You could give each entity an "energy level" and monitor the trophic dynamics of the system. Excited to see what's next!
Great idea about the cover-places. My feedback would be to widen the cone of detection rays so predators and prey could be more aware of other entities to their sides (or behind?), but more significantly, stop the edge-warping in the model. The final display of the "rake" by the predators seemed false as the prey were respawning "under" the wave for the next wave to wash through the map - this would be very different if the edge of the simulation reflected real-world environment limitations (cliffs, coast etc). So, sure, the predation wave would be devastating, but then you're left with a swarm of hungry predators with nothing to eat.
@@Aegilops the looping map was done because the small size of the whole thing and movement speed. It sounded like with the very first simulation corner deathblobing kept happening. So for an effective sim that way a "round" map would be necessary to prevent corner deathbolbs, then from there add terrain features to see how that impacts development
I wonder if the defensive strategy might learn to flash agitated to call allies to the line, but then go back to "calm" even on the defensive. If they are holding the line, reproduction speed might be more useful than speed.
It might also be useful to have a way for prey to send an alert that other agents can detect, even if it isn't in their cone of vision to symbolize a distress call. This could cause nearby prey to either run or prepare for combat. Prey might not bother with the alert so that unaware prey may distract the predator chasing them, but the distress call strategy could indirectly aid in the survival of the behavioral trait if close relative (who are more likely to share the trait) survive because of it. This is a rather complex behavior to learn, however.
I wonder if having a way to recognize their close relatives would be useful. Related agents are more likely to have similar strategies and might be more reliable in a pinch for altruistic agents.
I'm note sure if the prey/predators are aware of the health of other prey/predators. Just adding this, along with some healing over time mechanism could create some many more cooperative behaviours
It looks like you essentially have 2 species of predator. Those that work together to from a front, and those that work alone to pick off stragglers. It would be interesting to have some way to indicate lineage. The first thing that comes to mind is color: having color be something that can mutate randomly as well. This way, if a particular mutation is successful, you can see it propagate through the population. I imagine you could switch between having them just be red/green vs showing their color for analysis of lineage.
I was asking myself the exact same thing about the prey! At the beginning of version 3, are those straggler prey specimens just again and again ones that simply leave the main bulbs - or is there a separate straggler species that manages to survive out there? Because some of them were really far out …
I'm not sure, could easily be either the injured ones or the younger ones.
Also he could make a food web by adding a predator that eats the predators in this simulation...that way the predators lower on the food chain could develop different species...some that are better at avoiding the top predators when they are plentiful and other that are better at eating the pray species. Also you might see the prey species following the top predator species.
I suspect the prey species was just one species. It seemed to follow one type of Hurd type motion when around the prey and another one when looking for prey. It may have developed both an effective seek and an effective kill strategy which made it more deadly and created the wave.
The lone wolfs at 26:41 evolve into a new type of predator that's responsible for creating the path to the sustaining line at the end, they started hearding prey that slipped out of massive prey balls as prey balls were disappearing. By leading prey away from the masses they can potentially create other prey ball clusters and a lot of it was ended by the limits of the map or unevolved lone predators still work for themselves and overeating prey from moving heards
When watching the timelapse, it almost appears that the "super predator" (the generation that could somehow destroy the prey with ease) didn't develop in the main large blob of prey, but actually in the other major blob on the map. At 26:45, you can see a sudden change where the predators go from eating the prey on the outskirts of the upper right blob to completely decimating it. Then, when it is completely destroyed, most predators die soon after. However, it looks like a few predators from that area managed to randomly wander over to the other blob, and the places they wandered to is exactly where its complete destruction started. It's just a theory, but its interesting if it is true.
the 4 corner blobs are actually just one blob because the map is borderless. picture the first main center blob then draw a line horizontally and vertically. this would make it look like 4 blobs but its actually just one. hope this is understandable
This is correct. Though I'd love to see some tweaking of the population limits. It's not really a fair test if the prey run into their population cap.
Another really interesting thing would be adding a colony of human controlled predator, using RTS like controls perhaps, and seeing how that would work. Also, if you think about it, the predators at the end achieved a perfect scenario - they kept enough prey alive to continue propagating while they pushed them endlessly north, eating their fill. They didn't eat them all and die from starvation but instead got to a point where they could continue to feed forever.
Man, there's so much to think about with these kinds of things and I'd be so interested in the results after tweaking various parameters. Like how does it change if there's not "endless space", so they prey couldn't just continue north forever? How would it change if prey had a short range of vision for predators but had an extra sense that could detect fellow prey from a long distance, like a scent or sound analogue? I honestly wish I was capable of this kind of programming, it sounds endlessly fascinating.
@@Ashfold_Eberesche In the end the simulation found a way to max out both predator and prey populations into a stable system. I wonder what would have happened if an omnivore that was less specialized than either of them (Still needed to hunt to reproduce but could survive fine on it's own) was introduced.
@@lilbert4996 Oh! Now I understand why the battle line managed to form at the bottom just as those at the top ran out of food. I was starting to think they weren't all individual evolving minds but just an overarching AI trying to use them more effectively.
So, you're right, but just with the larger blob and the smaller blob. Predators from the larger blob evolved to pack into a wall and push, and thus gained the advantage, and then some migrated to the smaller blob where they employed the same strategy to great effect.
Why are you teaching ai to hunt?
Bro is scared of the implications
@@dheiyomain6775 heart steel
My exact same thoughts 🤔...
@@ww3pilot433 i... Is that a fucking league refference?
To find you
This simulation is a fascinating example of chaos theory at work. Despite the random initial conditions, what seems like a chaotic process eventually stabilises into an infinitely repeating (but never EXACTLY repeating) pattern. Wonderful stuff.
While it is exciting to point out something smart sounding is at work, you need to know if it *is* at work.
Mutations (neural network) are entirely random which means that this simulation is not deterministic which also means that this simulation *is not chaotic.*
Yeah this isn’t really chaos theory at all
I also watched Jurassic park when I was a kid
Otherwise called Spontaneous Order. Very interesting seemingly laws of nature
This is a result of entropy more than chaos theory, but there are elements of chaos there. Partly that chaos is restricted by the map boundaries, that being a square shape allowing the repeating predator sweeping strategy. But what we see here is entropy hitting its highest point due to order seen in the predators' behavior. The phalanx pattern and emergent sweeping strategy are examples of order that allow the highest population of predator and prey. Given many more variables akin to a food chain, we could see more and more resemblance to entropy in the natural world, but that isn't necessary to understand how this simulation emulates mathematical entropy. If entropy became this high in the natural world inside a closed box, the prey would likely start to die off too fast for the predators to thrive as they did here, simply because they are reproducing at a sustained maximum rate across the entire map given a specific period of time, and they would likely use up the entire map's resources (again, the food chain variables) before those resources could recoup.
The timelapse is actually stunning. You can kind of see the stages of evolution, in both kind of creatures. You can see the movement of evolution in the predators from devouring top left group, into bottom left, bottom right, top right, then some of the highly adapted predators hit the centre group and explosion happens. Great stuff!
it would be interesting to see how many predators the prey were able to actually get rid of with these rules in place
Very very interesting one this time. I have a suggestion about the communication; maybe give the prey a binary signal that can be read and reacted too by other prey? Just having a method to communicate can lead communication to evolve irl, idk if this is very efficient though.
That sounds very interesting, although it may even want to be larger than a bit to create some sort of alarm or pheromone to warn others of danger or to go somewhere
thats cool, he actually mentions this later on in the video!
@@KingOreo2017 I actually made the comment with his mentioning of communication in mind! Pheramones seem hard to code to me, but they're very very interesting. Alarms might be simpler.
@@griffinhunter3206 thats true. It would also probably be inefficient, but an alarm system could be interesting. Another cool idea would be fear, where prey have a fear meter which would increase by alarms or by seeing prey nearby die. Idk, that could be redundant though
@@KingOreo2017 Simple systems can lead to lots of complexity
I'd love to see how different environments would play a role. Put trees or rocks to obscure vision, water to help speed up or slow down depending on direction. I think there's some really cool ideas you could make with that.
Also while the prey do need more ways to communicate it was cool to see that migratory pattern emerge so that predators didn't just run around and die once they ate everything in their immediate view.
Adding pools of water and requiring both predator and prey to consume water to survive would be interesting.
@@deederdoo See! This is one of those really good ideas that I can't come up with but smart people can.
Also he could make a food web by adding a predator that eats the predators in this simulation...that way the predators lower on the food chain could develop different species...some that are better at avoiding the top predators when they are plentiful and other that are better at eating the pray species. Also you might see the prey species following the top predator species.
@@colorado841 excellent idea, color code different groups of predators to mimic the food chain!
@@colorado841 Rather make it anything can eat anything, combined with eating changing the unit's speed and/or size (size also increasing health pool), while waiting/moving reverses this again. That way you might naturally get diverging species and potentially multiple trophic levels.
At 19:40, it looks like the predators have refined a bite and pull back strategy. This means that each predator is only exposed for a very small amount of time, allowing them to spread damage and take fewer losses.
This is the first time in my life I have consciously cared to go up and turned up the quality on my youtube video just to see content better. Thanks for this amazing video!
19:08 The predators started winning because they (probably unknowingly) created a "wedge formation" that was once used by cavalry to break enemy lines. The wedge was shaped in a giant triangle, charging the enemy crating a "gap" in their lines where more of the predators could pour into, and hopefully split the defenders into two smaller groups.
i think thats more because of the lack of vision for the prey in the center of the group than the tactics on the predators' side
@@karthiksunil219 actually, I think it's more of a case of "invasive species". the predators formed on the left which were probably from the previous group of predator/prey which wrapped around and used their tactics on new prey who had no idea how to fight back. I think that's also why there was a group of predators who stayed put around 20:10, they were the original predators of the area
It almost looks like Prey stopped "standing it's ground" in giant blobs, and just started backing off. As the Predators start "scanning", you can see Prey is dispersed and moving in the other direction (because the Predators behind the wave die off from starvation). Ergo, it's stuck in a loop.
Edit: I know it'd start getting very complex, but it'd be interesting to implement a % chance for offspring to be born with a new trait, picked randomly from a large chart. All traits can be passed on (but not guaranteed), and can even be improved further (like leveling a skill in most games). I.e., increased sight range, slightly faster movement, birthing twins (or litters), etc.
@@badomen7199 ua-cam.com/video/N3tRFayqVtk/v-deo.html
@@badomen7199 I don't know off the top of my head if it's the same video or not, but Primer has one along these lines too
This is basically a simple version of what happened on Earth, in terms of reaching an equilibrium; Where life is pretty well balanced until our long dead ancestors tipped the balance. As our evolution happened more, we used minerals like iron & coal, tamed animals like horses and built stuff like wagons and houses to further ourselves. It wasn't until climate change/global warming happened that we realized that there could be consequences to this, too.
oh man we thought of the same thing! I just wrote a similar comment, lol.
Seems like it's unlikely Pezzza's coming back to this, though :/
The prey were still fighting back as there were more prey density in frontline. They were just losing.
You mentioned wanting to give your prey some sense of unseen danger. Maybe each prey passes a danger value to nearby prey, and the danger value gets reduced with each pass. Prey on the edge within contact distance send a value of, say, 10 to their neighbors, the neighbors send value 9 to theirs, they send 8 to the next group of neighbors, etc. Let them decide what to do with this information as it comes in and see what happens! Great videos!
This is probably the most interesting AI ecosystem project on UA-cam, a part three with the introduction of new factors like prey needing food would be amazing
These videos are all so amazing! Heres a few suggestions:
1. Reduce the map size. Maybe make it 4x bigger than the original rather than 16x. I say this because I feel that the population cap creates an unrealistic pressure that may look cool but causes weird things to happen. The smaller groups in the beginning are what cap the larger group in the center from reaching a larger size, and I feel that that is unrealistic.
2. Create some sort of "grass" the prey must feed on. I noticed throughout the simulation that the reason the predators couldn't break in and kill all the prey is because the prey in the center of each group basically just reproduced, creating thousands more of themselves which just threw themselves into the predators to keep them at bay. This basically meant that the prey didn't really need to evolve and caused the boring (but very cool looking) end where the predators just swept up and killed any prey they touched. A type of grass system, which could just be a value that by default increases by 1 every tick and decreases by lets say 5 every tick, wouldn't allow the over density of prey that is seen in this video
3. Make different species. I'm not sure how viable this is, but I noticed that the predators seem to split into 2 (maybe 3) different "species." One was the main line, which just rammed into the prey and tried to kill them, the swarm, which sat behind the main line and got any prey that dared to escape, and the nomads, which stayed between groups and killed off any prey groups that got too big. Maybe creating some sort of system that changed them different colors depending on how different their neural networks are could lead to some very interesting results.
4. Allow communication. I know you mentioned this in the video, but allowing the prey and predators to not only see each other, but to communicate, could create even stronger packs like were seen in this video. Prey could send off some sort of warning to other prey that they are being chased, or maybe even a fear response if another prey dies around one, and maybe the opposite for predators where a predator could tell others that there are prey nearby. I feel this would be very cpu-intensive and may not change the end result that much, but could be interesting to experiment with nonetheless.
5. Sexual reproduction. A small change, but maybe create a system in which you could toggle on sexual reproduction. It may not make that many differences, but could be an interesting thing to try and many change the result of an experiment if some feature you add keeps giving the same result.
I would add to these ideas, walls and obstacles could be interesting.
@@GigsTaggart that’s a good idea too!
Yes herbs + herb regrow rate will be less "artificial" than population cap :)
Yes, you can definitely see that the death of the big blob in the center "allowed" the more nomadic blobs to reproduce and cover the map.
Pretty sure the swarm is just some freeloading nomads.
About what happens at 19 minutes : it seemed to me that you had 2 species of predators. The one eating the corner green blob was very efficient, while in the middle the 2nd specie of predator was barely surviving. When the corner blob was completly eaten, the good predator specie roamed around to look for preys, and some of them found the center blob. Then started eating and reproducing.
I agree that the corner predators were probably better, but I think only very slightly, that slight advantage gave them all the spawns (remember the cap) and so once the cornered prey were gone, all those predators staved and allowed center predators to begin growing numbers.
I would say only slightly better, and I don't think those predators migrated to the center since they die off so quicky without food.
I was thinking of a "comunication" methods between preys. What if you add a "light" on the back (similar to the eye) that turns on when they see a predator, and this light can be seen by the other preys (maybe by predators too, just to see if it has any effects on their hunting strategies). It could also have different degrees of intensity, for example if it's seeing a predator the intensity is 5, if it's seeing a prey with an intensity 5 light then it emits a light of 4 and so on. This might give the prey some knowledge of the direction where the predators are coming from.
They could have a third output that transmits to an additional input node of those around it and let it figure out how, why, and what to communicate.
Like the white underside on the tails of Pukeko, rabbits, and deer. Good idea!
Chemical signalling by bacteria works like this, with popupations being able to react to predator, prey and community density through this quorum sensing
It would be fascinating if the prey could choose the light intensity on their own by the inputs they get. Similar to how the output of the neural network helps them move, a smaller net could be created to interpret their inputs (surroundings) to shine into a light intensity from 0 to 1 which can be interpreted by it's peers. This makes for complex strategies for both prey and predator. A prey could interpret the inputs of another prey and deduct what it itself needs to do, responding to the light with its own movements. They could even keep responding to each other in a chain reaction of lights blinking. You could technically imagine these creatures strategizing, if these lights actually impact the output of the movement.
You could separate different kinds of preys and their talking methods in separate colors. Since different mutations of preys are varied around the map, you could try dropping some preys from the corner of the map to the other corner to see how they react. The same could go for a predator too.
Taking this into even more complexity would be if predators could see the lights of preys. This could mean counter strategies from the predators.
@@arpita1shrivas definitely, but as I said, if you just add communication output and input nodes, you don't have to do anything else and the neural net will figure out the best way to use the communication. I like the idea of having different color output and input nodes for more complex communication.
The simulation was really good, but my favorite part of this whole thing was the sound track, it’s really calming.
indeed. title of the tracks anybody?
for prey communication you could give the prey a new ability to give a pheromone (a float between 0-1) and a new sense that averages the pheromone of all prey in a certain range. I hypothesize you'll see a few things from this. 1.) groups will form with "languages" will form where the group has begun to communicate and respond to communication and react to predators more effectively. 2.) when prey from other populations are introduced into new populations they respond in unexpected ways because they don't understand the group "language" 3.) if and when large populations of prey intermingle causes erratic behavior until population collapse eventually one language strategy remains
The complexity of doing this…. is unfathomably immense.
@@PastaSenpai incorrect. In terms of programming it is not to complicated to implement it's only adding one input node to the ai and the implementation is infinitesimal in difficulty compared to implementing an AI at all. In terms of complexity at runtime it could be as much as O(n^2) at most and that is being very conservative I'm confident it could be done practically nearly at O(n).
Nice work! This is a pretty cool example of a nonreciprocal phase transition. The transformation from scattering loop behavior of the predators to the steady "scanning for prey" state at the end is a great illustration of patterns that appear from basic local instructions. If you're interested, I'd recommend looking up flocking models for examples of other interesting predator-prey relationships.
I think the aggressive predators evolved in the top left at first which moved the whole prey blob over to the bottom and then top right (by going over the edge). After that blob got eaten up some of the predators can be seen going towards the other blob, after which there was the huge spike in predator population. It can be seen quite clearly in the timelapse at around 26:35 - 27:00
can we just talk about how amazing the timelapse is if you look at it like particle effects?
It looks like a fire front burning, Amazing
Or perhaps - human migration patterns. I get a strong "Attila" vibe from the predators. And then, Romanesque.
It looks like a wave
It looks like it perfectly balanced out a ecosystem where food and population can sustain them forever. This thing found balance like nature. what it could accomplish for humanity in a century are astounding and frightening.
It is lovely. The patterns underneath are particle,
en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations?wprov=sfla1
But I was wondering what change would be needed to the model to give an advantage to waves and flocking?
Maybe a cost to hunting at speed, or for information overload? A cheetah can run very fast (but only for a short distance) and can be confused by herds splitting in different directions.
It's fantastic to see that the simulation is able to go on for so long with neither predator nor pray going extinct! Also great editing!!
Amazing! Adding female and male dynamics as well as resources for survival (food and water) would be really interesting too. You’d have to spread them much further out for the latter I think though.
I think latter would probably just kill off all the prey (if they are nonpermanent random spawns)
If they are permanent it shouldnt change much
May be these organime have not distinct sexe they are probably hermaphrodite
I genuinely think this is one of the most fascinating things I have EVER seen; can't wait to see what you do with this in the future!
I think the “big change” that happened was a combination of the best of the more well adapted predators from the northern group finding the center group, combined with the center group’s relatively unadapted and defenseless prey that resulted in very aggressive and effective formations for the predators
I like all the suggestions for colors, pheromones, grass values etc, and those are all things I thought about suggesting myself. However, one extremely simple addition would be adding current energy level as an input node -- it's a bit strange that animals dont know how hungry they are, and that would be extremely easy to implement.
That would definitely enable more intelligent schemes to keep individuals alive. As it is, they allow themselves to die off in those giant waves. It would be cool to see if a species evolved that tries to keep the individuals alive.
I really like the long videos. The simulations are really mesmerizing and relaxing and also super interesting! I could watch these for hours.
The predators seemed to learn that stacking on top of each other instead of roaming aimlessly caused them to basically "one shot" prey, causing basically no chance to fight back on the preys side
Very interesting showcase of simulated evolution! The way the predators began to bunch up together and wipe the entire map around 20:45 reminded me of something out of World War Z
It would be really interesting to see a simulation where the predator also have a predator. So there are 3 groups. Seeing how the pray adapts to both avoiding predators and attacking prey would be intesting
I was thinking similarly.. 3 faction in a ROCK-PAPER-SCISSOR balance... ( or even 5 factions with the additional LIZARD-SPOCK, for those that get the reference)
My theory of what the predators started to do was tiny halve circles creating flanks inside the front line of the prey. This creates little gaps on the resistant force making the front like a fluid of force instead of a straight line. Also, it reminds me how a paper burn after you light 1 corner. Another thing I noticed is tiny little blitzkrieg. It combines so many strategies and tactics at once it is beautiful. Thanks for the video I had no idea I needed. I love it. keep it up.
An excellent video.
(4:38) For those interested, this is the most concise explanation of "Tragedy of the Commons" that I've ever heard. When resources are not properly managed, the users go extinct.
Very cool. Would be interesting to add a small hue change to the prey and predator as they take more damage. That way you can further analyse the strategy being used
This is a good idea!
Awesome work!
An idea, if I may: perhaps preys could have to seek food too. Maybe each cell of the map could have a "grass" value that increases (or, should I say, "grows") over time. When a prey enters a cell, it eats some or all of the available grass and thus increases its energy, much like predators do when they eat a prey. That would force preys to move and would also naturally cap their number, without the need for a hard population cap.
Or there could be a different type of creature that can't move and is eaten by the prey, and that type of creatures reproduces by launching seeds that the predators could learn to spread, therefore increasing their prey supply
Amazing video! I’d love to see two new behavior facets:
One - recognition of when a fellow Prey or Predator is a “relative” of you; something like knowing whether the Predator or Prey next to you has a common ancestor two or so generations back. I’d be curious to see if Prey group up less with those who aren’t “family” or if Predators would consider non-related Predators competition.
Two: “Grass” for the Prey. The prey passively have more energy than the Predators, but it would be interesting to require them to eat another resource, which could lead to some migration or even defending resources. In addition, it would be cool if “Grass” randomly grew everywhere, but would generate at a higher pace wherever a Predator died. This could create very interesting feedback loops where Predators who overeat Prey to “extinction” would ultimately bring more Prey back into the area, avoiding the inevitable “clumping” or the interesting (if semi-boring) “rake” behavior we saw towards the end.
I would love to see what else you come up with! Keep doing good work!
About one, them being relatives or not makes no difference for survival so i don't think they would naturally evolve that trait. Perhaps the creator would need to manually insert that into them
@@hello-hb1ll makes no difference for their survival, but could help their relatives survive thus making altruism a beneficial gene, as the gene replicates.
I’m going to go off on a limb and say that prey will actually group up with more distant relatives, to ensure that if one dies the others will not. This has little benefit, but it seems grouping up with relatives will have very little benefit if they can’t defend themselves. Edit: Such a behaviour would also prevent clumping, meaning if one hit the jackpot and reproduced without predation for a short timespan, it would split up and not have most of its genes become defunct mutant individuals.
If the prey (or predators) can recognize more related creatures, they might be able to be more confident in how the other creatures will behave and work better in groups. For example, it might make warning calls usable. A small group that figures out how to use warning calls can ignore less related creatures.
You should introduce a third variable, a blob (maybe blue) that hunts both predator and prey, this way, the red blob will have to adapt to being both hunter and the hunted, this would be an interesting food chain simulation I think.
Seeing the herd/group behavior emerge was extremely satisfying, nice job as always! I don't really know anything about AI but I would be really interesting to see the neural network "rendered" out to code to see the exact strategy that the entities are using. It might end up just looking like gibberish though lol.
Well technically you can't directly convert neural networks into code but for small networks like the one presented in the video you possibly can get the equations that the network has converged to .
Mind me I am not good at explaining things but neural networks at their essence are a bunch of equations and what is actually learned are the coefficients. Hope this makes sense.
@@khengari77 I'm aware of what neural networks are and if you want to be very technical about it, yes ANY neural network could theoretically be converted to code. Just think about Turing completeness and it's enough to prove that it's possible
@@AngeTheGreat
Man, I should have thought twice before replying. Anyways your videos are awesome and they came just at the right time . I have my graduation project and I need to do some simulations and your videos were very inspiring.
This is fascinating. I would sugest for the future to add some "neutral" entities (trees) that can not interact with prey or predator, but that serve as places to hide behind, and maybe as shelter for a reservoir of prey to reproduce more safely. Also for prey maybe to have 4 stages of life: Young (only 1 HP, , can't reproduce) Adult 1 and adult 2 (Can reproduce, full speed, full HP) and Old (Half HP, Half movement, can reproduce)
Worth the wait! There's definitely some interesting emergent behavior here. Wow the "wavefront" behavior was really cool! A couple of things I thought about:
- Could you offload some frame computations to the GPU to improve frame time?
- What if the entities had two dimensional size and didn't want to occupy the same space as other entities? You almost certainly couldn't do this without improving frame time before, but maybe some rules similar to components of Boids.
- It would be cool to show a total count for each group on the graphs.
- You probably did this already, but create a way to serialize the simulation state so it can be resumed. Include separation of the ruleset from the state plus definable migration for incompatible differences so that you could resume a simulation under a different ruleset.
- Show average offspring count, average kills and average lifespan in ticks for each entity type.
Some other really good ideas in the comments! You've got a lot to sift through. Looking forward to more!
Is the Boids suggestion inspired by the bibites’ usage of the boids system? Because bibites seemed to use boids for asocial behaviour to prevent viruses, and because being too close to eachother would cause them to deal damage. Here, though, Seperation would probably be ramped down where Cohesion would be ramped up, merely using it for even more extreme pack hunting.
The best thing to do here, to improve upon the rake behaviour rather than removing it, would be to add obstacles that can be detected and not moved through, and add a “fertility” mechanic where prey would get slowed increase of energy when moving over a recently moved over patch of ground, but the fertility of ground would slowly increase back to full. These two properly implemented, I predict, would result in rake behaviour developing slower (since the dominant prey-blobs the early grouper predators developed for would not arise), and prey getting the opportunity to go through gaps in the predator line made by obstacles, getting higher fertility land temporarily.
His clearly audible French accent brings me unspoken amounts of joy.
One thing that might encourage prey to evolve pack behaviors is giving them the ability to make warning calls that other prey can hear regardless of which way they’re facing, provided they’re close enough. Having others help look out for danger is a huge driver in pack behavior on earth
Edit: ah, I didn’t watch all the way through before posting this. Maybe a good way would be to have a single “ear” input node and a “voice” output node. All prey within voice units of a given prey get sqrt(distance*voice) added to their ear input each frame. If there’s lag issues, this voice output could be evaluated on a random 50% of the population each frame. I’ve had success with that random evaluation method in the past.
It may also be interesting to have different patches of the world provide greater benefit to prey at different times, migration patterns might arise that way. As well, having obstacles may lead to some interesting behavior.
At the end migrating was already caused, your idea could cause it sooner/almost Garenty it
Absolutely fascinating work. If you're trying to let prey communicate, I think you already have the tools for it. You were able to assign integer values to predator, prey, and neutral blobs, considering you aren't utilizing neutral blobs, you could give prey the action to switch between two states, 0 and 1. Being able to see each other in multiple states would allow the blobs to express a situation and react to a neighbor blob's situation.
I think adding pheromones would be an interesting fix to the comunication issue, letting them generate what chemical formula (16-bit integer) they give the pheromones.
creating a pheromone would cost quite a lot of energy but 16-bits lets them share quite a bit of information with each other!
I imagine after letting them simulate for a while you would start to see them using the pheromones to coordinate attacks or possibly to warn others about on-coming attacks :D
I hit the bell icon and you should too!
16 bits seems like a lot, especially if you wind up using a single bit to encode positive/negative messaging, and the other 15 for various common situations. It also opens the door for organisms to 'misunderstand' the instructions, or even intercepting the other side's scent signals, much like how Toxoplasma Gondii rewires the mind of mice to be attracted to feline scents, rather than repulsed.
Of course, if he's going to add that, he might as well go full-bore and rework reproduction too, adding gender and requiring a pair to breed and mixing the parents' neural nets as well as some variance.
Can’t wait to see feign retreat and hammer n anvil
Underated comment
En tant qu'étudiante en informatique en fin de cycle, je commence à toucher à l'IA et c'est une matière on ne peux plus fascinante. C'était les 30 minutes les plus satisfaisantes de mon année, merci beaucoup
this is so cool. i have some suggestions:
1) possible communication implementation:
give the creatures two more action options. a value they can turn on and off, and an options to share that value.
2) have the duplication rate be effected by the number of pray, symulating a foodsorce like plants that is limited.
3) implement young, when a creature splits, the new creature is smaller for a few seconds
4) give the creatures a new input, how close they are to spliting.
don't know how possible this is or if its evena part of the scope of your experiments.
I think what happened with that final prey blob was that the predators must have breached some kind of "critical line", possibly through luck or some of them happened to grow bolder at a key moment. All the prey on the edge of the blob had adapted to defending against the predators, keeping the inside of the blob safe. As a result, the prey on the inside of the blob faced barely any selection pressure, especially considering most of them hadn't been able to even _see_ any predators, and thus what would be inferior adaptations for the front line were able to thrive in safety anyway. When the efficient predators reached them, the prey didn't put up nearly as much of a fight, allowing the predators to swarm them, leading to a snowball effect where the predators reproduced even more quickly and could create an even denser front line to wipe the prey even faster. Afterwards, once the prey population finally fell below the cap, all the stragglers who had never been part of a protective herd were allowed to reproduce, meaning the massive walls of predators were finally able to find more food once their main source of it was gone.
Interesting how the simulation finally seemed to become stable once the prey was _less_ effective at fighting back. Instead of one big stationary defensive group, the prey collective adopted a strategy of just "migrating" away from where the predators were.
Man I just discovered your chanel and I'm already a big fan of it. Continue what you do it is truly amazing!
The rapid preditor expansion at 20:34 looks like the shockwave of a nuclear blast expanding outwards, haha. Beautiful.
An idea I just had would be to give both sides a way to communicate. Each predator and prey has a third output neuron for color, and they can also see the color of whatever being is in their view, so each viewline neuron would also have a color neuron. This might lead to some interesting pack movement where prey that are in danger signal to the other prey that there’s danger nearby with their color, and predators could signal where there’s food, and in any case it could lead to some beautiful images when zoomed out. You could even add *three* output neurons for RGB values, which could lead to something crazy.
It’s amazing how once given the incentive to group, the predators group strategies resemble basic military tactics. Fascinating really.
That ending instantly made me subscribe!
I'm so curious why the front of predators towards the end were aligning with the grid, I bet there's some interesting math behind that, probably somehow related to the periodic domain. This really reminds me of simulations I used to do for propagating flames! It's so cool to see the same process show up in a totally different context. Really awesome video as always
It's because the diagonal is longer than the horizontal or vertical, so they settled into the lowest energy state. They could have just as easily gone left/right, but going diagonal with that strategy will always eventually decay into an up/down or left/right wave, at least once the ends of the wave loop around the map and meet.
It because, only the predators that eat the preys survive and those that stay behind starve. The preys just takes over the place and it goes on and on.
@@alexc1606 you’re about two steps behind what they’re talking about lol
Khatharr is 100% right here, it's because the shortest, straight line here has the least energy (not energy as in simulation energy, but some abstract quantity that will tend towards a minima). If you wanted to actually go through the maths to work it out yourself, then you could use the Euler Lagrange equations and principle of least action to show that the straight line has the least cost.
To explain it more intuitively, imagine some loop in this space (it's a little annoying to think about in this particular case since the space is a torus I think but point still mostly holds). Then, imagine some kink in this loop. This kink is going to have a higher ratio of predators : prey at that point compared to unkinked sections, and therefore it's going to tend to recede. If you keep having these kinks suppressed over and over, eventually your loop will settle towards its minimum length, i.e. path of least action if you want to use the mathematical phrasing.
It's the *exact* same reason for why in world war 1 and 2 these huge salients would tend to collapse down back into more simplistic lines. It was obviously muddied there as there were things like terrain, supplies and so on to change the cost of any particular shape, but the principle holds.
Super interesting maths, I was really impressed at the simulation when I spotted it!
I think an idea that could result into interesting formations would be the direction of strike: the prey blobs could do 1X damage if attacked from the front, 0.5X if attacked from the sides and 0.25X if attacked from the back
25:10 they found the perfect way to co-exist. Predators could win vs the preys but evertime they were to aggressive they went close to extinct. With this moving strategy they keep preys alive while surviving on their own. Very impressive!
Agreed.
Nomadic
Comment I was looking for 👍🏼
I love these simulations so much because it really shows how the AI is like real animals. First, they just hunt to eat, and prey tended to stick together to see all around them, but when prey were able to fight back, predators started to hunt in packs.
Edit: this also shows the relations between prey and predator populations in the real world
When prey pop is high, pref pop is high. When prey pop is low, pred pop is loe
This one gonna get interesting real quick
i think the aggressive strain that devours its prey at 26:35 is the one that goes on to devour the one in the corners and finally the big one that almost beats back the predators. you can literally see the swarm move from one prey to the next
Here's some ideas:
Genetic relatedness: give entities a heritable color attribute and make it evolve slowly. Also add entity color data as input neurons (including self color). Entities can then learn to recognize their same-colored "brothers" and behave differently (aggressively or xenophobically) toward differently colored entities. Add an altruism behavior to the output neurons (give a portion of self energy to a nearby entity). Maybe add an input neuron indicating how "hungry" nearby entities are.
Ranged attack: I know this one might not sound interesting, but I'll bet it would produce the most surprising results. (Fun fact to ponder: Homo sapiens is the only land mammal to use projectile weapons and the only eusocial marine animal is the pistol shrimp which uses cavitation bullets to stun its prey.) Basically just give entities a heritable attack range (shorter than vision range of course).
If you implement both of these features, I'll bet you'll get really interesting "social" behavior out of them!
Isn't the "friend" vs "foe" the same as "one color" vs "some other color" to the network? It knows nothing about the difference in the beginning either way.
@@skaramicke No, because the color isn't allowed to evolve. Thus two entities of the same color have no way of knowing how distantly related they are (how many generations back until they share a common ancestor). That information turns out to be crucial to the development of altruistic behaviors in real life organisms.
A cool idea would be to add terrain so we could see if the AI can develop guerilla/ambush tactics.
Like rivers, which are slow to cross so you can wait on the other side for the prey, bolders that must be avoided, Tall grass to hide in so that the predators must really hunt for them, berry fields in which the prey multiplies twice as fast so eventually the predator can spawn camp, high ground from which you can see hiding bots and the entire map etc.
THIS WAS BEYOND AMAZING!!! ❤
This is genuinely the most interesting thing I’ve seen in years on UA-cam. I watched every second of this and rewound many times 😂
You earned a new subscriber in me!
Evolution simulations are awesome. There’s also one about rudimentary geometrical ‘animals’ learning to walk in order to outrun one another. (Simple selection by the fastest 10% or so.)
@@MensHominis oh I know, those are very cool too. I know paleontologists have used those walking sims to model dinosaur skeletons to see the most likely way certain dinosaurs and other animals walked. Technology is soooo cool.
I can still remember my first computer when I was 3 was a Macintosh with a black and white monitor when I was 3 years old in 1992. God how far we have come in such a short time blows me away
Thank you for putting out this content! I particularly enjoyed seeing the predator AI do its thing again in the ending sequence
I think we should:
1) introduce obstacles such as rivers, with fords, forests, tall grass and reliefs.
logic:
-the reds could not cross the river, except through the fords.
-reds hide in the tall grass to get close to their prey without being noticed. they should have a penalty of narrower vision, but an increase in hearing to perceive prey (i.e. 4 cardinal sensors with rays).
reds in the forests should slow down their speed, while conserving their energy.
reds can sprint 2x faster, but can't hold it for long
Greens can cross the river, but consume 2% of energy due to the density of the fluid.
greens can hide from predators in tall grass to escape them. they would have a visual impairment, but an increase in hearing. they have a reward for reproducing.
greens in forests should have a premium for food and reproduction.
greens are more resistant when running thanks to their stamina, escaping from predators more easily.
the food runs out and the greens have to wander around the map looking for it.
so you should introduce a food as a resource that spawns according to natural logic. the greener in the area, the sooner the food runs out in the area.
you could make the food blue.
you should introduce a sensor that is smelled by the agents at a certain distance... so that the closer they get, the more the smell increases.
so the blues would wander less randomly and the reds could smell the carcasses.
you should also introduce carcass logic...
the greens starving, disappear after "x" time becoming a darker green or until they are eaten
from predators.
This was so cool! I hope you keep expanding this to make a simulated ecosystem
This is the most ((in terms of graphics "gameplay")) simplest "game" I've ever wanted so much to be something I could buy. Absolute amazingness
This is fascinating!
I was wondering if there was a way you could make the predator's "farm" prey. I noticed in the beginning, many packs of predators would die off because they killed off all the prey in the group they were attacking. Maybe if you added something like a mercy system, where there's a possibility that a predator can choose to spare a prey's life, as well as the ability for predators to count how many prey is in their view, then maybe those predator's which evolved to show mercy more often when there were fewer prey would survive for more generations.
That’s a good idea, maybe have it so the predators once fed will pass on a meal for a time, no point expending energy if you’re fed
My thought upon seeing the stable dynamic that emerged in the end was that it was a kind of "domestication" of the prey. Even though there is no communication, the local packs that form during evolution will often be "like-minded" due to local reproduction, and will also likely be collectively "punished" for showing too much greediness.
Great video. An overlay that shows the age of creatures could be extremely useful to analyse pop growth and survivability
Excellent video!
I believe strigmergy (substrate-based communication) could be a great candidate to get optimized communication between the agents of your simulation. Moreover, by letting agents deposit different substrates/react differently to those, the neural network could probably come up with many different strategies and could have quite some room to evolve in different directions.
That final simulation, the first time watching it, I thought it was a bit of a shame that the predators from the corner group overhunted and then starved off without being able to share what they'd learned. But then in the timelapse, you can see some of those efficient predators being "thrown" towards the remaining prey colony, and it was only when those arrived that that final colony started getting demolished! Fascinating to watch how such simple systems lead to such complex interactions
You should maybe try giving the preys a wider fov so that they can spot predators more easily.
Great video !
That's already the case.
It would also be interesting to see what the damage done by each group (or average damage per prey or predator per time window) and how it changes over time.
Another idea for the prey to attack the predator is to create a "danger zone" where the prey can attack the predator (for example it will always attack from the front, but the sides and back are harmless, like with antlers on a deer).
This might create some very interesting behavior where a bunch of predators will attack in a group from different sides (like wolves).
You would probably have to add another input neuron tho with a direction per ray.
Its quite beautifull how the concept of evolution gets so close to just raw logic, as in you can argue in these evolutionary terms for the existence of everything. Also nice how we see Lotka-Volterra so clearly.
18:59 it's kind of interesting to see that that blob of prey has remained intact for so log at that point that the ones in the center are barely moving.
Excellente vidéo ! Le projet est très intéressant et les explications sont claires.
Ça serait très intéressant d'avoir une vidéo du style "code review" ainsi que des informations techniques qui sont derrières tout ça (sur la machine qui fait tourner la simulation, sur le langage de programation, les librairies,...)
You should add a third group, a passive omnivore type. Years ago when I played around with a very primitive evolution sim I always ended up with deadlocks at best with pred and prey scenarios. Added in a third group that were equally dangerous to both but had a slower reproduction rate and less aggressive, truly interesting things started to happen and rarely the same situation twice. I would love to see it done with neural networking instead of simple switches.
I agree, prey need to be prey to something else. Maybe a few blobs where some are prey to others but predators to others. Like a rock-paper-scissors game/laws!
It'd be interesting to see each predator/prey have a distinct color coded by a gene that could randomly change slightly per reproduction. That would offer more insight into the different genetic lineages.
Would be cool to add terrain types, elevation differences, stamina, and age into the mix. Cool stuff
*Insertar PC explotando*
Absolutely beautiful work! It was strangely satisfying watching how predator, after finishing a large group of prey, also tend to vanish, leaving nothing in the end.
21:06 The minimap makes it feel so much like slime-mold!
What you have seen here is why being encirceled is such a bad thing in battle even if its just a day long battle and suplies arent an issue.
I love this series so much!