Much bigger simulation, AIs learn Phalanx

preview_player
Показать описание
This video is the next part of my evolution project where predators and prey are fighting.

In this part I added the capacity for prey and predators to see their peers.

00:00 Introduction
00:22 Working Principle
05:11 Bigger Simulation - First try
09:10 The missing piece
26:10 Timelapse
27:43 Ending
Рекомендации по теме
Комментарии
Автор

It's interesting how the prey cap seemed to play an important role in the simulation- when there was one big preyblob left, it seemed to have all of the prey in it, so no other prey could really reproduce, but when the predators were able to start breaking up that blob, the prey population suddenly exploded over the whole rest of the map

aerievee
Автор

I think what happened at 19:20 is that after the collapse of the Corner Prey Blob, some predators managed to migrate to the Center Prey Blob, where the prey weren't adapted to deal with the corner predators' aggressive strategies. The corner prey had evolved alongside them, so they were better adapted to deal with them, but the center prey were by that point probably a totally different species, who didn't have the traits necessary to defend against the corner predators. I'm guessing the center predators also quickly went extinct when the corner predators started expanding, but that was something we couldn't see, because they looked the same. In other words, the Center Blob had a relatively balanced ecosystem, which got destroyed by an invasive species, and then a new balanced ecosystem emerged (the scanner ecosystem).

gavinoaw
Автор

My theory at 19:40 is that over time, as the prey in the center replicated, they slowly lost some of their evolutionary traits that helped them avoid/eliminate predators; there wasn't any evolutionary pressure to keep those traits because they were relatively well protected by the prey on the borders. So, when the border prey were killed, it left the center more vulnerable.

devinsze
Автор

A critical mechanism for prey that seems to be missing is food source. There is no incentive for prey to NOT clump together and stay in one place. Would be interesting to model something like grassland food per grid square, being depleted over time depending on number of prey occupying that square.

ThePrisoner
Автор

This man doesn't get enough credit for this, absolutely epic simulation. I thought it was interesting how the predators that found the 'wall ramming' technique first also died out first because they killed their prey very quickly

charliegodfrey
Автор

I have a couple of ideas:
1. Instead of keeping the prey stuck with a short range of vision but a wide field of view, and the predators a long range of vision but a narrow field of view, both kinds of entities should have an "eye shape" gene where vision range and field of view are inversely proportional to one another.
2. Have a third kind of entity, "plants", which are eyeless blobs that can't move on their own, but stay still and multiply if kept alive for long enough (Prey don't do this anymore - their reproduction is based on how any "plants" they've eaten, like predators). They're eaten by prey, and while predators can't eat them, they can push them around (maybe they can develop weird strategies around this, like a wave of predators carrying some plants around to attract prey).

aaronmyers
Автор

I love how the simulation found a balance at the end with the never ending line wave. Kinda reminded me of a refresh rate

fluffsquad
Автор

I liked how early in the simulation the prey population split into distinct specialized herd/group defense and soitary-dodging populations.

Coco-qyst
Автор

I like the fact that even not having a way to communicate with each other, the predators were able to create formations and even turn the phalanx to flank the pray mass

ernestogomez
Автор

19:23 I think it could be a case of the prey changing, not the predator. The prey in the middle of the blob were sheltered from predators for a very long time, so they didn’t get a chance to evolve accordingly. When the predators broke through the first strong layer, they were visited with a bunch of under-evolved prey that they could easily eat

RinkieGeintie
Автор

I love how the simulation literaly balanced itself into maximizing the amount of entities

affegpus
Автор

The reason why the giant blob might have been decimated by the predators could be the prey's in the middle getting too comfortable in their safe spot. Which meant there was more room for weaker creatures to breed, making the warrior prey die off and the weaker prey survive. Which ended up benefiting the predators since they became easier to kill. Changing the whole ecosystem

davidkonevky
Автор

Lots of ideas:
1) I think that a good way for prey to communicate would be pheromones.
The prey will be able to produce and sense pheromones as a response to stimuli such as 'i see lots of predators' which would allow for complex behaviours and strategies. Maybe predators could also use pheromones, possibly even sense the preys' pheromones which would allow for even more complexity.
Also there could be multiple different pheromones, for example red blue and green, which the prey could evolve to signal different things.

How pheromones could be implemented in the simulation:
Particle Approach:
Upon stimulation, prey will release pheromone particles which other prey could see or smell.
The number of particles they can sense will be proportional to the activation of the sensing neurone.
Pros:
Easier to code i think.
Works with infinite number of pheromones
Cons:
Seems quite cpu intensive, as a lot more raycasting will be needed to see the particles.

