I think it's hard to balance because the plant growth is slower than the reproduction/maturation rate of the animals. IRL wild herbivores are part of the life cycle of many plants, getting eaten isn't bad, it fertilizes the soil and propagates seeds. Total loss of ground cover is not part of normal fluctuation in population levels, it's a natural disaster.
Growing on that, not all the energy can be transfered to the next level, meaning that a prey only uses a % of the energy of the consumed plant and predator gets only a % of the enrgy of eaten prey, this will reduce the growth of predators and prey, making prey food more abundant. Each level of plant life gives different energy inputs, meaning that prey might choose to e
yes but herbivores doesn't eat hole plant and they are free range in bigger plane. and same time carnivores have harder time to hunt not every hunt successful many of them if they are not cooperate while hunting lover then 25%
And also allow "herbivores" to eat others that are smaller than themselves, and "cadavers". The number of Deers seen eating corpses or cow eating chicks is strangely high...
Amazing simulation! I think separating the world with some walls that have openings, to create speciation, could help reduce the amount of extinctions. I can imagine those waves which wipe out the majority of the prey (then consequently the predators) can be isolated to specific areas. Can't wait for part 4!
my guess would be that this is the best (in their minds) way to consume plants while also keeping an eye out for predators, since they have a blind spot directly behind them
Very nice. I've dabbled in the subject a bit. This is what I'd do to avoid extinctions (best benefit/cost first): 1. Regional variation: This can be as simple as the left of the screen has high reserve loss and the right has less. Or maybe the energy cost per move speed formula is different on part of the map. Ideally there would be a sharp change between these regional properties. The change in each property should be a neuron input. The goal is to have specialist populations in the regions so that migrants from a different region will tend to be outcompeted. It's important because it means that a population collapse in one region is less likely to affect the others, and when that happens the remaining populations can spread to the dead zones. 2. Barriers: The most effective barrier is a large shape in the middle of the map but more complicated shapes can be better. The goal is to divide populations more, and make it harder for a new evolutionary advantage to propagate everywhere. Not the most effective tool, but an easy one. 3. Memory: This can be as simple as adding a neuron that appears both as an output and an input, the output from the last step becomes the input for the current step. A creature could add multiple of these with connections as they do in hidden layers. The goal is to let prey go into a more persistent run / emigration state when there are too many predators in a given area. 4. Reduce predator carrying capacity compared to prey: The easy way is to just reduce the food value of food from prey. The goal is to stop predators blanketing an area. Prey in emigration mode would ideally have a chance to run out of a risky area, but that's too difficult if the predator population is overwhelming. 5. Stratification: This is the most important one but also by far the hardest to do. Ideally there would be different plant types and physical properties for animals such that there are specialists for a lot of different things. In particular, it should be very difficult for a predator to be able to attack both large and small animals (too evasive, or too resistant). As with regional variation, the benefit is that even if one layer of the population collapses, creatures from another layer can adapt to make use of the new empty layer. 6. Simulation size: Bigger maps with bigger populations. The distance helps with the regional isolation aspect, and the larger populations help the statistics of small populations somewhere. It's often the most costly and least interesting improvement so it's last on my list.
Are you familiar with The Bibites? It checks a lot of these boxes. The dev isn't very active on YT or in the community, but it's free to download and play with.
Nah, the easiest 100% most reliable way to avoid extinctions is to make it so the last 10 members of each species don't lose energy and can never die, and once they go over that number they can lose energy and die again. I did that in one of my evolution sims and it can run forever
I liked the way that the addition of plants gave the prey a way to hide for a bit, since if they just chilled in the middle of a group of plants then the predators couldn’t “see” them to be hunted
I noticed the creatures have no way of knowing if they are being backstabbed or if their health is depleting. They have no short-term memory to allow them to notice their health is dropping and will only know that their health is currently high or low. You can probably create some more reactive AIs if you provide a way for them to have memory and/or extra information to state that they are in an exceptional situation (like isStarving or isBeingAttacked inputs). Adding something like a generic call output that others can hear as an input will also allow your AIs to communicate and evolve in interesting ways -- I venture to guess they can even mimic memory with a simple output/input like that.
honestly memory is the biggest thing. Like yeah, sound would help prey know when there was a predator near, and they are all doing the stupid spinning because they have no memory
The prey seem to stay where there's food and when it's gone, they still stay there... perhaps because it worked so great for them before and they continue past behavior. And then the predators come in and devastate the area. The predators are forced to move because the prey move. Maybe if the plants didn't all spawn together, but rather in small clusters. Or if the plants could die after a time and respawn a certain distance away. Something to force the prey to move to get food.
Proposal: make an elman network, BUT compute and update the hidden neurons one by one (so each node uses the new outputs of previous nodes in the same layer, and the old outputs of later nodes). This way, each node is its own layer, thus you get a very deep and wide net at the same time. The recurrent connections are also deeper than linear
the predators learnt to follow other predators, meaning when the first one sees some prey, it looks like a big conga line starts up just predators following predators knowing that at the end of the chain is prey.
A size modifier could be cool, bigger means tougher but more energy needed, smaller prey might be harder to spot too. A speed modifier could also be good, faster is more energy intense. This combo could lead to a lot more diversity and perhaps longer stability before collapse.
A periodic forcing function might help stabilize your predator/prey relationship by allowing recovery of each. Something like plants grow best spring and summer thus prey grow best spring to fall and predators survive on fat in the fall/winter but prey burrows to hibernate and become the seeds of the next seasons population. It would take a lot of evolution to spontaneously generate that kind of complex behavior. Always enjoy your work, thank you for sharing.
Of all the possible improvements, I think you'd be best served by two things. 1. Plant resilience. The prey-plant interaction is quite basic. Plants don't normally get wiped out by grazers. They employ strategies like seed dispersal through feces, roots that regrow annually, and defenses like thorns/poison the limit which animals can feed. 2. Adaptation. Allowing animals to diversify only during spawning limits the effect of the mutation system. Consider allowing them to adapt at any time in response to stress.
One issue with balancing the simulation might be the way reproduction is working. Right now, it looks like it works the same for both species: amass enough energy, produce 1 offspring. In the real world, prey species like rabbits and mice don't have just one baby at a time. They give birth to multiple pups at a time. As well, your predator and prey species seem to have the same general mass. In the real world, prey species tend to be smaller, while predator species are larger. Prey species need to be able to reproduce using *less* energy than predators do, and when they do, they need to be able to make multiple offspring at a time.
HE LIVES! dude your videos are so helpful, i had to make google site about something, and i chose A.I, what it is, and how it learns/evolves, and your videos contributed a MAJOR part of the project. i used both your "evolving ai's, predator vs prey" and the "ai learns phalanxes" video. I described the parameters, what happened, and why, but I gave YOU full credit for making and running the scenario, i'm not a thief, and put links to the videos. thank you, so so much
One thing to balance is to think about energy, after the prey consume the plants, they use 90% of the energy for life functions and reproduction and store the other 10% in their bodies. When the predators eat them it shouldent be a 1 to 1 as if they got the energy directly from the plants with a conversion. This should change the population dynamic and I doubt there would be such dense predators population after a prey spike. This could open up the enviorment allowing prey to be more likely to escape and reproduce
Love this as always! I think it could be fun to have a random “color” variable for prey and predators so that way you can see what species tend to win out. For example the simulation started with scavengers and hunters - and it would be interesting to see how they both do separately and which one eventually won out. Maybe even let predators/prey see these colors so they can learn which species of prey is easy to hunt, or what species of predator is more dangerous!
I love these! I'm sure you get asked this a lot, but what do you program these simulations on? And how do you manage performance with all those physics collisions???? Great video :)
12:40 the spinning prey developed a 500 iq play. by spinning they were able to keep the plants alive for much longet because they grew back if it wasnt for those predators that might have become the number 1 strat
Oh, I have been waiting so long for another one of these videos. It's so good to finally have one. I think these will be some nice additions for a future video: 1. The rate of plant growth should be proportional to rate at which they are being eaten (simulating seed dispersion). 2. Adding screen wrap. 3. Having states like `isBeingAttacked` etc. 4. Different types of pheromones.
Want to note that visuals look great, especially those springy clovers! Perhaps you could parametrically add some small alterations to new generations of predators and prey that they can pass on to their offspring. That way you'd have a nice visual representation of strains of evolution. I am currently learning how to train ML agents to play the games I am making. Would be really glad if you'd do a technical video on which tools you are using and tips on how to set up them.
I'm curious - how did you get this to be so performant? More than 600 AIs running at ~2 milliseconds per frame is awesome, with probably tens of thousands of raycasts
Memory is hard. I tried it once. Can you show the NNs that were evolved as the sim progresses? That'd would be cool to see. Great sim! I have some on my channel too.
One thing I want to try is try and make a NN simulation in a scenario like this, but make the network as realistic as possible. Have some kind of set of "gene" like structures that encode for the development of the NN. I think IRL at the very start the brain is randomly initialised, do that. But the genes encode the architecture and guide the specific development of the network. Evolution occurs at the gene level, influencing how networks get developed not the literal initialisation of the network used, which I think is more accurate. This is totally out of my scope lol but then the Hodgkin-Huxley model is probably like the most accurate ANN we have to really BNNs so maybe somehow convert the initial graph NN (that handles network development and going from genes to a NN) to a HH model network. Learning with backdrop maybe like Hebbian learning and prune connections with smaller weights. I wouldn't want to specifically code for memory (that would be difficult) but with this setup maybe some form of memory could emerge somewhat similarly to how we handle memory IRL, Synaptic Memory through the STPD which is implicit memory, past experiences literally shape the network structure. And then also we know we have like instincts, at birth some animals know how to work. Maybe there is a form of recurrent connections that could develop. Obviously genes only encode for the development of the network not initialising the literal network but what if instincts emerge as like a specific convergence in brain structure due to genetics that emerge to form these instinct like behaviours. This is so complicated lmao but would be fun to try over a while. Also sounds as well, allow entities to have a vocal range potentially. To make it even more accurate could take inspiration from predictive coding theory. So we have sensory inputs that come from the environment which are encoded into signals for the SNN and outputs are behavioural decisions and somehow have the network try and predict what the next sensory input would be and do backdrop based on that information, could be interesting. Maybe for genes I could make it that each gene directly corresponds to e.g. “create neuron with type X, connect it to Y with weight Z.”, that could become too complex quickly though. Or maybe a CPPNs/HyperNEAT generator network to encode patterns for the larger networks? Like connectivity as a function of geometry, idk. Hodgkin-Huxley might, probably will be too complex at first but Izhikevich model or Leaky Integrate-and-Fire could be a nice substitute initially. I mean im not exactly compute rich lol. Idk, there'd be a lot of details to figure out but it'd make for a really cool simulation at scale (if it worked at all).
@DanielSeacrest thehardest part is to develop the cost function to encourage "interesting" behavior. With outputs feeding back into inputs (via evolution) memory can develop over manymany cycles....but how to you reward? Mere existence isn't interesting. So organisms need to compete with each other to become interesting to us. Need to give them more than 2d so we can see them create things in 3d: structures of themselves with output nuerons that can enter other organisms (multicellular?).
@@TheRainHarvester No I was thinking of something different. I think what you were thinking of is a fitness function, but merely an organism surviving and reproducing is in of itself the fitness function, an implicit fitness function I guess lol. My idea was kind of every entity is born with its own randomly initialised network, with a genetic code developing the network across a certain number of time steps. Every offspring have small random mutations in their genetic code which encodes for the development of the neural network. When entities are using the neural network themselves in the simulation I'll take inspiration from predictive coding theory and I guess the "cost" function is simply how well their prediction aligns with actual sensory input then you backdrop based on the error. The system has two ways to minimise mismatch between predictions: update its network and also change the world to match that prediction. Im thinking something more closely related to Bayesian Active Inference. There are some interesting things ive seen emerge under this path, though what I have in mind for a pretty realistic NN simulation is very computationally demanding.
great that you changed the colors again because the colors/contrast of the second video were a bit unpleasing to look at. i love this series, hopefully it continues. there are still some neat ideas that i could come up with that could be implemented. edit: to be fair...the colors of the first videos were by far the best. still fine to look at ;)
He couldn't use green for the prey like in the first video because he had to use green for the plants... I think he did about as well as possible given that he had to represent 4 items (predator, prey, plants, food)... or at least it was very clear to me
Holy cow - I came back to this as I liked the video #2 from 2 years ago and I just saw it is 1 duckin day since this one came out! I came like perfectly here!
Or giving the plants and preys Huegene-style colors which only nourish consumers (preys/predators respectively) with low color differences, while poisoning those with very different colors. Watch the evolutionary arms race unfold
Super video! Maybe a safe-haven option for the pray? A little bit of space where the preditor can't go, but without plants there, so some pray can hide there and multiply but will have to venture out for food. I'm thinking it will stop the preditors from completely whiping out the pray, or at least make il last longer. 🌸
Great work. In the timelapse it's clear how the preys do stick around the plants, while the predators wander very much. I think that the preys should be incentivized to wander more and I think that simulating a day-night cycle with both rest periods to sleep and rest periods between meals would lead to more interesting emerging behaviors!
Flora growth rate needs to be at least doubled. Herbivores don't run out of plants in stable ecosystems. Then the reproduction rate of prey needs to be halved and the rate for predators needs to be quartered. If you want to create hunting behavior, make the food on the ground "rot" very quickly.
You'd also likely see some benefit by hard coding predator/prey behaviors. When a prey animal catches a certain number of red rays, it turns purple and runs in the opposite direction. Purple rays also trigger the "startle" reflex in nearby prey animals so they run as well. If a predator sees a blue ray, it walks toward it. If it sees purple rays, it chases at speed. Then it becomes a question of energy resource management. You could have prey animals' max energy be reduced as they age to simulate the "old and sick" factor as well. Just some thoughts. This is very cool!
The idea is that a healthy ecosystem has evolved into a state where prey is not at risk of going extinct. Predators would hunt less aggressively or prey would evolve to be harder to catch in the long run
Excellent work, I am delighted. This is a fascinating field of study, and your presentation I think is very pertinent, having simple rules create complex systems, and with a fun presentation that reminds me of old flash games for some reason, I love it :P
Hey Pezzza, thanks for the fun videos to watch. When I was a kid I was fascinated by the game of life when it was presented in Scientific American. That "Thanks for Watching" ending was classic!!!
Avec quelles technologies as tu codé ce projet ? Il a l'air fluide malgré le grand nombre d'entités, c'est impressionnant ! Dans mes simulations perso je suis souvent ralenti autour de 10k/20k entités (5k avec réseaux de neurones), mais tu sembles en avoir beaucoup plus. Bravo en tous cas 👍 (btw le code va être publié sur github ?)
Dude that thing was awesome also the problem with the low duration of experiment is I think high learning rate. If you look at nature itself, evolution is a pretty slow concept requiring 10000 of years to evolve specices. what also is concerning is the limited small structure of their neurons. I observed the videos twice and found out these things: 1) the abolition of tactic line follow: A tactic developed by predators which was to just follow in line in order to reach preys. In this tactic, predators formed a line since finding preys around them was difficult and truly based on luck if they approached in one direction. This tactic vanished because this tactic was too effective and preys were left on places on map quite far away from predators for even one of them to find (or they just hid in the plants). 2) actual escaping abolished: as you can see some preys after successfully learning to escape from predators tend to go into the plants were their genetic code becomes trash resulting in them just learning to rush into plants in a circle. after their plants vanish they are just found randomly running in circles without any regard to the environment. # Some suggestions: 1) two neural network: this sounds a bit complicated but animals have many neural networks. what I am saying is that the first neural network be solely for getting away from predators giving them sense of threat. The second neural network be for only getting attracted to plants. This can be done by feeding the food position input to second and danger position to first neural network. This is recommended since after getting into plants, the preys start to rush into plants disregarding threats. this makes them mindless munchers. 2) A lower learning rate: Here it can be seen that the learning rate is way too high which might actually be needed for seeing results but this can be changed as You said, the reproduction is random or lets say once they are full of food. Here, you can just make it so that the lowest heath throughout their life can be acted as a learning instinct or if that prey/predator's heath was quite low then it has higher learning rate else low learning rate since it is not needed. This will prove to preserve genetic data forming tactics that got wasted above mentioned. 3) taking things slow to fast. What I imply here is that prey and predators be given enough time before starting their battle. Why I mean this is so that preys and predators do not start off quite random. This can be done by assigning them areas like preys spawned at left, food at middle, predators at right so that they have time to manage their genetic code. Thats all I would like to say, honestly loved the idea and hope so that u may take in one of my suggestions.
This is so cool. Will you make a video about how you made it? Very smooth animations and very nice layout on the screen. Instead of a square, how about making the world a tiny round planet? Then life can roam freely in any direction, and never hit an artificial boundary. You could even introduce seasons, so plant growth is limited at certain periods in north and south, and see if migration patterns emerge etc.
So satisfying to watch! I think allowing predators to attack each other could make for an interesting balance lever, since they're going to want to seek food through aggression no matter who it's at, but the thing that fights back less is the priority in that regard
you should give as an input population density in the map and its position, it would be interesting to see them creating migrating patterns or distribuite themselfs in groups based in how themselves are concentrated in the map. Im thinking that because it is much more commum in the real world for predators to live far from one another and only meet to breed
This is awesome. Like every single video you make. It's always a pleasure to watch your work, this is so interesting, awesome to watch and inspiring at the same time for my projects ! Btw, I was wondering (if you have the time) if you could make a video on how to build neural networks, the one you use because... I tried to make it myself but it's really hard and im sure you could explain it easily ! Like back propagation algorithm etc... That would be awesome, but I dont know if it would match the channel theme since it would be a more coding video. That's just an idea actually. So thank you if you ready my comment (and sorry for the mistakes, im french😅)
I'd love to see some addional complexity to the predators. Perhaps most predators avoid consuming other predators, but have a neuron for that, and have a neuron for cannibalism that can be switched on during mutation. Also a system for tracking lineage.
I waited so long for a 3rd part and eventually realised it wasn’t going to happen. But then THIS came out. This was really good, especially since I found the ending to the last AI Battle video a bit underwhelming. Keep up the great work Pezzza!
What if instead of giving birth to live copies, they were instead eggs (potentially invulnerable and/or invisible) which would hatch after some delay ? This would reduce the tendency for exponential growth, as the eggs cannot start eating It might also make allow some offspring to survive past a wave of predators
I suspect adding a height map and a making movement between different heights exponentially more energy expensive might have an interesting effect. If you also add communication it could lead to some interesting behaviors.
It would be interesting if you wrote a book about this fabulous fun project. Already looking forward to seeing the 4th iteration hopefully implementing some of the comments suggestions.
This is awesome! You really should make this a multiplayer game where each player is either a predator or prey. Then observe what sort of dynamics emerge with real intelligent humans in control of the organisms!
Hey i just want to say that I think what your doing is super interesting, would love to see the programming that goes on behind it, but that may detract from the time you could use else where in this projects.
I love these kinds of simulations and I'm loving this channel. I have some suggestions for simulation rules if you'd like to read them: Screen wrapping such that an object which goes out of bounds in one direction appears in bounds in the other direction. I think this would make it harder for predators to surround and massacre large groups of prey. Health should impose a movement restriction such that it takes more energy to move at the same speed. Health and energy levels should be visible to the creature itself and other creatures. We might see behaviors like moving slower to compensate for low energy, or, as animals often do, ramping up energy consumption in a last-ditch effort. Predators would be confronted with the decision of targeting weaker less rewarding prey or healthier prey that would sustain them for longer.
what if you add a function where when food is dropped by a dead creature it will act as a kind of fertilizer spawning a new patch of plants oor boost the current nearby plant growth?
Love these sims. I would narrow the preys rear field of view a little bit, most of them seem to want to go backwards. Also have more plants spawning, flora is usually available in nature.
Amazing project! Love the content. Suggestion: consider making the predators a bit smarter. Currently, they're relying on numbers to hunt effectively, which isn't how predators typically operate-it's more characteristic of prey. This could prevent the current issue where prey populations explode, devour all the plants, and trigger a massive predator spawn. When plants are wiped out and predators are overly abundant, prey end up going extinct. Predators should focus on being efficient hunters, controlling prey populations EARLY to prevent plant depletion and unsustainable prey growth.
These are so cool! Thank you for sharing! I'd love to see a version where predator and prey aren't hardcoded categories, but there's a mutatable parameter for how much energy they get from plants/food. In other words, everyone can eat plants and animals, but some get more out of plants and some more out of animals. If you can track their eating history, predators could be defined by >2/3 of energy comes from food, herbivores by >2/3 come from plants and the rest are omnivores. So an individual could shift strategies based on the availability of food. Damage could be a mutable parameter too so you could have herbivores with good defense and carnivores who only scavenge.
A simple mechanism that might help a bit with balancing could be to make predators/prey disappear with a certain chance, when they hit the bounds of the simulation. So when their numbers get high, there would be a certain drain on their population. That would replicate natural behavior as well.
Or accidents like a chance of injury if doing something like running fast or spinning round that kills the creature; still lets them chose to do risky strategies - high risk high reward sort of?
Love these simulation videos. I'm glad you gave the prey a wider field of view. I commented the same on your previous video. I think one basic principle to consider is that predators and prey started as the same type of organisms. They find a balance by specializing in using particular food sources. Could you make the ability to digest a given food source variable and related to the organism's diet? They both could start out with a random food value and gain a consumption speed/attack bonus related to interaction with the corresponding food source. Their color could be a gradient designated based on their food source value. You might get omnivores in the mix which would smooth out the swings only to be later out competed by more specialized populations. Also, could you make them both have wide field vision? That might allow for the evolution of perception if only half of the rays can be activated at a time, but random mutation can modify which specific rays are activated. It would be interesting to see how the vision evolves over time. Another tweak to try later might be to make plant energy burn more quickly verses hunted food. So more specialized prey eats more plants more quickly and predators have a bigger store of energy to use in the hunt. You could also make it discrete by allowing each organism's stomach to hold up 2 kills or 3 plants. The ability of the organism to pluck a whole source could be based on their food value. A food value of 1.5 out of 3 could let them pluck one kill, one plant and slowly scavenge a kill or plant for .5 each, etc. A value >2 would only allow minimal scavenging of plants and pluck up to 2 kills. Again, this is a very interesting simulation.
I think it's hard to balance because the plant growth is slower than the reproduction/maturation rate of the animals. IRL wild herbivores are part of the life cycle of many plants, getting eaten isn't bad, it fertilizes the soil and propagates seeds. Total loss of ground cover is not part of normal fluctuation in population levels, it's a natural disaster.
Growing on that, not all the energy can be transfered to the next level, meaning that a prey only uses a % of the energy of the consumed plant and predator gets only a % of the enrgy of eaten prey, this will reduce the growth of predators and prey, making prey food more abundant.
Each level of plant life gives different energy inputs, meaning that prey might choose to e
yes but herbivores doesn't eat hole plant and they are free range in bigger plane. and same time carnivores have harder time to hunt not every hunt successful many of them if they are not cooperate while hunting lover then 25%
And also allow "herbivores" to eat others that are smaller than themselves, and "cadavers".
The number of Deers seen eating corpses or cow eating chicks is strangely high...
Also, predators have evolved territorial tendencies exactly to limit local overhunting
I think the predators are too successful at hunting in this simulation too. They're growing as if they are herbivores and the prey animals are plants.
LOVE these AI simulated ecosystem videos. Thanks Pezzza! Keep up the great work!
Thank you!
@@PezzzasWork What did you use to make this?
@@Ibloop SFML for the graphics library; I'm pretty sure it's all covered in ua-cam.com/video/t0z3RojiKFg/v-deo.html&ab_channel=Pezzza%27sWork
@@PezzzasWork Please make a game
Can you make the simulation so thar when prey and predators die, the plants will get the nutritions from the soil to grow faster.
Amazing simulation! I think separating the world with some walls that have openings, to create speciation, could help reduce the amount of extinctions. I can imagine those waves which wipe out the majority of the prey (then consequently the predators) can be isolated to specific areas. Can't wait for part 4!
Great idea. Perhaps one could also have different environmental properties which change over-time in certain regions to further improve the diversity.
I was thinking the same thing. Just a very simple edit to the environment could allow for more localized and niche evolution.
I'm curious what makes the prey think backwards loop-de-loops landing directly into a predator's mouth is a solid strategy lmao
since moving forward and backwards is the same speed and prey has much bigger visual cone it probably helps to get out of the predators sight
Oh no! I see an enemy!
*walks backwards/turns away from danger*
Jay, no enemy in sight. Must mean I’m save!
The best way to die is to never see it coming.
maybe with its wide field of view it see predator everywhere except behind
my guess would be that this is the best (in their minds) way to consume plants while also keeping an eye out for predators, since they have a blind spot directly behind them
Very nice. I've dabbled in the subject a bit. This is what I'd do to avoid extinctions (best benefit/cost first):
1. Regional variation: This can be as simple as the left of the screen has high reserve loss and the right has less. Or maybe the energy cost per move speed formula is different on part of the map. Ideally there would be a sharp change between these regional properties. The change in each property should be a neuron input. The goal is to have specialist populations in the regions so that migrants from a different region will tend to be outcompeted. It's important because it means that a population collapse in one region is less likely to affect the others, and when that happens the remaining populations can spread to the dead zones.
2. Barriers: The most effective barrier is a large shape in the middle of the map but more complicated shapes can be better. The goal is to divide populations more, and make it harder for a new evolutionary advantage to propagate everywhere. Not the most effective tool, but an easy one.
3. Memory: This can be as simple as adding a neuron that appears both as an output and an input, the output from the last step becomes the input for the current step. A creature could add multiple of these with connections as they do in hidden layers. The goal is to let prey go into a more persistent run / emigration state when there are too many predators in a given area.
4. Reduce predator carrying capacity compared to prey: The easy way is to just reduce the food value of food from prey. The goal is to stop predators blanketing an area. Prey in emigration mode would ideally have a chance to run out of a risky area, but that's too difficult if the predator population is overwhelming.
5. Stratification: This is the most important one but also by far the hardest to do. Ideally there would be different plant types and physical properties for animals such that there are specialists for a lot of different things. In particular, it should be very difficult for a predator to be able to attack both large and small animals (too evasive, or too resistant). As with regional variation, the benefit is that even if one layer of the population collapses, creatures from another layer can adapt to make use of the new empty layer.
6. Simulation size: Bigger maps with bigger populations. The distance helps with the regional isolation aspect, and the larger populations help the statistics of small populations somewhere. It's often the most costly and least interesting improvement so it's last on my list.
Are you familiar with The Bibites? It checks a lot of these boxes. The dev isn't very active on YT or in the community, but it's free to download and play with.
Factorio developer jumpscare
Nah, the easiest 100% most reliable way to avoid extinctions is to make it so the last 10 members of each species don't lose energy and can never die, and once they go over that number they can lose energy and die again. I did that in one of my evolution sims and it can run forever
@@nikolozgilles It's also the most unrealistic way to do it, which defeats the purpose.
@@erictheepic5019Wait, is he the actual Erandel?
I liked the way that the addition of plants gave the prey a way to hide for a bit, since if they just chilled in the middle of a group of plants then the predators couldn’t “see” them to be hunted
I noticed the creatures have no way of knowing if they are being backstabbed or if their health is depleting. They have no short-term memory to allow them to notice their health is dropping and will only know that their health is currently high or low. You can probably create some more reactive AIs if you provide a way for them to have memory and/or extra information to state that they are in an exceptional situation (like isStarving or isBeingAttacked inputs).
Adding something like a generic call output that others can hear as an input will also allow your AIs to communicate and evolve in interesting ways -- I venture to guess they can even mimic memory with a simple output/input like that.
honestly memory is the biggest thing. Like yeah, sound would help prey know when there was a predator near, and they are all doing the stupid spinning because they have no memory
an array of output neurons that carry their values to inputs neurons the next tick would be really useful
The prey seem to stay where there's food and when it's gone, they still stay there... perhaps because it worked so great for them before and they continue past behavior. And then the predators come in and devastate the area. The predators are forced to move because the prey move. Maybe if the plants didn't all spawn together, but rather in small clusters. Or if the plants could die after a time and respawn a certain distance away. Something to force the prey to move to get food.
Proposal: make an elman network, BUT compute and update the hidden neurons one by one (so each node uses the new outputs of previous nodes in the same layer, and the old outputs of later nodes). This way, each node is its own layer, thus you get a very deep and wide net at the same time. The recurrent connections are also deeper than linear
@@TheAechBombthats called RNNs and theyre a pain
the predators learnt to follow other predators, meaning when the first one sees some prey, it looks like a big conga line starts up just predators following predators knowing that at the end of the chain is prey.
good example from 11:00 where the predators cant see the prey but can see other predators moving in one direction.
Very much like ants, when they see food, they all follow in lines
A size modifier could be cool, bigger means tougher but more energy needed, smaller prey might be harder to spot too. A speed modifier could also be good, faster is more energy intense. This combo could lead to a lot more diversity and perhaps longer stability before collapse.
A periodic forcing function might help stabilize your predator/prey relationship by allowing recovery of each. Something like plants grow best spring and summer thus prey grow best spring to fall and predators survive on fat in the fall/winter but prey burrows to hibernate and become the seeds of the next seasons population. It would take a lot of evolution to spontaneously generate that kind of complex behavior.
Always enjoy your work, thank you for sharing.
Of all the possible improvements, I think you'd be best served by two things.
1. Plant resilience. The prey-plant interaction is quite basic. Plants don't normally get wiped out by grazers. They employ strategies like seed dispersal through feces, roots that regrow annually, and defenses like thorns/poison the limit which animals can feed.
2. Adaptation. Allowing animals to diversify only during spawning limits the effect of the mutation system. Consider allowing them to adapt at any time in response to stress.
I think plants spawning at random kind of simulates those survival stratetgies in an abstracted way.
The idea of adaptation in response to stress would make it too dissimilar to natural selection
One issue with balancing the simulation might be the way reproduction is working. Right now, it looks like it works the same for both species: amass enough energy, produce 1 offspring. In the real world, prey species like rabbits and mice don't have just one baby at a time. They give birth to multiple pups at a time. As well, your predator and prey species seem to have the same general mass. In the real world, prey species tend to be smaller, while predator species are larger. Prey species need to be able to reproduce using *less* energy than predators do, and when they do, they need to be able to make multiple offspring at a time.
This is not a simulation, this is epochal bullshit. You're right, but it seems like people here have no idea how an ecosystem actually works.
What if instead they dropped eggs which hatched after a short/long time.
an omnivore would dominate your entire simulation
You mean a cannibal?
@@edwinschaap5532
are you a cannibal if you eat a cow?
you are both mammals...
you both have common ancestors
@@edwinschaap5532
his carnivores are also cannibals
that is, if you want to look at it that way...
@TAB_100no, they only eat the vegans, not each other.
@TAB_100a cow is another species. At 19:23 he talks about adding other predator species.
Glorious project! Love your videos!!
I would be interested in seeing what happens if you make food turn into plants if uneaten for a certain amount of time
Ooh like fertilizer from dead critters
@@corythomas474 or if plants grow faster around food, consuming said food
FINALLY! I've wanted to see another one of these in FOREVER.
i get so stoked when i see another pezzzas work video! Thank you!
Thanks!
Thank you very much for your support!
HE LIVES! dude your videos are so helpful, i had to make google site about something, and i chose A.I, what it is, and how it learns/evolves, and your videos contributed a MAJOR part of the project. i used both your "evolving ai's, predator vs prey" and the "ai learns phalanxes" video. I described the parameters, what happened, and why, but I gave YOU full credit for making and running the scenario, i'm not a thief, and put links to the videos. thank you, so so much
3:12 I love the way their eyes make it look like they are soooo freaked out by the other ones
"wtf where did you come from???"
😂😂😂😂
One thing to balance is to think about energy, after the prey consume the plants, they use 90% of the energy for life functions and reproduction and store the other 10% in their bodies. When the predators eat them it shouldent be a 1 to 1 as if they got the energy directly from the plants with a conversion. This should change the population dynamic and I doubt there would be such dense predators population after a prey spike. This could open up the enviorment allowing prey to be more likely to escape and reproduce
I love ur ai videos so much! its so entertaining and fascinating at the same time!
You got some of the coolest videos on UA-cam. Thanks for posting this
Very cool, 1 thing you could do is whenever a blob dies, increasing plant growth in that area to simulate fertilizing the area
Love this as always! I think it could be fun to have a random “color” variable for prey and predators so that way you can see what species tend to win out. For example the simulation started with scavengers and hunters - and it would be interesting to see how they both do separately and which one eventually won out. Maybe even let predators/prey see these colors so they can learn which species of prey is easy to hunt, or what species of predator is more dangerous!
On top of this, adding Huegene-style color preferences might induce a more interesting evolutionary arms race
I love these! I'm sure you get asked this a lot, but what do you program these simulations on? And how do you manage performance with all those physics collisions???? Great video :)
12:40 the spinning prey developed a 500 iq play. by spinning they were able to keep the plants alive for much longet because they grew back if it wasnt for those predators that might have become the number 1 strat
i meant 12:40
nevermind i can edit the message
Took bro 2 years to come back 😭 🙏
Oh, I have been waiting so long for another one of these videos. It's so good to finally have one.
I think these will be some nice additions for a future video:
1. The rate of plant growth should be proportional to rate at which they are being eaten (simulating seed dispersion).
2. Adding screen wrap.
3. Having states like `isBeingAttacked` etc.
4. Different types of pheromones.
Want to note that visuals look great, especially those springy clovers! Perhaps you could parametrically add some small alterations to new generations of predators and prey that they can pass on to their offspring. That way you'd have a nice visual representation of strains of evolution.
I am currently learning how to train ML agents to play the games I am making. Would be really glad if you'd do a technical video on which tools you are using and tips on how to set up them.
I'm curious - how did you get this to be so performant? More than 600 AIs running at ~2 milliseconds per frame is awesome, with probably tens of thousands of raycasts
Memory is hard. I tried it once.
Can you show the NNs that were evolved as the sim progresses? That'd would be cool to see.
Great sim!
I have some on my channel too.
What memory architecture did you try? Elman? Neat? Gru/lstm? Fast weights?
One thing I want to try is try and make a NN simulation in a scenario like this, but make the network as realistic as possible. Have some kind of set of "gene" like structures that encode for the development of the NN. I think IRL at the very start the brain is randomly initialised, do that. But the genes encode the architecture and guide the specific development of the network. Evolution occurs at the gene level, influencing how networks get developed not the literal initialisation of the network used, which I think is more accurate. This is totally out of my scope lol but then the Hodgkin-Huxley model is probably like the most accurate ANN we have to really BNNs so maybe somehow convert the initial graph NN (that handles network development and going from genes to a NN) to a HH model network. Learning with backdrop maybe like Hebbian learning and prune connections with smaller weights. I wouldn't want to specifically code for memory (that would be difficult) but with this setup maybe some form of memory could emerge somewhat similarly to how we handle memory IRL, Synaptic Memory through the STPD which is implicit memory, past experiences literally shape the network structure. And then also we know we have like instincts, at birth some animals know how to work. Maybe there is a form of recurrent connections that could develop. Obviously genes only encode for the development of the network not initialising the literal network but what if instincts emerge as like a specific convergence in brain structure due to genetics that emerge to form these instinct like behaviours. This is so complicated lmao but would be fun to try over a while. Also sounds as well, allow entities to have a vocal range potentially. To make it even more accurate could take inspiration from predictive coding theory. So we have sensory inputs that come from the environment which are encoded into signals for the SNN and outputs are behavioural decisions and somehow have the network try and predict what the next sensory input would be and do backdrop based on that information, could be interesting.
Maybe for genes I could make it that each gene directly corresponds to e.g. “create neuron with type X, connect it to Y with weight Z.”, that could become too complex quickly though. Or maybe a CPPNs/HyperNEAT generator network to encode patterns for the larger networks? Like connectivity as a function of geometry, idk. Hodgkin-Huxley might, probably will be too complex at first but Izhikevich model or Leaky Integrate-and-Fire could be a nice substitute initially. I mean im not exactly compute rich lol. Idk, there'd be a lot of details to figure out but it'd make for a really cool simulation at scale (if it worked at all).
@DanielSeacrest thehardest part is to develop the cost function to encourage "interesting" behavior. With outputs feeding back into inputs (via evolution) memory can develop over manymany cycles....but how to you reward? Mere existence isn't interesting. So organisms need to compete with each other to become interesting to us. Need to give them more than 2d so we can see them create things in 3d: structures of themselves with output nuerons that can enter other organisms (multicellular?).
@@TheRainHarvester No I was thinking of something different. I think what you were thinking of is a fitness function, but merely an organism surviving and reproducing is in of itself the fitness function, an implicit fitness function I guess lol. My idea was kind of every entity is born with its own randomly initialised network, with a genetic code developing the network across a certain number of time steps. Every offspring have small random mutations in their genetic code which encodes for the development of the neural network. When entities are using the neural network themselves in the simulation I'll take inspiration from predictive coding theory and I guess the "cost" function is simply how well their prediction aligns with actual sensory input then you backdrop based on the error. The system has two ways to minimise mismatch between predictions: update its network and also change the world to match that prediction. Im thinking something more closely related to Bayesian Active Inference. There are some interesting things ive seen emerge under this path, though what I have in mind for a pretty realistic NN simulation is very computationally demanding.
@@TheRainHarvester Creatures (the pet simulator with norns) had a solution: just evolve the reward system!
Is it available for download?
No :( You could probably make it yourself though!
this would be so cool as a sandbox game to play
great that you changed the colors again because the colors/contrast of the second video were a bit unpleasing to look at. i love this series, hopefully it continues. there are still some neat ideas that i could come up with that could be implemented.
edit: to be fair...the colors of the first videos were by far the best. still fine to look at ;)
Personally these colours are the best so far, the original colours got real hard to tell apart at a glance when the creatures mixed together
He couldn't use green for the prey like in the first video because he had to use green for the plants... I think he did about as well as possible given that he had to represent 4 items (predator, prey, plants, food)... or at least it was very clear to me
11:59 "the prey seems to have generally become slightly better at evading predators" he says as a prey does circles and backs into a predator
I was just thinking about your channel today and was gonna check for a video. Perfect timing!
omg!!!!! very excited. always love your work :)
Thank you!
Holy cow - I came back to this as I liked the video #2 from 2 years ago and I just saw it is 1 duckin day since this one came out! I came like perfectly here!
This simulation is great for learning the behaviour of life
Oh man! I love when you upload! So fascinating watching emergent structures and group behavior come out :)
Get excited when ever you post, inspired me to try crafting a neat framework to build my own sims.
Adding apex predator’s would also help stop all the prey from being eaten
Or giving the plants and preys Huegene-style colors which only nourish consumers (preys/predators respectively) with low color differences, while poisoning those with very different colors. Watch the evolutionary arms race unfold
Super video!
Maybe a safe-haven option for the pray? A little bit of space where the preditor can't go, but without plants there, so some pray can hide there and multiply but will have to venture out for food. I'm thinking it will stop the preditors from completely whiping out the pray, or at least make il last longer. 🌸
This is my favorite content on YT, and you're unfortunately one of the few to provide such interesting videos!
Great work. In the timelapse it's clear how the preys do stick around the plants, while the predators wander very much. I think that the preys should be incentivized to wander more and I think that simulating a day-night cycle with both rest periods to sleep and rest periods between meals would lead to more interesting emerging behaviors!
I'm so glad you're back. The visual was great!
Flora growth rate needs to be at least doubled. Herbivores don't run out of plants in stable ecosystems. Then the reproduction rate of prey needs to be halved and the rate for predators needs to be quartered. If you want to create hunting behavior, make the food on the ground "rot" very quickly.
You'd also likely see some benefit by hard coding predator/prey behaviors. When a prey animal catches a certain number of red rays, it turns purple and runs in the opposite direction. Purple rays also trigger the "startle" reflex in nearby prey animals so they run as well. If a predator sees a blue ray, it walks toward it. If it sees purple rays, it chases at speed. Then it becomes a question of energy resource management.
You could have prey animals' max energy be reduced as they age to simulate the "old and sick" factor as well.
Just some thoughts. This is very cool!
The idea is that a healthy ecosystem has evolved into a state where prey is not at risk of going extinct. Predators would hunt less aggressively or prey would evolve to be harder to catch in the long run
This is such a treat of a video and has made my day! This series is one of my favorites on UA-cam!
I love watching these kinds of Ai simulations.
Excellent work, I am delighted. This is a fascinating field of study, and your presentation I think is very pertinent, having simple rules create complex systems, and with a fun presentation that reminds me of old flash games for some reason, I love it :P
Hey Pezzza, thanks for the fun videos to watch. When I was a kid I was fascinated by the game of life when it was presented in Scientific American. That "Thanks for Watching" ending was classic!!!
wow the timelapse at the end is awesome. well done! great work!
Avec quelles technologies as tu codé ce projet ? Il a l'air fluide malgré le grand nombre d'entités, c'est impressionnant !
Dans mes simulations perso je suis souvent ralenti autour de 10k/20k entités (5k avec réseaux de neurones), mais tu sembles en avoir beaucoup plus.
Bravo en tous cas 👍 (btw le code va être publié sur github ?)
Dude that thing was awesome also the problem with the low duration of experiment is I think high learning rate. If you look at nature itself, evolution is a pretty slow concept requiring 10000 of years to evolve specices. what also is concerning is the limited small structure of their neurons. I observed the videos twice and found out these things:
1) the abolition of tactic line follow: A tactic developed by predators which was to just follow in line in order to reach preys. In this tactic, predators formed a line since finding preys around them was difficult and truly based on luck if they approached in one direction. This tactic vanished because this tactic was too effective and preys were left on places on map quite far away from predators for even one of them to find (or they just hid in the plants).
2) actual escaping abolished: as you can see some preys after successfully learning to escape from predators tend to go into the plants were their genetic code becomes trash resulting in them just learning to rush into plants in a circle. after their plants
vanish they are just found randomly running in circles without any regard to the environment.
# Some suggestions:
1) two neural network: this sounds a bit complicated but animals have many neural networks. what I am saying is that the first neural network be solely for getting away from predators giving them sense of threat. The second neural network be for only getting attracted to plants. This can be done by feeding the food position input to second and danger position to first neural network. This is recommended since after getting into plants, the preys start to rush into plants disregarding threats. this makes them mindless munchers.
2) A lower learning rate: Here it can be seen that the learning rate is way too high which might actually be needed for seeing results but this can be changed as You said, the reproduction is random or lets say once they are full of food. Here, you can just make it so that the lowest heath throughout their life can be acted as a learning instinct or if that prey/predator's heath was quite low then it has higher learning rate else low learning rate since it is not needed. This will prove to preserve genetic data forming tactics that got wasted above mentioned.
3) taking things slow to fast. What I imply here is that prey and predators be given enough time before starting their battle. Why I mean this is so that preys and predators do not start off quite random. This can be done by assigning them areas like preys spawned at left, food at middle, predators at right so that they have time to manage their genetic code.
Thats all I would like to say, honestly loved the idea and hope so that u may take in one of my suggestions.
if creatures can learn during their lifetimes, then Baldwin effect can speed up the evolution.
OMG IVE BEEN WAITING SO LONG FOR THIS VIDEO, i was so fascinated by the first 2 that ever since no video has quite been the same
This is so cool. Will you make a video about how you made it? Very smooth animations and very nice layout on the screen. Instead of a square, how about making the world a tiny round planet? Then life can roam freely in any direction, and never hit an artificial boundary. You could even introduce seasons, so plant growth is limited at certain periods in north and south, and see if migration patterns emerge etc.
This stuffs cool af thanks for makin it ive been waiting forever for another one , happily of course
Yes!!!!! Thanks Pezzza for the new video! Did you have to do any reward shaping for these agents? The video was incredibly engaging to watch.
So satisfying to watch! I think allowing predators to attack each other could make for an interesting balance lever, since they're going to want to seek food through aggression no matter who it's at, but the thing that fights back less is the priority in that regard
You should give a ‘time since alive’ to the creatures and let them control when they split
you should give as an input population density in the map and its position, it would be interesting to see them creating migrating patterns or distribuite themselfs in groups based in how themselves are concentrated in the map. Im thinking that because it is much more commum in the real world for predators to live far from one another and only meet to breed
This is awesome. Like every single video you make. It's always a pleasure to watch your work, this is so interesting, awesome to watch and inspiring at the same time for my projects ! Btw, I was wondering (if you have the time) if you could make a video on how to build neural networks, the one you use because... I tried to make it myself but it's really hard and im sure you could explain it easily ! Like back propagation algorithm etc... That would be awesome, but I dont know if it would match the channel theme since it would be a more coding video. That's just an idea actually. So thank you if you ready my comment (and sorry for the mistakes, im french😅)
Always amazing. Please go down the rabbit hole!!!
I'd love to see some addional complexity to the predators. Perhaps most predators avoid consuming other predators, but have a neuron for that, and have a neuron for cannibalism that can be switched on during mutation. Also a system for tracking lineage.
Or when starving.
absolutely incredible to see the evolution of these very simulations.
I waited so long for a 3rd part and eventually realised it wasn’t going to happen. But then THIS came out. This was really good, especially since I found the ending to the last AI Battle video a bit underwhelming. Keep up the great work Pezzza!
this is the only ai art i will ever consider to be art
I loved watching them evolve, having seen these in ages
What if instead of giving birth to live copies, they were instead eggs (potentially invulnerable and/or invisible) which would hatch after some delay ?
This would reduce the tendency for exponential growth, as the eggs cannot start eating
It might also make allow some offspring to survive past a wave of predators
what is the music? its fire. and fire animation, and also just a fire vid in general bro. good job!
I love these simulations. I look forward to future videos!
I suspect adding a height map and a making movement between different heights exponentially more energy expensive might have an interesting effect. If you also add communication it could lead to some interesting behaviors.
Man I don't even know how long I've been waiting for the next one in this series
I love how the initial instances of the creatures just started rotating
It would be nice to see an overlay of all the graphs. But the concept is fascinating. Well done, you.
It would be interesting if you wrote a book about this fabulous fun project. Already looking forward to seeing the 4th iteration hopefully implementing some of the comments suggestions.
Your vids are fantastic! You must have a strong hardware for this huge simulation!
Adding this to my watch later :-) looks really cool!
I would have really expected simulations of this kind to be more stable then they apperently are
Always excited to see a new video of yours.
Yesss the AI goat is back!!!
This is awesome! You really should make this a multiplayer game where each player is either a predator or prey. Then observe what sort of dynamics emerge with real intelligent humans in control of the organisms!
Hey i just want to say that I think what your doing is super interesting, would love to see the programming that goes on behind it, but that may detract from the time you could use else where in this projects.
I missed this series!! Id love to see more!
I love these kinds of simulations and I'm loving this channel.
I have some suggestions for simulation rules if you'd like to read them:
Screen wrapping such that an object which goes out of bounds in one direction appears in bounds in the other direction. I think this would make it harder for predators to surround and massacre large groups of prey.
Health should impose a movement restriction such that it takes more energy to move at the same speed.
Health and energy levels should be visible to the creature itself and other creatures. We might see behaviors like moving slower to compensate for low energy, or, as animals often do, ramping up energy consumption in a last-ditch effort. Predators would be confronted with the decision of targeting weaker less rewarding prey or healthier prey that would sustain them for longer.
Adding memory and sounds seems like a great idea!
what if you add a function where when food is dropped by a dead creature it will act as a kind of fertilizer spawning a new patch of plants oor boost the current nearby plant growth?
PLEASE keep making these videos I absolutely LOVE them ❤
Love these sims. I would narrow the preys rear field of view a little bit, most of them seem to want to go backwards. Also have more plants spawning, flora is usually available in nature.
Loved the last part and love this!
Amazing project! Love the content. Suggestion: consider making the predators a bit smarter. Currently, they're relying on numbers to hunt effectively, which isn't how predators typically operate-it's more characteristic of prey. This could prevent the current issue where prey populations explode, devour all the plants, and trigger a massive predator spawn. When plants are wiped out and predators are overly abundant, prey end up going extinct. Predators should focus on being efficient hunters, controlling prey populations EARLY to prevent plant depletion and unsustainable prey growth.
Pezzza's Videos Are Always Awesome!
I remember seeing the first or second one, glad to see this is ongoing still
These are so cool! Thank you for sharing!
I'd love to see a version where predator and prey aren't hardcoded categories, but there's a mutatable parameter for how much energy they get from plants/food. In other words, everyone can eat plants and animals, but some get more out of plants and some more out of animals.
If you can track their eating history, predators could be defined by >2/3 of energy comes from food, herbivores by >2/3 come from plants and the rest are omnivores. So an individual could shift strategies based on the availability of food. Damage could be a mutable parameter too so you could have herbivores with good defense and carnivores who only scavenge.
A simple mechanism that might help a bit with balancing could be to make predators/prey disappear with a certain chance, when they hit the bounds of the simulation. So when their numbers get high, there would be a certain drain on their population. That would replicate natural behavior as well.
Or accidents like a chance of injury if doing something like running fast or spinning round that kills the creature; still lets them chose to do risky strategies - high risk high reward sort of?
Love these simulation videos. I'm glad you gave the prey a wider field of view. I commented the same on your previous video.
I think one basic principle to consider is that predators and prey started as the same type of organisms. They find a balance by specializing in using particular food sources.
Could you make the ability to digest a given food source variable and related to the organism's diet? They both could start out with a random food value and gain a consumption speed/attack bonus related to interaction with the corresponding food source. Their color could be a gradient designated based on their food source value. You might get omnivores in the mix which would smooth out the swings only to be later out competed by more specialized populations.
Also, could you make them both have wide field vision? That might allow for the evolution of perception if only half of the rays can be activated at a time, but random mutation can modify which specific rays are activated. It would be interesting to see how the vision evolves over time.
Another tweak to try later might be to make plant energy burn more quickly verses hunted food. So more specialized prey eats more plants more quickly and predators have a bigger store of energy to use in the hunt. You could also make it discrete by allowing each organism's stomach to hold up 2 kills or 3 plants. The ability of the organism to pluck a whole source could be based on their food value. A food value of 1.5 out of 3 could let them pluck one kill, one plant and slowly scavenge a kill or plant for .5 each, etc. A value >2 would only allow minimal scavenging of plants and pluck up to 2 kills.
Again, this is a very interesting simulation.
Your simulation are so great
Keep up the good work
I have been waiting for this a long time, thank you
THANK YOU! Ive waited for litterly years now but its worth it!