Yeah. the prey that were dodging were fun to watch. I just wish they had stationary food to eat to gain energy,, because after they dodged amazingly, then they got tired and became sitting ducks
As a biologist, I think this simulation could be a useful educational asset for schools! It could be considered as an accurate representation of the Lotka - Volterra model, which presents the changes of prey - predator populations over time.
I agree, as a biologist myself I was really impressed with how well this simulation demonstrates predator-prey interactions. We even see numerous adaptations in both the predator and prey populations. The prey population for example began creating herds at some point where individuals at the center were more protected. Truly awesome work.
It was interesting seeing the predator's numbers drop shortly after the prey numbers drop, and seeing them rise when the prey numbers rise. It shows how dependent on prey they were.
It's basically the fox and rabbit equation. If one variable (predator count) increases at a rate based off of another variable (prey count), and that variable decreases at a rate based off of the other variable, they form a cycle of increasing a decreasing, with the predators being about 90 degrees behind in phase.
It was surprisingly interesting to see how low the numbers could drop and then skyrocket back to the max. It should put us to think before trying to intervene when observing changes in the ecosystem. It's part of dynamic balance.
A small modification you can add is making entities use more energy when going especially fast, and practically no energy when moving slowly. This may encourage preds to try searching for prey more than just spinning, and allow prey to dodge more
@@baltulielkungsgunarsmiezis9714 moving "backwards" is irrelevant in this simulation, the eyes are just a visual thing and the preys have their circular FOV so theres no "front" or "back" to the preys
It's pretty interesting how the prey entities seem to display herd behavior at times. Very nice simulation! Edit: I meant for this to just be a quick comment about what I thought was an interesting pattern emerging in the simulation. I didn't think it would actually get so many likes... I know/knew that prey are not able to see each other, in fact, that's exactly why I thought this was interesting in the first place and many times in nature you can observe what APPEAR to be social behaviors emerging out of asocial processes. Some people seem to think this is an obvious or trivial pattern that is not worth consideration. I wouldn't jump to such a hasty conclusion. Yes, it is true that the herd does not physically stop predators, BUT it does block their line of sight and predators could develop hunting tactics that discourage them from entering the herd (which prey could take advantage of). Over time you may even see societal roles develop in which active individuals circle the outside of the "herd" while avoiding/distracting predators, while sedentary individuals reside within the herd where they thrive (thereby creating these large clusters). I don't know the exact details of the neural network that was implemented here so this is ultimately all just speculation. Perhaps the herds ARE just random areas with higher reproduction rates (although this very fact already suggests an evolutionary advantage to such a structure) but nonetheless I still find this interesting to ponder and analyze. I stand by my original comment that it is an interesting observation and certainly a thought-provoking simulation.
I don't think they can see each other, I think since they reproduce when they stay still, they tend to grow into big colonies together just because that's where they were born
@@Hailfire08 There's a reason why I said "seem" lol... I've actually written some similar simulations before where the entities *appear* to display social behavior, when in reality they have no idea that any other entities like them exist, I just think it's an interesting example of emergent behavior
@ToeTruck Some prey get super territorial, but most seemingly stick together (strength in numbers and easier to blend in with a group making it harder for predators to pick out any individual)
@@udittlamba In this simulation agents can't even see others from the same species. They don't need to communicate, just see each other would be enought to add more complex behavior. Same for Preys. The grouping is just an emergent feature of the simulation, but they are not doing that as a behavior since they don't see each other. They just see a blank space and try to move there. It would be nice to add a second layer of "eyes". One is sensitive to it's own species and the second layer to the opposite species.
Incredible work! Amazing idea & very fun to watch. This "crisis" periods are characteristic of predator-prey models, see e.g. the Lotka-Volterra equations.
Thank you! Didn't know about Lotka-Volterra, thank you for the reference! it is always fascinating to see a natural law emerge spontaneously from a simulation
Yeah!!! I was thinking about those differential equations (lotka-volterra, predator prey model) And I would like to see the whole simulation but without an upper boundary to see what happens. Pretty nice work!!
@@oscareduardofloreshernande7853 I coded something like that (but way less fancy and without evolution) as a toy demonstration of the lotka-volterra limit cycles for a uni assignment a year ago: th-cam.com/video/G4qt5cSSf9Q/w-d-xo.html
This is awesome! Here are some interesting ideas. 1. Add a third entity to simulate foliage. It is static, grows at a steady pace, is eaten/sought out by the prey, and neutral to the predators. This would cause concentrations of areas that the prey will sit similar to feeding grounds/oasis. 2. Set random evolution parameters with speed, energy depletion, digestion, & splitting. With things like capped/floored energy. Quicker or slower speed acceleration. Etc. It'd be interesting to see if low energy, quick accelerator, low cap speed prey outruns a fast energy burning, no capped, floored speed predator. 3. Maturity. Add in a maturity/size variable that dictates speed, energy, etc. Smaller prey gives less energy but is easier to catch, etc.
i wished he could also make a variable for actual "physical" fitness. Eg, give predators and prey a standard deviation of energy and speed. cause that would have proven even further evolution through fitness.
So interesting! I'd personally love to see two features added: 1. prey grazing. The longer the prey sits in the same spot, eventually that spot has been over-grazed and provides no more energy, so the prey will have to keep migrating around the map for more to eat, while the depleted areas gradually grow back. 2. terrain. Say one corner of the map is "rocky" and movement is halved or quartered, how might predators and prey evolve to be suited for that terrain? Will prey sit up there like mountain goats, while the predators can't get up there to get them before starving? Thanks for making this simulation, and for sharing it with us. I'd love to see more.
@@mtolives exactly, or even something like mobbing by prey, protecting young by prey, threat perception by predators. Some form of aggression/deadliness modifier. Could be done by rng? Eventually those with a higher aggression number would breed, but the counter aggression/deadliness by predators would also be forced to evolve. The proverbial ‘tooth and claw’ evolutionary mechanics. Evolutionary arms race we see irl.
I agree with Mark. 1. Prey should also the predator of lesser being, like plant. So they also have to find their food. 2. Predator should have bigger feature than the prey. 3. Terrain, aka Hiding place. There are should hiding place all around the map where predator has bigger problem to reach it. But because prey also need to find food, they eventually has to get out of their hiding place. Make both prey and predator a bit more complex. like they should also need to sleep.
It seemed like at some points the predators had "evolved" to leave the herds of prey alive, instead circling around the edges in order to pick off enough to survive, but not kill the food source. More tiers of predator would be interesting, to see if you could create a perpetual cycle of predators that keep each others population down to prevent the extinction events in this video.
@@Zenovarse Not necessarily, as predation is the act of 'hunting' a prey. Humans have in the past derived a large amount of food from hunting, however farming and herding is separate from hunting. They are born and raised in a captive environment and then slaughtered, there is no hunt or predatory behavior, it's simply a life cycle that's controlled from start to finish by the harvester.
@@Lithane97 ehem, yes and no.. It's different but same at the same time.. There is a step between domesticating the prey and pure hunting.. Population control.. You don't hunt in special times, even if you could.. You hunt animals that have "overpopulation" or endanger you otherwise, this makes hunting more efficient.. And domesticating is then just the next step.. U get rid of the need to put energy into finding the prey..
You should add a grazing effect! Like prey can only regenerate energy and reproduce as they move over the area, but with a lawnmower effect that has to regenerate the resource the prey eat overtime, so the prey can "overgraze" an area in the absence of predators!
Idea: make it, so that each time they split, they randomly change they fov and range of the rays. Those with higher fov and range may for example consume more energy, but they can see so much more. Therefore we would see if finaly evolution decided to go with higher fov and range or lower to consume less energy. Also, cool video. Thanks for likes
add stress level? more rays adds more stress/time but you can temporarily disable the rays (closing your eyes) to reduce stress/to rest moving a lot also increases your stress level if it goes to 100% you die
Yes, and make predators and prey start with the same FOV. That way making predators and prey having the FOV they had will not seem like an arbitrary decision, but rather one that evolution favours.
Prey would likely favor higher fov since they only need to sit still. If there aren't a lot of predators, they'll have plenty of time to sit around. However, if there are more predators, prey may favor lower fov so that it can run for longer.
You should add health bars too. Instead of it being a one-hit kill with the predators, make it a 2-hit kill or randomize the damage, or base it on other factors that can develop with the evolution. The best bart though is why not let the prey do a little bit of damage? Make it so they do 10% or so damage to the predators max health so when the predators dive into the big pools of sitting prey, they have a chance of not coming out alive. Could randomize their damage too and a way to regen health, maybe. I feel like you wouldn't want to make their lifespans last longer for the sake of the speed of the simulation.
It'd be interesting to see what they would do if they could detect their allies as well, maybe have the view blocked by them too. Maybe the predators would avoid eachother to get a better view and not risk having their meal stolen, and the clumped up prey would only know what's happening by observing the movement of their herd.
@@PezzzasWork it was very cool! I also have an idea: what if some predators/prey are slightly different speeds than their parents? They could be slightly different tints, and I was wondering how that would work out.
It would be great to have a mutation/evolution function where there's a random chance for the predators and prey to upgrade a certain skill, whether it be observation, or speed of travel, or energy efficiency, or angle at which they can turn; I think it would allow the populations to become much more successful at hunting/surviving
I did something similar to this once but with the addition that it cost more energy to stay alive the more upgraded it became so it had to be able to utilize the new speed/strength/etc effectively. It allowed for speciation into cheetah types, tank types, etc. My favorite was what I called the plant. It soaked up the ambient energy (light) and had zero speed, defense, etc. Just exists
@LEO&LAMB In a GAN the AIs fight it out which is why these simulations are non-deterministic. They are meant to go out and try new things. We give them the building blocks for growth, and they apply those rules until they reach a point where they reach conclusions logically that were derived from the rules of logic but not concretely expressed.
Completely wrong. you completely disregarded the point of the demonstration, overlooked the interdependant variables. everything. in this simulation both prey and predator GET STRONGER OVER TIME! always! this how the simulation is SET! there is no "tought times" or "weak man/creature". its a cicle that CANNOT and i repeat CANNOT be extrapolated for HUMANS. and you know why? cause the biggest predator of humans, are HUMANS!
@@PezzzasWork Damn these videos are awesome. You really need to implement these nice new things and then make a video out of them again, that would be phenomenal.
Conclusion: i see the pattern as when the preys are overpopulated, they cant dodge anywhere and predators will eat through the cluster, then prey’s population went low means less food, making the predators die and giving the preys an easier time to give birth and this repeats. But then suddenly, a prey became a freaking ninja and just dodged all the predators, more of them learnt the arts of dodging and predators slowly died out due to the difficulty of hunting preys and they finally won
Someone figured out how mother nature works. Usually this is taught as a program in coding classes, with wolves and sheep. You can manipulate the amount of sheep, and wolves, and watch in real time that when there is more food the wolves multiply quickly and hunt sheep, but when there is a small amount of sheep a majority of the wolves die. Three Results happen towards the end of the program, the sheep manage to starve out the wolves, and explode in population. The wolves consume all the sheep, and quickly die. Or you get the numbers just right, and the cycle continues forever.
@@notleviathan855 The reality is that once the sheep population drops to the point they become difficult for the wolf to find, the wolf switches to different prey, prey that is more abundant, giving the sheep numbers time to recover. The difficulty with such models is you are modelling the interspecies relationships between a single prey and a single predator, and the real world is almost NEVER that simple. There are a few cases where it is, but they are very much the exception not the norm. Most predators rely on multiple prey species, as most herbivores rely on multiple plant species. When you start trying to model those complex interactions than the simulations both start looking very different, and climb rapidly in complexity.
@@alganhar1 , it is reducible, though, to something like this, where you can just consider all predators as one group and all prey as another group. Regardless of how many of the predators are made up of wolves, coyotes, etc. or how many of the prey are made up of sheep, rabbits, etc. That simple simulation can still reach the same conclusion as real life, typically equilibrium, but sometimes the destruction of one or both groups.
Awesome video, especially love the googly eyes Might be interesting to give them an ability to detect fellow predators/prey, see whether they want to cluster or split up.
I love this. I'd like to see what happens if they could intersect with entities of their same kind and distinguish between who is friend and foe. You could have clusters of prey that move like a bank of fish, and predators that team to circle the prey
It would’ve been cool if you had the predators and prey very slowly randomly change color within a set range to see which individuals are generally related based on how close they look to one another. It would be a relatively simply addition. Either way, amazing video!
Neat! One thought for the prey is to have them 'overgrazing' cells, so, over time, their energy recovery rate drops lower and lower the longer they are in a particular cell until there is no 'food' left and the recovery rate becomes negative, forcing them to move or starve. This would emulate real-world consequences for overgrazing.
SUGGESTION FOR THE NEXT ITERATION: Please put learning in it for reacting to the actions of your own species, instead of just interactions with the other species. This will make for interesting results because of a)"flock" behaviour of the prey i.e. they all run when spooked and b) "pack" behaviour of the predators, who might find it advantageous to move in the same direction of nearby predators. Finally I would like to see the prey interacting with the environment i.e. eating greenery. When the underlying tile goes from green (lush) to yellow (partially grazed) to brown (over-grazed), the prey have to move on.
If you expand on this, I'd love to see a few more selection pressures added on both prey and predators. - Second "Stamina" bar whose maximum is equivalent to 1/2 current Energy. - - Stamina regenerates/is used at a variable rate based on speed - allowing for low speed travel to still recover stamina, albeit at a slower rate than standing still. - Energy always goes down, even when standing still. The rate of decay can also be based on speed as with stamina. - Food appears in random spots, only edible by prey. - Possible bodies of water, necessary for both prey and predators. Larger ones could effectively be considered infinite while small 'puddles' could be used once and recover a percentage of the bar, similar to food. - Reproduction would be a function of energy, as opposed to lifetime. If energy > 80%, allow reproduction. Reproduction uses a percentage of energy, say 20%. The food mechanic would cause prey to compete with one another as well as with predators (as they do in real life), and I suspect that water (or even just food) and the change to stamina/energy would introduce a subset of predators that camp larger concentrations of food/water as an ambush predator.
The more pressures you add the more complex the model gets and the more inaccurate. That is the very reason why Evolutionary Models are considered by those of us who actually work in the field as imperfect tools. This is not to say models are unimportant or useless, they are not, they can and do help drive our understanding of the true complexity of the tangled web that is Evolutionary Pressure and Selection. But we always have to keep in the front of our mind that they are imperfect tools, and while useful they should not be taken as gospel. The problem is they are simplistic. No computer can handle the huge number of variables that are all traits of a single organism responding (so being selected for or against) by the environment in which the organism lives. Bear in mind that environment does not just include inter specific competition or interactions, but intra, as well as the innumerable reactions to the physical makeup of that environment. And this is before you add the elephant in the room that is random mutation. Now most Evolution is essentially selective pressures working on traits that are naturally variable in any population of sexually reproductive organisms. Usually mutations are either neutral or deleterious and either remain in the population not doing much, or a swiftly weeded out in the case of the deleterious mutations that have no positive advantage. Occasionally however you get a mutation that is advantageous, and it spreads like wildfire. A good example is the rise of Lactose Tolerance in humans. Go look at mammals and see how many are lactose tolerant in their adult years. Humans are literally the only example, at least as far as I know and I am fairly up to date. That is a mutation that arose some time early in the history of domestication. That is pure random chance, and no computer on the face of the planet, now or likely ever, will be able to come even close to modelling the effects of random mutations!! Including I may add humans themselves!!
Well, the goal of these is rarely to emulate life or reality, as usually the only thing that is being 'mutated' between generations is behavioral choices. E.g. generation 9774342 is just as fast/slow as generation 1, but the later generation has developed the ability to control its rigid physiology better. Barring the AI finding a 'hack' as they often do when tasked with a gamified task and goal, I fail to see how it could become more inaccurate (at showing the rise of behavioral changes in response to environmental stimuli)
I really like this series, even though at the time of writing this it’s only two episodes. I can’t wait for more content about this, keep up the good work!
I love watching simulations like this, so intriguing! Others have commented some really interesting features; here are a few I thought of. - What if predators and prey were further randomly divided into male and female, and males and females would have to find each other and spend energy in order to reproduce? Would sexually dimorphic roles develop? Especially if the sexual processes (energy spent, gestation, who gives birth, etc...) differed between the types. - What if predators didn't immediately consume prey when they touched them, but instead depleted their energy, and when an organism's energy was depleted, it turned into a dead body, which only then could be eaten, and would be deleted after a set amount of time if not eaten? Could some predators perhaps develop scavenger like strategies, swooping in to reap the rewards of others' work, instead of wasting their own energy chasing and killing prey? - What if initially all the organisms had both prey and predator abilities, to varying degrees of effectiveness (some would deplete more energy from their targets by attacking them, some would gain more energy back by staying in one place, some would get better at escaping)? Would predator and prey roles develop naturally or would one weird, cannibalistic creature develop and spread?
@@robyrobt1714 It's because FACTS don't care about others feelings ... Remember, that Gen X noone wants to talk about ... well their kids oare almost voting age!
Nice simulation, I really enjoyed watching it. Here are some suggestions: As you may have noticed, the population switched relatively quick between nearly drying out and max population. If you have the computational power, maybe try increasing the max population. You could also add more parameters to the entities and give them less restrictions. For example, don't force them to have a fixed pov. Even if the "narrow but far" fov for predators is a thing in nature, it should evolve automatically in the simulation, if its changed a bit for every new child. Also, you could try to not force the entities to be predator or prey. If you include food/plants that will naturally grow over time and give them energy, every entity can evolve to be a carnivore, herbivore or omnivore. You could even add caves/hiding places in areas with plant and let the entities evolve their sizes. You could even include a day/night cycle. There are so much possibilities! If you don't have entity classes anymore, you could make the entities appearance based on their properties: More meat as energy= more redish, more plant based food= more greenish. Wider fov= wider distance between the eyes. Anyway, really great work!
When you give predators the ability to eat predators and evolve into herbivores, it's quite likely that they will evolve into herbivores. Because being a herbivore is easier, as you don't have to chase other creatures. And I think the only reason predators were able to last so long is because they couldn't eat each other. Predators eating each other would have saved them when they were starving, but it would also take away their advantage over herbivores: lack of predation. The reason predators last in real life despite being able to eat each other is because herbivores make the best meals. Plants are hard to digest, and carnivores are dangerous, provide worse nutrition and are more likely to give you a disease, especially if they are scavengers. I know that some scavengers, like vultures, stop disease, but that may be due to competing with other scavengers, like flies, and eating scavengers could still give you a disease.
@@magentamonster IRL herbivores are dumber and slower then carnivores and omnivores. BTW most of the animals that we call herbivores are actually what is called "Opportunistic Carnivores" like the humble deer which will munch on a bird if it gets the chance. true herbivores are like cows. they can stampede but are otherwise pretty slow. Also cows are among the animals that shouldn't still exist if humanity hadn't farmed them. soooo yeah, the world tends towards omnivore and predators might evolve a secondary ability to eat plants but it's more of a 50/50 if set up correctly.
@@liamnehren1054 Perhaps another reason why predators evolved into herbivores and scavengers in the simulation is because it was too easy. In real life, it is complex. Many genes control diet. There is no use in an animal wanting to eat plants when it doesn't have the appropriate digestive system. And herbivores are more vulnerable to predation, so any animal evolving into a herbivore must adapt to counter the increased risk of predation. And I think that the reason why predatory traits are lost when a predator evolves into a herbivore is because they waste resources and are vestigial. Sharp teeth may make it harder to eat plants. The reason why sharp claws are lost when an animal evolves into a herbivore is probably because it is worse for locomotion, since some herbivorous, bipedal dinosaurs like Iguanodon, therizinosaurs and hoatzin chicks have them on their arms. Also, many herbivorous birds have sharp claws on their feet.
Yes. It was a bit silly that predators ignored prey close by but off to the side. They should have a simulated sense for hearing and smell or at least the ability to “glance” left and right. Could predators also use teamwork to hunt one target, and take half the energy from a kill they herd/trap?
@@magentamonster Birds need claws to hold on to branches, bark, and masonry. All life is different, and the most fit to an environment are most likely to breed there, as evident by Darwin's study of finches.
Very nice video, it was really cool to see the typical hunter and hunted cycle: more prey = more predators > more predators = less prey > less prey = less predators > less predators = more prey > and again... Looking forward to your next one!
It would be cool to split this into four groups, Plants, herbivore, Predator, and omnivore. Predators could gain a small amount of energy for eating other predators encouraging them to compete against each other. Plants mutations could be how they spread and maybe add a digestion or movement cost to the herbivores Omnivores could have more food choices bot not be as adapt at digesting either. I would be curious to see how added competition groups would change the result, or if you could build a digital terrarium.
@@Ze_Chevalier My thought would be omnivores couldnt 1v1 a predator, and they would have more access to food but have a disadvantage at the nutrient gain as they arent specialized in digesting any type of food. Maybe they could even require a balanced diet and a mutation could effect the spread there, but that could be making things too complex.
@@TravisTheArtist dead animals leave bodies which can then be eaten by meat types, and depending on how much of the body is left uneaten (maybe it has 5 small food points), it will then cultivate plants in that area after some time
@@TravisTheArtist The prey in this simulation would be the plants, they are the begin 'food'. The predators in his simulation would be the herbivores, they hunt the plant. If you make the omnivores eat herbivores and plants, that's 1 competition between omnivore and herbivore for plants. Then make predator eat ominvore and herbivore, 2nd competition between omnivore and predator for herbivores. If you make predator eat predator, then the moment it spawns a new generation, it would see it's offspring as food, and the offspring sees parent as food. Simulated cannibalism ;)
Once the prey learned to exploit the weakness of the predators, being dodging, getting them tired, and getting them to die out, they have managed to gain the upperhand. as they didnt need as much as predators to stay alive. they could focus on others weakness on the main spot over their own. Certainly interesting.
That's cool as heck. One of the best 2D evolving prey/pred simulations I've seen. I'm waiting for a good 3D one, that's when artificial life simulators will get really interesting.
Not that it would be testing the AI itself directly, but I'd love to see vision as another randomly adjustable variable alongside the AI behaviours when splitting. Make a variety of vision range/arc settings with even distribution between (and extending beyond) the current values, so they're still at least roughly balanced but some are more useful for spotting things far away, and others for seeing targets coming from any direction. I'd be curious what the vision arcs for the most successful creatures of each type would turn out to be over time.
It would be so interesting to see the predator/prey amounts on a 2d graph, with the x axis representing one and the y axis representing another! I guess it would just be about the same loop over and over with minor variation, but it may be cool!
This was really fun to watch. A lot of times, the Preys were close to extinction, before coming back with a vengeance. But this was done with each entity acting on its own and responding to inputs from its own network. I wonder how the experiment would go if entities were to communicate with others of the same kind and even coordinate their actions. I also noticed that Predators tend to zero in onto one prey and pursue that prey single-mindedly even if another prey happens to come alongside parallel to it and would be eaten if the Predator just made a 90deg turn to this new prey. Wonder how the results might be changed if this algorithm was programmed into all Predators. This is a very interesting experiment. A lot of scenarios and parameters that can be tested. Even including making the borders solid such that entities "bounce" off them instead of exiting and rejoining the board from the other side.
It'd be really interesting to see a version of this with a larger board possibly filled with some obstacles and give the prey's network the ability to see how much time they have left until they split so they could maybe evolve behaviour such as strategically having children in a specific place to avoid predators. Either way, very nice content, loads of fun to watch
I want to see more of these kinds of simulations. Some with even more abilities, like sprinting but consuming more energy. Different evolutions of seeing, like bigger fov or an increase in range but narrower etc. Maybe some with the ability to hide, by appearing further away than they actually are if they arent in the center of the fov of the predator. It's a really cool simulation.
I love how towards the end of the simulation it seems like how a pack of predators hunt herd/school of prey in real life. Definitely shows how evolution and the process has changed over the ages and greatly explains the survival of the fittest. Great video and explanation, it was very easy to follow along with the whole creation process.
Studies of nature have shown that the behaviour around the beginning (maybe early-mid) part of the sim accurately reflects how *herbivores* feed on plants - think cavorting deer ravaging the greenery in a park unchecked. It's only during conservative periods, where the red dots are more selective, that their behaviour matches that of a *carnivore*, including pack/pride behaviours that make sense for group predation. I would love to see an extension of this sim with a three, maybe even four or five part structure: - Blue dots for repleneshing natural resources (soil, water, air, sunlight) - Green for plantlife - Yellow for herbivores - Red for omnivores and scavengers - Purple for carnivores
Hello! First of all this is a great simulation, but I'd like to suggest a couple things that would be interesting to implement in my opinion, if it's not too much of a hassle: Evolving a neuron that makes predators stop trying to feed when their food bar is maxed, slowing down a little. This behaviour would encourrage not wiping out preys when the predators are already full of meat, which, okay, will allow them to reproduce, but will almost certainly mean death for their offspring because there wont have sufficient food if they don't relent when their needs are met. Also, less predating when energy is full means less speed, and less energy consumption, which means more that the creature might even not really lose potential lifetime, as his health will decline slowly. Making it so predators that died of starving live a body that predators can eat. Just as I mentioned above, predators are not just hunters, and most of them, moreover if starving, will eat bodies of preys others have killed if they can. In this simulation, preys can't die of starvation, but predators that die of starvation still have a body, unlike preys which are always eaten if they die. This would make sense for two main reasons: A large number of predators wouldn't always mean a large decline in both preys and predator, because the predators could go eat the unmoving predator body instead of chasing another prey that could run out, and predators could split from eating their own that lacked food instead of just preys. Also, it would allow for the developpment of scavengers like behavior and even genetic lines, as maybe some predators wont put most of their eggs in more mobility (which makes out most of the most successful strategies in most life simulations with predators against preys that I've seen for now), and rely more in their ability to find and eat bodies. Like with the previous proposition, this would allow for less almost mutual extinctions, and more balanced ecosystems. Conversely, it wouldn't be a bad idea to allow starving predators to attack other predators for food. This will mostly allow good predators that have been isolated from the main body of preys to ALL die because there is absolutely no prey to eat here, when in reality, half the predators could eat half the others, and survive long enough to get to the preys. If any of you reading this comment find these ideas interesting and would like to give my comment more visibility, feel free to like it.
Maybe but this would give predators a massive advantage as when the population of prey is low, the population of the predators wouldn't decrease as rapidly and could result in the prey quickly becoming extinct. You could increase the number of meals needed to split but I think this could slow down the evolution.
@@adsa2124 Ah, but if we are trying to make an accurate simulation of real life, this is actually more like how real life predators and preys work. Also, most videos I've seen that try "preys vs predators" are biaised towards preys, mostly because of what I suggested here. And I predict that the predators wouldn't wipe out the preys because they would less rely in high speed and running all the time, and if they are well fed, maybe wouldn't chase a prey at all. Why bother eat more if it doesn't give any benefit, whereas just following a prey for when you are hungry, without actually chasing it, means less trashed energy for nothing. I can't know for sure, but that's my prediction at least.
you should make it such that the prey can see other prey. Then if one prey is moving away from the predator you may get some nice swarm-like behaviour (like fish)
I think at some point the prey had evolved to be jittery, which made their vision a lot better because it meant their sensors didn’t have as big holes in them.
Cool video, but the colours you chose make it impossible to tell the two types apart if you are colourblind ( at least, they do for me :/ ), if you do something similar to this again could you try avoiding red/green combinations? Edit: did a quick Google search for other colour combos to avoid: Green & Red; Green & Brown; Blue & Purple; Green & Blue; Light Green & Yellow; Blue & Grey; Green & Grey; Green & Black Those should cover pretty much every type of colourblindness, some good combos might be yellow/purple, red/cyan, etc. mostly complementary colours with a lot of contrast, I'm sure there's one that would still look nice while being easy to tell apart.
Is there some kind of filter that you could use that could replace green/red with yellow/blue? Maybe a monitor setting? Obviously that wouldn't work for everything, but for situations like these where it's specifically the green/red that you wish to tell apart.
@@chad_bro_chill Yeah I feel like this is the kind of thing that a browser extension could probably fix for him for any future issues he might have. Dalton is the one my friend uses iirc
@@chad_bro_chill as far as I'm aware there's nothing that can do this well, at least not on mobile which is where I watch most videos. Besides, with ~1 in 20 people having some form of colour vision deficiency designing things in an accessible way is important, and red/green is possibly the least colourblind accessible combination you could choose.
Very interesting (and well made video). I wanted to talk about two things: - there is a small bias: if the predator wins, the predator loses. Do you think it could have had an effect on the outcome? - dobyou have an explanation about the fact that the avg lifespan of prey never gets high? Could it be from a bias in the hypothesis, or just an effect of the survival strategy? Thanks for your work
I'm not sure if there is much bias when the simulation is based on whether or not the predators can hunt all the prey, and both the predators and prey look like they have their own advantages, being the predators can kill multiple prey in a row and the prey don't need to seek for food for energy or survival
I don't really think that it's the bias when predators win and lose simultaneously. If irl predators would eat everything they can, they would simply die of starvation. The more biased result for me is that, when prey wins, they could also lose. Why? Cause irl they would also eat up everything they can, and in one moment they also might run out of food. Still, the greens can start growing back, so when the prey population decreases, the food amount will grow etc. So yeah, it's pretty natural that if predators win they lose, for predators to live on they just can't eat all the food in opposition to prey, where food has a chance to grow back automatically
@@Squotty_Patty if the prey starts eating up all the green they'll cause a collapse in the ecosystem for many other animals, namely destroying food sources and allowing for the plants that they don't eat to further push out other plants and cause mass erosion and all that. At least that was the case when the elk population shot up after wolf extinction. Young aspen and willow trees got ate, the beavers almost went extinct, wetlands became rivers and tore up the soft ground, and the coyotes ate pronghorns into the floor.
Cool simulation! I noticed that the prey and predators didn't recognise their own in their FOV. I wonder what would happen is you factor this in? Either having a color sensing node, or just give predators values ranging from -1 - 0 and prey 0 - 1, or something. I assume that we would see some interesting behaviour, but who knows?
without further rules, prey could avoid other preys because more prey attracts more predator. But since there is a digestion period they might start to hide behind each other.
It would be really interesting to see a simulation like this, but just slightly more complex. Like if the prey also had to eat, and maybe the predators would learn to stay around the preys food sources. But then they also need to balance that with being able to eat before they perish. Would be really neat!
An interesting extension could be to add a sheep dog/ protector sort of roll where the protector defends the prey (deters the predators) and herds nearby prey towards random incentive goals (with number of prey delivered weighing AI fitness).
Depends on the weight given to fitness of proactive defense. Maybe protectors are more focused on getting prey to incentive goals rather than dispatching/starving predators. Maybe multiple predators working together are needed to take on/overwhelm a protector?
Amazing work as always! 👏🏼 Could you tell us a bit about the specs of this simulation? What engine you are using and on what hardware? Also, is what what see the actual simulation playing in real time or is it the render you get after weeks of computation ?
Thank you! I am not using an engine, it’s written from scratch using c++ and bgfx for the rendering. What is shown on the video is the actual 14 minutes of simulation running in real time on an m1 MacBook Pro. This program is currently single threaded so it could run faster but it was enough for the purpose of this video
@@PezzzasWork wow thanks for your reply, now I'm even more impressed! Crazy to think about all that is going on (even without rendering) on one part of a single chip 🤯. Also amazed that you could set this all up, seems like a lot of hidden work I underestimated, thinking you used an existing game engine or something... Contrats !
1 - too much food, too few predators 2 - predators populations increases, preys population decreases 3 - too few food, too much predators, 4 - prey population increases, predators population decreases. and repeat
Hey, this is awesome! I totally want to mess around with this simulation myself...but also respect your code. Any recommendations on tools to use to make this kind of thing? Will you put the source code up?
@@diogofidalgo2202 I would really like to know the tools you use. I am really interested in this kind of things, and I am studying programming, so this could be a great concept to investigate.
@@sebastianr.1919 C++ and a 2D game library called allegro. I draw everything on ms paint. Since i learned programming by myself my skills are very limited. For example the view range is a circle, they have a mutation called "eyes" with 5 lvls. At lvl 5 u see the creature with 5 eyes. Legs is also a mutation that affects run speed. The brain however is not this good, they have some things that change, migration direction, diets, colors they eat (8 or 9 colors) and hunting true or false.
Was LITERALLY learning about this (kinda) at school recently. The teacher talked about how when theres a lot of predators, the number of prey will decrease, then therell be less food for the predator, so the number of predators will decrease, then as a result, the number of prey will increase, which also means more food, which then revives the number of predators, and this repeats.
I love how you can see them do things from nature, at first I thought I was a coincidence but then when the predators started herding the prey my mind was blown that I was right
What software was used for this? BTW, a few notes: Didn't dig the zoom-ins, but otherwise fun simulation. Maybe leave the full screen up but put the zoom-ins in a corner so you can highlight what you think is interesting without distracting from the big picture. Also, I'd lower the predator reproduction rate a little so population booms don't happen as frequently allowing for a more equilibrated simulation. If it just cycles prey boom into predator boom, extinction is far more likely.
at 11:19 you can see it's actually just 4 prey left at one point! But they managed to elude the predators long enough to starve out what looks like well over 100 of them. Good job with the simulation!
Love it. If I could make one recommendation, it would be to allow neuron dropping. Setting all weights of a given neuron to near zero is close enough, but dropping the neuron entirely could make a difference.
I'd love to see some modifications that would (potentially) make the simulation more interesting: - spots with "grass" or other sources of food that preys can consume to get energy back - predators having higher acceleration than preys (but the same top-speed?) - predators having a sense of smell (to detect the preys in close vicinity even if they don't see them), probably not necessary for preys since they have 360 vision - bonus to splitting for preys when they're flocked together - some sort of structures/terrain that can be used to one's advantage, though I imagine it would complicate the implementation too much - other types of predators with different movement types, or sporadical viruses that are dangerous to everyone but die off quickly if they don't spread Either way, this was pretty awesome!
I love how the prey can also move backwards at the same speed, meaning they can run away from the predators while staring at them the whole time
OMG its you
It’s more helpful for predators to move backwards, they have a limited sight
Yeah. the prey that were dodging were fun to watch. I just wish they had stationary food to eat to gain energy,, because after they dodged amazingly, then they got tired and became sitting ducks
You did not get it, preys have 360 degrees vision. Eyes are just cosmetic feature with no influence.
I hate that, I think this shouldnt be the case.
As a biologist, I think this simulation could be a useful educational asset for schools! It could be considered as an accurate representation of the Lotka - Volterra model, which presents the changes of prey - predator populations over time.
I agree, as a biologist myself I was really impressed with how well this simulation demonstrates predator-prey interactions. We even see numerous adaptations in both the predator and prey populations. The prey population for example began creating herds at some point where individuals at the center were more protected. Truly awesome work.
@@jamalyeboah4322 Same with how the predators would start working together or approaching the prey from behind.
I would like to have that at my school
bro this has been done soo many times let the man have his simulation there are more that are better then his
@@dlastwire5365 And who asked smart guy? Why don’t you go watch them then.
It was interesting seeing the predator's numbers drop shortly after the prey numbers drop, and seeing them rise when the prey numbers rise. It shows how dependent on prey they were.
It's basically the fox and rabbit equation. If one variable (predator count) increases at a rate based off of another variable (prey count), and that variable decreases at a rate based off of the other variable, they form a cycle of increasing a decreasing, with the predators being about 90 degrees behind in phase.
Food web
It was surprisingly interesting to see how low the numbers could drop and then skyrocket back to the max. It should put us to think before trying to intervene when observing changes in the ecosystem. It's part of dynamic balance.
@@robwilliams6753 if there were no more arguments, your ego would drop off too
@@digitalisdizzydamn..
A small modification you can add is making entities use more energy when going especially fast, and practically no energy when moving slowly. This may encourage preds to try searching for prey more than just spinning, and allow prey to dodge more
I 'm pretty sure that is already implemented
Moving backwards should also come at a speed pentalty.
E
@@baltulielkungsgunarsmiezis9714 moving "backwards" is irrelevant in this simulation, the eyes are just a visual thing and the preys have their circular FOV so theres no "front" or "back" to the preys
@@JMaximusIX There is a front and back, as their sight is dependant on direction.
It's pretty interesting how the prey entities seem to display herd behavior at times. Very nice simulation!
Edit: I meant for this to just be a quick comment about what I thought was an interesting pattern emerging in the simulation. I didn't think it would actually get so many likes... I know/knew that prey are not able to see each other, in fact, that's exactly why I thought this was interesting in the first place and many times in nature you can observe what APPEAR to be social behaviors emerging out of asocial processes. Some people seem to think this is an obvious or trivial pattern that is not worth consideration. I wouldn't jump to such a hasty conclusion. Yes, it is true that the herd does not physically stop predators, BUT it does block their line of sight and predators could develop hunting tactics that discourage them from entering the herd (which prey could take advantage of). Over time you may even see societal roles develop in which active individuals circle the outside of the "herd" while avoiding/distracting predators, while sedentary individuals reside within the herd where they thrive (thereby creating these large clusters). I don't know the exact details of the neural network that was implemented here so this is ultimately all just speculation. Perhaps the herds ARE just random areas with higher reproduction rates (although this very fact already suggests an evolutionary advantage to such a structure) but nonetheless I still find this interesting to ponder and analyze. I stand by my original comment that it is an interesting observation and certainly a thought-provoking simulation.
I don't think they can see each other, I think since they reproduce when they stay still, they tend to grow into big colonies together just because that's where they were born
Thank you! Your turn to do a video now :D
@@Hailfire08 There's a reason why I said "seem" lol... I've actually written some similar simulations before where the entities *appear* to display social behavior, when in reality they have no idea that any other entities like them exist, I just think it's an interesting example of emergent behavior
@@PezzzasWork I was actually just working on editing my next video and I took a break to watch yours haha
Nice! I will be there when it is published!
Prey's group movements, in the latest stages, are surprisingly similar to those you can see in bird flocks or shoals of fishes
I noticed that as soon as they started grouping, and the predators behave like wolves.
@@hyperblueeonbeta they would converge to wolf like behaviour if there was communication mechanism between the predators.
@@udittlamba I was stating that multiple predators can be observed "attacking" a prey.
@ToeTruck Some prey get super territorial, but most seemingly stick together (strength in numbers and easier to blend in with a group making it harder for predators to pick out any individual)
@@udittlamba In this simulation agents can't even see others from the same species. They don't need to communicate, just see each other would be enought to add more complex behavior. Same for Preys. The grouping is just an emergent feature of the simulation, but they are not doing that as a behavior since they don't see each other. They just see a blank space and try to move there.
It would be nice to add a second layer of "eyes". One is sensitive to it's own species and the second layer to the opposite species.
Incredible work! Amazing idea & very fun to watch. This "crisis" periods are characteristic of predator-prey models, see e.g. the Lotka-Volterra equations.
Thank you! Didn't know about Lotka-Volterra, thank you for the reference! it is always fascinating to see a natural law emerge spontaneously from a simulation
Yeah!!! I was thinking about those differential equations (lotka-volterra, predator prey model) And I would like to see the whole simulation but without an upper boundary to see what happens. Pretty nice work!!
I worked on a project with L-V equations so I don't wanna mention how hard my heart sank when I noticed that they were following an L-V model lol
Love seeing the expected periodicity in the predator and prey population sizes in the bottom right, shows you did a pretty solid job modeling :)
@@oscareduardofloreshernande7853 I coded something like that (but way less fancy and without evolution) as a toy demonstration of the lotka-volterra limit cycles for a uni assignment a year ago:
th-cam.com/video/G4qt5cSSf9Q/w-d-xo.html
This is awesome! Here are some interesting ideas.
1. Add a third entity to simulate foliage. It is static, grows at a steady pace, is eaten/sought out by the prey, and neutral to the predators. This would cause concentrations of areas that the prey will sit similar to feeding grounds/oasis.
2. Set random evolution parameters with speed, energy depletion, digestion, & splitting. With things like capped/floored energy. Quicker or slower speed acceleration. Etc. It'd be interesting to see if low energy, quick accelerator, low cap speed prey outruns a fast energy burning, no capped, floored speed predator.
3. Maturity. Add in a maturity/size variable that dictates speed, energy, etc. Smaller prey gives less energy but is easier to catch, etc.
No.
@@NirtieDigger bruh it’s a good idea
see if any of the predators start eating foliage and start holding Signs saying eating Prey is Murder
There is a game u can download called the bibites that sounds extremely similar to what u just said. Lowkey think this guy got the idea from that.
I'd love a remake of the video with your ideas included
Honestly, its so mind-bogglingly interesting that you recreated survival of the fittest in such a simple but thorough demonstration.
i wished he could also make a variable for actual "physical" fitness. Eg, give predators and prey a standard deviation of energy and speed. cause that would have proven even further evolution through fitness.
Less like "survival of the fittest " and more like "The perishing of the maladapted"
@@DG-iw3yw Fundamemtally, that is moreso how evolution works
So interesting! I'd personally love to see two features added: 1. prey grazing. The longer the prey sits in the same spot, eventually that spot has been over-grazed and provides no more energy, so the prey will have to keep migrating around the map for more to eat, while the depleted areas gradually grow back. 2. terrain. Say one corner of the map is "rocky" and movement is halved or quartered, how might predators and prey evolve to be suited for that terrain? Will prey sit up there like mountain goats, while the predators can't get up there to get them before starving? Thanks for making this simulation, and for sharing it with us. I'd love to see more.
exactly this were my toughts too! I even went a step further to add clime as well rain, temperature, etc. :)
I would add prey defences just like in nature such as deadly horns, kicks, and stampeding.
@@mtolives exactly, or even something like mobbing by prey, protecting young by prey, threat perception by predators. Some form of aggression/deadliness modifier. Could be done by rng? Eventually those with a higher aggression number would breed, but the counter aggression/deadliness by predators would also be forced to evolve. The proverbial ‘tooth and claw’ evolutionary mechanics. Evolutionary arms race we see irl.
I agree with Mark. 1. Prey should also the predator of lesser being, like plant. So they also have to find their food. 2. Predator should have bigger feature than the prey. 3. Terrain, aka Hiding place. There are should hiding place all around the map where predator has bigger problem to reach it. But because prey also need to find food, they eventually has to get out of their hiding place.
Make both prey and predator a bit more complex. like they should also need to sleep.
@@gunh4129 AI, like ants do not require sleep in order to function. They do however, require energies.
It seemed like at some points the predators had "evolved" to leave the herds of prey alive, instead circling around the edges in order to pick off enough to survive, but not kill the food source.
More tiers of predator would be interesting, to see if you could create a perpetual cycle of predators that keep each others population down to prevent the extinction events in this video.
So humans farming and herding is predation behaviour.
@@Zenovarse Not necessarily, as predation is the act of 'hunting' a prey. Humans have in the past derived a large amount of food from hunting, however farming and herding is separate from hunting. They are born and raised in a captive environment and then slaughtered, there is no hunt or predatory behavior, it's simply a life cycle that's controlled from start to finish by the harvester.
@@Zenovarse it did resemble how dolphins herd fish into balls in order to catch them easily
@@Lithane97 ehem, yes and no.. It's different but same at the same time.. There is a step between domesticating the prey and pure hunting.. Population control.. You don't hunt in special times, even if you could.. You hunt animals that have "overpopulation" or endanger you otherwise, this makes hunting more efficient.. And domesticating is then just the next step.. U get rid of the need to put energy into finding the prey..
@LEO&LAMB YES
You should add a grazing effect! Like prey can only regenerate energy and reproduce as they move over the area, but with a lawnmower effect that has to regenerate the resource the prey eat overtime, so the prey can "overgraze" an area in the absence of predators!
thats what the resting represents
@@elijahyes3110 they suggested gaining energy only while moving
Idea: make it, so that each time they split, they randomly change they fov and range of the rays. Those with higher fov and range may for example consume more energy, but they can see so much more. Therefore we would see if finaly evolution decided to go with higher fov and range or lower to consume less energy. Also, cool video.
Thanks for likes
add stress level? more rays adds more stress/time but you can temporarily disable the rays (closing your eyes) to reduce stress/to rest
moving a lot also increases your stress level
if it goes to 100% you die
Yes, and make predators and prey start with the same FOV. That way making predators and prey having the FOV they had will not seem like an arbitrary decision, but rather one that evolution favours.
Prey would likely favor higher fov since they only need to sit still. If there aren't a lot of predators, they'll have plenty of time to sit around. However, if there are more predators, prey may favor lower fov so that it can run for longer.
You should add health bars too. Instead of it being a one-hit kill with the predators, make it a 2-hit kill or randomize the damage, or base it on other factors that can develop with the evolution. The best bart though is why not let the prey do a little bit of damage? Make it so they do 10% or so damage to the predators max health so when the predators dive into the big pools of sitting prey, they have a chance of not coming out alive. Could randomize their damage too and a way to regen health, maybe. I feel like you wouldn't want to make their lifespans last longer for the sake of the speed of the simulation.
watch bibites
It'd be interesting to see what they would do if they could detect their allies as well, maybe have the view blocked by them too.
Maybe the predators would avoid eachother to get a better view and not risk having their meal stolen, and the clumped up prey would only know what's happening by observing the movement of their herd.
E
@@EEEEEEEE E
Maybe there would learn to farm the prey by just standing close to them while surrounding them so that they have a constant source of food.
I think they can see each other. They start hunting in groups at one point.
@@superboi If they move in the same direction they don't split. And they move in the same direction because they have similar brains.
I love how by setting such simple rules you could get such a complex result. Evolution AI really is amazing!
Seriously awesome end screen there, actually did not see that coming, very cool!
Thank you!
@@PezzzasWork it was very cool! I also have an idea: what if some predators/prey are slightly different speeds than their parents? They could be slightly different tints, and I was wondering how that would work out.
its like a second christmas when you upload, love the stuff
I agree
Thank you, this comment is like a second christmas to me :)
So freaking cool! Evolution, prey-predator equilibrium, resource competition. So many things shown in this simulation. Terrific job!
It would be great to have a mutation/evolution function where there's a random chance for the predators and prey to upgrade a certain skill, whether it be observation, or speed of travel, or energy efficiency, or angle at which they can turn; I think it would allow the populations to become much more successful at hunting/surviving
I did something similar to this once but with the addition that it cost more energy to stay alive the more upgraded it became so it had to be able to utilize the new speed/strength/etc effectively. It allowed for speciation into cheetah types, tank types, etc. My favorite was what I called the plant. It soaked up the ambient energy (light) and had zero speed, defense, etc. Just exists
but there is, at 2:20 they explain it
edit: 2:14
@LEO&LAMB I can't tell if you are joking or not. 😅
@@nicholaslogan5185 lmao this guy 😂
@LEO&LAMB In a GAN the AIs fight it out which is why these simulations are non-deterministic. They are meant to go out and try new things. We give them the building blocks for growth, and they apply those rules until they reach a point where they reach conclusions logically that were derived from the rules of logic but not concretely expressed.
It would be very helpful to see the graphs spanning the entirety of the simulation, so you can see any longer-term trends more clearly!
E
@@EEEEEEEE I concur
This is the epitome of
“Tough times create tough men.
Tough men create easy times.
Easy times create weak men.
Weak men create tough times.”
Nice 😉
Completely wrong. you completely disregarded the point of the demonstration, overlooked the interdependant variables. everything. in this simulation both prey and predator GET STRONGER OVER TIME! always! this how the simulation is SET! there is no "tought times" or "weak man/creature". its a cicle that CANNOT and i repeat CANNOT be extrapolated for HUMANS. and you know why? cause the biggest predator of humans, are HUMANS!
I think we are in in 3rd stage right now..
@@amin56754 Dude your like 5, stop making everything edgy
@white lady gaming what did they say?
It doesn't seem like prey rays intersect with prey, and vice versa. I'd be interested to see how behavior would change there, maybe flocking?
Flocking does actually occur a lot with prey. It can be seen clearly in the timelapse.
Same, it could lead to a lot more interesting behaviour.
I will try to integrate that, with some rules to allow preys to defend themselves for example
@@PezzzasWork this game about to become a race war with two way fights
@@PezzzasWork Damn these videos are awesome. You really need to implement these nice new things and then make a video out of them again, that would be phenomenal.
Conclusion: i see the pattern as when the preys are overpopulated, they cant dodge anywhere and predators will eat through the cluster, then prey’s population went low means less food, making the predators die and giving the preys an easier time to give birth and this repeats. But then suddenly, a prey became a freaking ninja and just dodged all the predators, more of them learnt the arts of dodging and predators slowly died out due to the difficulty of hunting preys and they finally won
Someone figured out how mother nature works. Usually this is taught as a program in coding classes, with wolves and sheep. You can manipulate the amount of sheep, and wolves, and watch in real time that when there is more food the wolves multiply quickly and hunt sheep, but when there is a small amount of sheep a majority of the wolves die.
Three Results happen towards the end of the program, the sheep manage to starve out the wolves, and explode in population. The wolves consume all the sheep, and quickly die. Or you get the numbers just right, and the cycle continues forever.
@@notleviathan855 The reality is that once the sheep population drops to the point they become difficult for the wolf to find, the wolf switches to different prey, prey that is more abundant, giving the sheep numbers time to recover.
The difficulty with such models is you are modelling the interspecies relationships between a single prey and a single predator, and the real world is almost NEVER that simple. There are a few cases where it is, but they are very much the exception not the norm.
Most predators rely on multiple prey species, as most herbivores rely on multiple plant species. When you start trying to model those complex interactions than the simulations both start looking very different, and climb rapidly in complexity.
@@alganhar1 , it is reducible, though, to something like this, where you can just consider all predators as one group and all prey as another group. Regardless of how many of the predators are made up of wolves, coyotes, etc. or how many of the prey are made up of sheep, rabbits, etc. That simple simulation can still reach the same conclusion as real life, typically equilibrium, but sometimes the destruction of one or both groups.
@@notleviathan855 In coding classes? I learned that wolf/sheep example in biology!
yeah. Ideally, the predators would want to be good, but not TOO good, in order to survive. But the natural curves we see are observed in nature too.
10:10 Didn't expect that, definitely thought predators would win
Same, even if the predators did win, they wouldn’t have any prey left so they’d die
I love this new trend of making your profile picture with your code at the end of videos. It's very creative!
I don't know why I started doing this but I enjoy it very much :D
Awesome video, especially love the googly eyes
Might be interesting to give them an ability to detect fellow predators/prey, see whether they want to cluster or split up.
And to fight back and mutate phicical power
I love this. I'd like to see what happens if they could intersect with entities of their same kind and distinguish between who is friend and foe. You could have clusters of prey that move like a bank of fish, and predators that team to circle the prey
It would’ve been cool if you had the predators and prey very slowly randomly change color within a set range to see which individuals are generally related based on how close they look to one another. It would be a relatively simply addition. Either way, amazing video!
maybe some of them would turn green to try to be an (among us impostor noise) fake prey
Neat! One thought for the prey is to have them 'overgrazing' cells, so, over time, their energy recovery rate drops lower and lower the longer they are in a particular cell until there is no 'food' left and the recovery rate becomes negative, forcing them to move or starve. This would emulate real-world consequences for overgrazing.
I just assumed they gain energy from photosynthesis. xD
That would be great to bring irl consequences into play.
No one's talking about that one predator at 8:57 who eats like 20 prey in just over a second. Dude must have one hell of a mouth.
I didnt notice
@@ShironCollab its actually 8:29 middle of the right half of the screen. He must be the gigachad of blobby limbless predators
SUGGESTION FOR THE NEXT ITERATION: Please put learning in it for reacting to the actions of your own species, instead of just interactions with the other species. This will make for interesting results because of a)"flock" behaviour of the prey i.e. they all run when spooked and b) "pack" behaviour of the predators, who might find it advantageous to move in the same direction of nearby predators. Finally I would like to see the prey interacting with the environment i.e. eating greenery. When the underlying tile goes from green (lush) to yellow (partially grazed) to brown (over-grazed), the prey have to move on.
If you expand on this, I'd love to see a few more selection pressures added on both prey and predators.
- Second "Stamina" bar whose maximum is equivalent to 1/2 current Energy.
- - Stamina regenerates/is used at a variable rate based on speed - allowing for low speed travel to still recover stamina, albeit at a slower rate than standing still.
- Energy always goes down, even when standing still. The rate of decay can also be based on speed as with stamina.
- Food appears in random spots, only edible by prey.
- Possible bodies of water, necessary for both prey and predators. Larger ones could effectively be considered infinite while small 'puddles' could be used once and recover a percentage of the bar, similar to food.
- Reproduction would be a function of energy, as opposed to lifetime. If energy > 80%, allow reproduction. Reproduction uses a percentage of energy, say 20%.
The food mechanic would cause prey to compete with one another as well as with predators (as they do in real life), and I suspect that water (or even just food) and the change to stamina/energy would introduce a subset of predators that camp larger concentrations of food/water as an ambush predator.
The more pressures you add the more complex the model gets and the more inaccurate. That is the very reason why Evolutionary Models are considered by those of us who actually work in the field as imperfect tools. This is not to say models are unimportant or useless, they are not, they can and do help drive our understanding of the true complexity of the tangled web that is Evolutionary Pressure and Selection. But we always have to keep in the front of our mind that they are imperfect tools, and while useful they should not be taken as gospel.
The problem is they are simplistic. No computer can handle the huge number of variables that are all traits of a single organism responding (so being selected for or against) by the environment in which the organism lives. Bear in mind that environment does not just include inter specific competition or interactions, but intra, as well as the innumerable reactions to the physical makeup of that environment. And this is before you add the elephant in the room that is random mutation.
Now most Evolution is essentially selective pressures working on traits that are naturally variable in any population of sexually reproductive organisms. Usually mutations are either neutral or deleterious and either remain in the population not doing much, or a swiftly weeded out in the case of the deleterious mutations that have no positive advantage. Occasionally however you get a mutation that is advantageous, and it spreads like wildfire.
A good example is the rise of Lactose Tolerance in humans. Go look at mammals and see how many are lactose tolerant in their adult years. Humans are literally the only example, at least as far as I know and I am fairly up to date. That is a mutation that arose some time early in the history of domestication. That is pure random chance, and no computer on the face of the planet, now or likely ever, will be able to come even close to modelling the effects of random mutations!! Including I may add humans themselves!!
Well, the goal of these is rarely to emulate life or reality, as usually the only thing that is being 'mutated' between generations is behavioral choices.
E.g. generation 9774342 is just as fast/slow as generation 1, but the later generation has developed the ability to control its rigid physiology better.
Barring the AI finding a 'hack' as they often do when tasked with a gamified task and goal, I fail to see how it could become more inaccurate (at showing the rise of behavioral changes in response to environmental stimuli)
I really like this series, even though at the time of writing this it’s only two episodes. I can’t wait for more content about this, keep up the good work!
I love watching simulations like this, so intriguing!
Others have commented some really interesting features; here are a few I thought of.
- What if predators and prey were further randomly divided into male and female, and males and females would have to find each other and spend energy in order to reproduce? Would sexually dimorphic roles develop? Especially if the sexual processes (energy spent, gestation, who gives birth, etc...) differed between the types.
- What if predators didn't immediately consume prey when they touched them, but instead depleted their energy, and when an organism's energy was depleted, it turned into a dead body, which only then could be eaten, and would be deleted after a set amount of time if not eaten? Could some predators perhaps develop scavenger like strategies, swooping in to reap the rewards of others' work, instead of wasting their own energy chasing and killing prey?
- What if initially all the organisms had both prey and predator abilities, to varying degrees of effectiveness (some would deplete more energy from their targets by attacking them, some would gain more energy back by staying in one place, some would get better at escaping)? Would predator and prey roles develop naturally or would one weird, cannibalistic creature develop and spread?
Would have to be careful with the first one, they might de-evolve and identify as something else and not breed at all! (j/k)
@@DavidMTheKrucifix Playing w fire, my friend
@@DavidMTheKrucifix lol thats what i was thinking. that must've taken much bravery to say in a public thread.
@@robyrobt1714 It's because FACTS don't care about others feelings ...
Remember, that Gen X noone wants to talk about ... well their kids oare almost voting age!
@@UniverseofDominion Well, I identify as NOT OFFENDED, so I don't care!
Nice simulation, I really enjoyed watching it.
Here are some suggestions:
As you may have noticed, the population switched relatively quick between nearly drying out and max population. If you have the computational power, maybe try increasing the max population.
You could also add more parameters to the entities and give them less restrictions. For example, don't force them to have a fixed pov. Even if the "narrow but far" fov for predators is a thing in nature, it should evolve automatically in the simulation, if its changed a bit for every new child.
Also, you could try to not force the entities to be predator or prey. If you include food/plants that will naturally grow over time and give them energy, every entity can evolve to be a carnivore, herbivore or omnivore. You could even add caves/hiding places in areas with plant and let the entities evolve their sizes. You could even include a day/night cycle. There are so much possibilities!
If you don't have entity classes anymore, you could make the entities appearance based on their properties: More meat as energy= more redish, more plant based food= more greenish. Wider fov= wider distance between the eyes.
Anyway, really great work!
When you give predators the ability to eat predators and evolve into herbivores, it's quite likely that they will evolve into herbivores. Because being a herbivore is easier, as you don't have to chase other creatures. And I think the only reason predators were able to last so long is because they couldn't eat each other. Predators eating each other would have saved them when they were starving, but it would also take away their advantage over herbivores: lack of predation.
The reason predators last in real life despite being able to eat each other is because herbivores make the best meals. Plants are hard to digest, and carnivores are dangerous, provide worse nutrition and are more likely to give you a disease, especially if they are scavengers. I know that some scavengers, like vultures, stop disease, but that may be due to competing with other scavengers, like flies, and eating scavengers could still give you a disease.
@@magentamonster IRL herbivores are dumber and slower then carnivores and omnivores. BTW most of the animals that we call herbivores are actually what is called "Opportunistic Carnivores" like the humble deer which will munch on a bird if it gets the chance. true herbivores are like cows. they can stampede but are otherwise pretty slow. Also cows are among the animals that shouldn't still exist if humanity hadn't farmed them. soooo yeah, the world tends towards omnivore and predators might evolve a secondary ability to eat plants but it's more of a 50/50 if set up correctly.
@@liamnehren1054 Perhaps another reason why predators evolved into herbivores and scavengers in the simulation is because it was too easy. In real life, it is complex. Many genes control diet. There is no use in an animal wanting to eat plants when it doesn't have the appropriate digestive system. And herbivores are more vulnerable to predation, so any animal evolving into a herbivore must adapt to counter the increased risk of predation. And I think that the reason why predatory traits are lost when a predator evolves into a herbivore is because they waste resources and are vestigial. Sharp teeth may make it harder to eat plants. The reason why sharp claws are lost when an animal evolves into a herbivore is probably because it is worse for locomotion, since some herbivorous, bipedal dinosaurs like Iguanodon, therizinosaurs and hoatzin chicks have them on their arms. Also, many herbivorous birds have sharp claws on their feet.
Yes. It was a bit silly that predators ignored prey close by but off to the side. They should have a simulated sense for hearing and smell or at least the ability to “glance” left and right.
Could predators also use teamwork to hunt one target, and take half the energy from a kill they herd/trap?
@@magentamonster Birds need claws to hold on to branches, bark, and masonry. All life is different, and the most fit to an environment are most likely to breed there, as evident by Darwin's study of finches.
6:03 I love how on the left side, there are 2 prey hiding behind a predator moving with that displayed text.
Very nice video, it was really cool to see the typical hunter and hunted cycle: more prey = more predators > more predators = less prey > less prey = less predators > less predators = more prey > and again... Looking forward to your next one!
It would be cool to split this into four groups, Plants, herbivore, Predator, and omnivore.
Predators could gain a small amount of energy for eating other predators encouraging them to compete against each other.
Plants mutations could be how they spread and maybe add a digestion or movement cost to the herbivores
Omnivores could have more food choices bot not be as adapt at digesting either.
I would be curious to see how added competition groups would change the result, or if you could build a digital terrarium.
Pretty sure Omnivores have a huge advantage, but it would be interesting to see if it creates some kind of never ending cycle where nobody ever wins
@@Ze_Chevalier My thought would be omnivores couldnt 1v1 a predator, and they would have more access to food but have a disadvantage at the nutrient gain as they arent specialized in digesting any type of food. Maybe they could even require a balanced diet and a mutation could effect the spread there, but that could be making things too complex.
@@TravisTheArtist dead animals leave bodies which can then be eaten by meat types, and depending on how much of the body is left uneaten (maybe it has 5 small food points), it will then cultivate plants in that area after some time
@@TravisTheArtist The prey in this simulation would be the plants, they are the begin 'food'. The predators in his simulation would be the herbivores, they hunt the plant. If you make the omnivores eat herbivores and plants, that's 1 competition between omnivore and herbivore for plants. Then make predator eat ominvore and herbivore, 2nd competition between omnivore and predator for herbivores.
If you make predator eat predator, then the moment it spawns a new generation, it would see it's offspring as food, and the offspring sees parent as food. Simulated cannibalism ;)
If u want to add canibalism, then u need to add gender and multiplication with it, or u end up with one predator eating his own children
Wow! You have the scariest and most educational YT channel I ever watched. THX. Keep it coming! Subscribed.
Once the prey learned to exploit the weakness of the predators, being dodging, getting them tired, and getting them to die out, they have managed to gain the upperhand. as they didnt need as much as predators to stay alive. they could focus on others weakness on the main spot over their own.
Certainly interesting.
That's cool as heck. One of the best 2D evolving prey/pred simulations I've seen. I'm waiting for a good 3D one, that's when artificial life simulators will get really interesting.
6:51 "Don't touch me buddy!!! Here, eat my child instead"
Not that it would be testing the AI itself directly, but I'd love to see vision as another randomly adjustable variable alongside the AI behaviours when splitting. Make a variety of vision range/arc settings with even distribution between (and extending beyond) the current values, so they're still at least roughly balanced but some are more useful for spotting things far away, and others for seeing targets coming from any direction. I'd be curious what the vision arcs for the most successful creatures of each type would turn out to be over time.
It would be so interesting to see the predator/prey amounts on a 2d graph, with the x axis representing one and the y axis representing another! I guess it would just be about the same loop over and over with minor variation, but it may be cool!
Or a stacked chart showing percentage of Predator vs Prey over time, maybe it would equalise to a stable level given enough evolution.
Wow so interesting to see, especially the time lapse! I would love to see strategical elements such as spots for food and water implemented!
Damn, I was kind of hoping they'll find a balance and learn to co-exist.
Nonetheless, amazing job!
well it's possible to co-exist on some patches of mutual benefit in civilized society, this example was not one of those lols
From the point of view of a single prey or predator, they did co-exist quite a bit. Everything comes to an end.
Can`t wait for this to get REALLY complex.
This was very cool. The bits at the end with the graph timelapse gave quite a few thought provoking things out of it offer done.
This was really fun to watch. A lot of times, the Preys were close to extinction, before coming back with a vengeance.
But this was done with each entity acting on its own and responding to inputs from its own network. I wonder how the experiment would go if entities were to communicate with others of the same kind and even coordinate their actions.
I also noticed that Predators tend to zero in onto one prey and pursue that prey single-mindedly even if another prey happens to come alongside parallel to it and would be eaten if the Predator just made a 90deg turn to this new prey. Wonder how the results might be changed if this algorithm was programmed into all Predators.
This is a very interesting experiment. A lot of scenarios and parameters that can be tested. Even including making the borders solid such that entities "bounce" off them instead of exiting and rejoining the board from the other side.
It'd be really interesting to see a version of this with a larger board possibly filled with some obstacles and give the prey's network the ability to see how much time they have left until they split so they could maybe evolve behaviour such as strategically having children in a specific place to avoid predators. Either way, very nice content, loads of fun to watch
As well as possibly having a second type of predator which only preys on the first type but has larger energy storage
Player Gains: Skill, Friends
Character Gains: LV, Currency, Abilities, Items, Armor, Allies
Enemy Gains: Lv, Abilities, Items, Armor, Allies
I want to see more of these kinds of simulations. Some with even more abilities, like sprinting but consuming more energy. Different evolutions of seeing, like bigger fov or an increase in range but narrower etc. Maybe some with the ability to hide, by appearing further away than they actually are if they arent in the center of the fov of the predator. It's a really cool simulation.
damn, this is really impressive
This is one of the coolest most entertaining things I have seen in ages! Bravo the concept; and well engaged well produced too. Top class.
I love how towards the end of the simulation it seems like how a pack of predators hunt herd/school of prey in real life. Definitely shows how evolution and the process has changed over the ages and greatly explains the survival of the fittest.
Great video and explanation, it was very easy to follow along with the whole creation process.
Amazing work! Is the source code available? I'd love to play with the parameters to see which one has any effect.
This! Please would you share the code or a compiled executable?
Or at least tell in which language this is made.
Pls I was thinking the same thing I would love to be abble to do this to just enjoy myself playing
Le dot
Code or tut would be nice!
Studies of nature have shown that the behaviour around the beginning (maybe early-mid) part of the sim accurately reflects how *herbivores* feed on plants - think cavorting deer ravaging the greenery in a park unchecked. It's only during conservative periods, where the red dots are more selective, that their behaviour matches that of a *carnivore*, including pack/pride behaviours that make sense for group predation.
I would love to see an extension of this sim with a three, maybe even four or five part structure:
- Blue dots for repleneshing natural resources (soil, water, air, sunlight)
- Green for plantlife
- Yellow for herbivores
- Red for omnivores and scavengers
- Purple for carnivores
Hello! First of all this is a great simulation, but I'd like to suggest a couple things that would be interesting to implement in my opinion, if it's not too much of a hassle:
Evolving a neuron that makes predators stop trying to feed when their food bar is maxed, slowing down a little. This behaviour would encourrage not wiping out preys when the predators are already full of meat, which, okay, will allow them to reproduce, but will almost certainly mean death for their offspring because there wont have sufficient food if they don't relent when their needs are met. Also, less predating when energy is full means less speed, and less energy consumption, which means more that the creature might even not really lose potential lifetime, as his health will decline slowly.
Making it so predators that died of starving live a body that predators can eat. Just as I mentioned above, predators are not just hunters, and most of them, moreover if starving, will eat bodies of preys others have killed if they can. In this simulation, preys can't die of starvation, but predators that die of starvation still have a body, unlike preys which are always eaten if they die. This would make sense for two main reasons:
A large number of predators wouldn't always mean a large decline in both preys and predator, because the predators could go eat the unmoving predator body instead of chasing another prey that could run out, and predators could split from eating their own that lacked food instead of just preys. Also, it would allow for the developpment of scavengers like behavior and even genetic lines, as maybe some predators wont put most of their eggs in more mobility (which makes out most of the most successful strategies in most life simulations with predators against preys that I've seen for now), and rely more in their ability to find and eat bodies. Like with the previous proposition, this would allow for less almost mutual extinctions, and more balanced ecosystems.
Conversely, it wouldn't be a bad idea to allow starving predators to attack other predators for food. This will mostly allow good predators that have been isolated from the main body of preys to ALL die because there is absolutely no prey to eat here, when in reality, half the predators could eat half the others, and survive long enough to get to the preys.
If any of you reading this comment find these ideas interesting and would like to give my comment more visibility, feel free to like it.
Maybe but this would give predators a massive advantage as when the population of prey is low, the population of the predators wouldn't decrease as rapidly and could result in the prey quickly becoming extinct. You could increase the number of meals needed to split but I think this could slow down the evolution.
@@adsa2124 Ah, but if we are trying to make an accurate simulation of real life, this is actually more like how real life predators and preys work. Also, most videos I've seen that try "preys vs predators" are biaised towards preys, mostly because of what I suggested here. And I predict that the predators wouldn't wipe out the preys because they would less rely in high speed and running all the time, and if they are well fed, maybe wouldn't chase a prey at all. Why bother eat more if it doesn't give any benefit, whereas just following a prey for when you are hungry, without actually chasing it, means less trashed energy for nothing. I can't know for sure, but that's my prediction at least.
you should make it such that the prey can see other prey. Then if one prey is moving away from the predator you may get some nice swarm-like behaviour (like fish)
i was thinking too that the prey were kinda acting like a swarm of fish.
I already noticed that the prey dodge the predators in a way that looks like a shark going through a school of fish.
This was very interesting when thinking about how life like you made it!
I absolutely love stuff like this. I would love to see this developed further.
Amazing work ! would be nice to play with the values to have a convergent system !
The best as far as i know, wish it evolved longer and used differents strategies over time. Si nice to watch
I think at some point the prey had evolved to be jittery, which made their vision a lot better because it meant their sensors didn’t have as big holes in them.
Cool video, but the colours you chose make it impossible to tell the two types apart if you are colourblind ( at least, they do for me :/ ), if you do something similar to this again could you try avoiding red/green combinations?
Edit: did a quick Google search for other colour combos to avoid: Green & Red; Green & Brown; Blue & Purple; Green & Blue; Light Green & Yellow; Blue & Grey; Green & Grey; Green & Black
Those should cover pretty much every type of colourblindness, some good combos might be yellow/purple, red/cyan, etc. mostly complementary colours with a lot of contrast, I'm sure there's one that would still look nice while being easy to tell apart.
Don't forget Orange & Yellow, I'm not colourblind but I have a friend who has trouble differentiating the two
Black and White on a Purple background would be perfect, I'm assuming.
Is there some kind of filter that you could use that could replace green/red with yellow/blue? Maybe a monitor setting? Obviously that wouldn't work for everything, but for situations like these where it's specifically the green/red that you wish to tell apart.
@@chad_bro_chill Yeah I feel like this is the kind of thing that a browser extension could probably fix for him for any future issues he might have. Dalton is the one my friend uses iirc
@@chad_bro_chill as far as I'm aware there's nothing that can do this well, at least not on mobile which is where I watch most videos. Besides, with ~1 in 20 people having some form of colour vision deficiency designing things in an accessible way is important, and red/green is possibly the least colourblind accessible combination you could choose.
I think ADDING the ENERGY REMAINING as INPUT for the PREDATORS can help them evolve better.
1:05 My Watch Later playlist’s videos:
Very interesting (and well made video). I wanted to talk about two things:
- there is a small bias: if the predator wins, the predator loses. Do you think it could have had an effect on the outcome?
- dobyou have an explanation about the fact that the avg lifespan of prey never gets high? Could it be from a bias in the hypothesis, or just an effect of the survival strategy?
Thanks for your work
I think the avg lifespan of prey because the predator will catch on in numbers. More prey, more predator. Less prey, less predator.
I'm not sure if there is much bias when the simulation is based on whether or not the predators can hunt all the prey, and both the predators and prey look like they have their own advantages, being the predators can kill multiple prey in a row and the prey don't need to seek for food for energy or survival
I don't really think that it's the bias when predators win and lose simultaneously.
If irl predators would eat everything they can, they would simply die of starvation. The more biased result for me is that, when prey wins, they could also lose. Why? Cause irl they would also eat up everything they can, and in one moment they also might run out of food. Still, the greens can start growing back, so when the prey population decreases, the food amount will grow etc.
So yeah, it's pretty natural that if predators win they lose, for predators to live on they just can't eat all the food in opposition to prey, where food has a chance to grow back automatically
Casual Geographic has a video about "biologic Jenga" on his channel here, look it up
@@Squotty_Patty if the prey starts eating up all the green they'll cause a collapse in the ecosystem for many other animals, namely destroying food sources and allowing for the plants that they don't eat to further push out other plants and cause mass erosion and all that. At least that was the case when the elk population shot up after wolf extinction. Young aspen and willow trees got ate, the beavers almost went extinct, wetlands became rivers and tore up the soft ground, and the coyotes ate pronghorns into the floor.
This is spot on, nice animation of predator prey relationships! I would however be interested how a second predator would mix things up
"Hard times create strong men. Strong men create good times. Good times create weak men. And, weak men create hard times."
What in the sacrebleu is this channel and why am I only discovering it now ? Subbed !
Merci beaucoup !
Is it normal to feel emotional when watching things like this?
The music helps the feeling...
This is beautiful
Cool simulation!
I noticed that the prey and predators didn't recognise their own in their FOV. I wonder what would happen is you factor this in? Either having a color sensing node, or just give predators values ranging from -1 - 0 and prey 0 - 1, or something.
I assume that we would see some interesting behaviour, but who knows?
they prob learn to ignore it, anything else would require incredibly complex social thinking
@@aguyontheinternet8436 herding isn’t complex
@@aguyontheinternet8436 and advanced herding behavior could emerge from simple individual rules
without further rules, prey could avoid other preys because more prey attracts more predator. But since there is a digestion period they might start to hide behind each other.
@@Fearofthemonster that's the beauty of emergent behaviour, even without "complex social thinking"
It would be really interesting to see a simulation like this, but just slightly more complex. Like if the prey also had to eat, and maybe the predators would learn to stay around the preys food sources. But then they also need to balance that with being able to eat before they perish. Would be really neat!
Maybe make multiple food sources with different energy levels, so large swathes of "low energy" food, or smaller swathes of "high energy" food.
Genuinely one of the most interesting accidental finds Ive ever had on TH-cam. Great work and go prey!
Damn nice! Love it! Is the source code available anywhere? I would love to see it and maybe run a simulation myself. Awesome work, really well done!
You found the code yet?
Same here. Looking for some good example code to study for this type of simulation. This one is super polished, love it.
Would also like the code
An interesting extension could be to add a sheep dog/ protector sort of roll where the protector defends the prey (deters the predators) and herds nearby prey towards random incentive goals (with number of prey delivered weighing AI fitness).
The protector would probably either murder all the predators or vise versa
Depends on the weight given to fitness of proactive defense. Maybe protectors are more focused on getting prey to incentive goals rather than dispatching/starving predators.
Maybe multiple predators working together are needed to take on/overwhelm a protector?
Love the evolution soundtrack. Whenever anyone talks about evolution again, this music is going to play in my head. Thank you.
Great work. If possible could you share the source code, and little explanation on the neural network part as well.
First of all, amazing video!
How did you realize the simulation? Did you use a game engine or plain code?
And would you mind sharing your code?
^^
I think you have found one of the source codes of life. This almost accurately displays how things work here. Very good job! 😎
@6:35 bro got blocked and got eaten, that was not on him!
that was prey on prey violence!
Amazing work as always! 👏🏼
Could you tell us a bit about the specs of this simulation? What engine you are using and on what hardware? Also, is what what see the actual simulation playing in real time or is it the render you get after weeks of computation ?
Thank you! I am not using an engine, it’s written from scratch using c++ and bgfx for the rendering. What is shown on the video is the actual 14 minutes of simulation running in real time on an m1 MacBook Pro. This program is currently single threaded so it could run faster but it was enough for the purpose of this video
@@PezzzasWork wow thanks for your reply, now I'm even more impressed!
Crazy to think about all that is going on (even without rendering) on one part of a single chip 🤯. Also amazed that you could set this all up, seems like a lot of hidden work I underestimated, thinking you used an existing game engine or something... Contrats !
1 - too much food, too few predators
2 - predators populations increases, preys population decreases
3 - too few food, too much predators,
4 - prey population increases, predators population decreases. and repeat
Hey, this is awesome! I totally want to mess around with this simulation myself...but also respect your code. Any recommendations on tools to use to make this kind of thing? Will you put the source code up?
After watching some of those videos i started making my own in c++ 😅
@@diogofidalgo2202 I would really like to know the tools you use. I am really interested in this kind of things, and I am studying programming, so this could be a great concept to investigate.
@@sebastianr.1919 C++ and a 2D game library called allegro. I draw everything on ms paint.
Since i learned programming by myself my skills are very limited. For example the view range is a circle, they have a mutation called "eyes" with 5 lvls. At lvl 5 u see the creature with 5 eyes. Legs is also a mutation that affects run speed.
The brain however is not this good, they have some things that change, migration direction, diets, colors they eat (8 or 9 colors) and hunting true or false.
I always look forward to your new projects, so neat and clever, did you use SFML again?
Thank you! I am now using BGFX instead of SFML
Was LITERALLY learning about this (kinda) at school recently.
The teacher talked about how when theres a lot of predators, the number of prey will decrease, then therell be less food for the predator, so the number of predators will decrease, then as a result, the number of prey will increase, which also means more food, which then revives the number of predators, and this repeats.
Preys have to stay still to eat plants 😉
I love how you can see them do things from nature, at first I thought I was a coincidence but then when the predators started herding the prey my mind was blown that I was right
That was a close battle! And the ending was so creative!
0:57
"I mean, I am just a dumb bunny, but we are good at multiplying."
-Judy Hopps
dmub bnnuy
11:01 the ants in my kitchen
This is one of the greatest videos I've ever watched!
6:13 they had a child and it got immediately eaten
What software was used for this?
BTW, a few notes:
Didn't dig the zoom-ins, but otherwise fun simulation. Maybe leave the full screen up but put the zoom-ins in a corner so you can highlight what you think is interesting without distracting from the big picture.
Also, I'd lower the predator reproduction rate a little so population booms don't happen as frequently allowing for a more equilibrated simulation. If it just cycles prey boom into predator boom, extinction is far more likely.
at 11:19 you can see it's actually just 4 prey left at one point! But they managed to elude the predators long enough to starve out what looks like well over 100 of them. Good job with the simulation!
2:47 *side eye*
Love it. If I could make one recommendation, it would be to allow neuron dropping. Setting all weights of a given neuron to near zero is close enough, but dropping the neuron entirely could make a difference.
I'd love to see some modifications that would (potentially) make the simulation more interesting:
- spots with "grass" or other sources of food that preys can consume to get energy back
- predators having higher acceleration than preys (but the same top-speed?)
- predators having a sense of smell (to detect the preys in close vicinity even if they don't see them), probably not necessary for preys since they have 360 vision
- bonus to splitting for preys when they're flocked together
- some sort of structures/terrain that can be used to one's advantage, though I imagine it would complicate the implementation too much
- other types of predators with different movement types, or sporadical viruses that are dangerous to everyone but die off quickly if they don't spread
Either way, this was pretty awesome!
Such an interesting and nicely edited video! Congrats!