Image approach:
Rather than the pheromone particles being an entity in the simulation, they will instead be represented by an image that overlays the whole simulation area. The RGB channels of the image can be used to represent different pheromones.
Upon stimulation, the prey change the RGB values of the image at its position. For example if the coordinates of the prey are 20, 30 and it releases a red pheromone, it will increase the red value the pixels at or around 20, 30.
Diffusion and dissipation of pheromones over time can be simulated by simply blurring and dimming the image every frame.
To sense the pheromones, the prey would simply check the color at its coordinates, or take an average of the surrounding pixels.
Pros:
Runs a lot faster because its just performing basic operations to an image.
The can be low resolution and still have full functionality.
I think it would look cool to have the image as the background of the simulation.
Cons:
Complicated and harder to code,
Only works for 4 types of pheromones, red blue green and alpha

2) Colors:
Each entity will have a color gene that affects its appearance.
This could be purely cosmetic, and show genetic drift as the entities mutate, which will allow us to distinguish between entities with different genes.
Possibly, the entities would be able to see the color of other entities. This might lead to interesting behaviours, such as xenophobia ( prey preferring to group with prey with similar color because similarity=relatedness and grouping with related entities would help preserve its genes).
Another possibility is that the color similarity of entities it sees will replace the 'object type' input, however this may encourage mimicry; predators to evolve a similar color to the prey so that the prey cannot distinguish it from other prey or vice versa which is quite OP but sure is interesting.

3) Eyesight gene:
A gene that both increases vision range and decreases field of view, allowing these traits to evolve over time rather than being set at the start of the simulation.

4) More layers in neural network:
The current neural networks appears to only have 2 layers.
Adding more layers of neurones will greatly increase behaviour complexity, at the cost of performance.

u
Автор

It looks like you essentially have 2 species of predator. Those that work together to from a front, and those that work alone to pick off stragglers. It would be interesting to have some way to indicate lineage. The first thing that comes to mind is color: having color be something that can mutate randomly as well. This way, if a particular mutation is successful, you can see it propagate through the population. I imagine you could switch between having them just be red/green vs showing their color for analysis of lineage.

julianvandenberghe
Автор

When watching the timelapse, it almost appears that the "super predator" (the generation that could somehow destroy the prey with ease) didn't develop in the main large blob of prey, but actually in the other major blob on the map. At 26:45, you can see a sudden change where the predators go from eating the prey on the outskirts of the upper right blob to completely decimating it. Then, when it is completely destroyed, most predators die soon after. However, it looks like a few predators from that area managed to randomly wander over to the other blob, and the places they wandered to is exactly where its complete destruction started. It's just a theory, but its interesting if it is true.

realMoistNugget
Автор

There are so many cool directions this could take! Prey could experience two states- a "calm" state where they reproduce faster, and an "agitated" state where they move faster. Prey could learn to recognize the state of other prey. You could add cover- places in which prey could hide which are energetically expensive for predators to destroy. You could give each entity an "energy level" and monitor the trophic dynamics of the system. Excited to see what's next!

michaelmarvin
Автор

This simulation has an infinite number of possibilities. I've seen several proposed changes, but I believe the most interesting are adding plants that prey must eat to survive and sexual reproduction to reproduce. The males would be a little darker than the females and the females could not move for a few seconds to give birth. This could cause females and males to have two different roles and force them to stay in groups. I also saw several that wanted prey and predators to communicate with each other, but I think it would become too chaotic and prevent any group from creating.

alexc
Автор

I was thinking of a "comunication" methods between preys. What if you add a "light" on the back (similar to the eye) that turns on when they see a predator, and this light can be seen by the other preys (maybe by predators too, just to see if it has any effects on their hunting strategies). It could also have different degrees of intensity, for example if it's seeing a predator the intensity is 5, if it's seeing a prey with an intensity 5 light then it emits a light of 4 and so on. This might give the prey some knowledge of the direction where the predators are coming from.

veteranghost
Автор

the timelapse at the end was incredibly satisfying, i find the movements really beautiful !

Azfaefa
Автор

This is truly fascinating, seeing the AI learn to behave in a similar manner to real life animals and then ultimately evolve into a shield wall is so surreal to me. Loved the editing and music, nice job. I'll be eagerly waiting for more.

IAmCaligvla