Simulating the Evolution of Aggression

Simulating the Evolution of Aggression


– [Justin] In this
video, we’re gonna start exploring conflict between creatures. To try to build some understanding here, we’re gonna use some
simulations and some ideas from a field of math called Game Theory. (light music) Okay, so in our simulation,
food will appear each day, and then blobs will appear
and go out to eat the food. We’ll use the same survival
and reproduction rules as in previous videos. Eating one piece of food lets a creature survive to the next day, and eating two pieces of
food allows a creature to both survive and reproduce. What’s different in this simulation though is that food will come in pairs. Each creature randomly picks
a pair of food to walk to, so it might get the pair all to itself and get to go home with two
food and then reproduce, or another creature might find
the pair at the same time. And when this happens, they
have to somehow figure out how to split things up. We’ll start out by having
only one possible strategy for creatures who run into each other. They’ll just share, each
taking a piece of food and going home to survive to the next day. And because this strategy is so nice, we’ll give it the name “dove.” All right, let’s let things run for a bit. (light music) All right, now let’s add a new strategy called the hawk strategy. Hawks are more aggressive. If a hawk meets a dove, the hawk will go for the same
piece of food as the dove, eat half of it, and then quickly eat the other piece of food,
taking it for itself. This half food does
complicate our survival and reproduction rules a little bit. So in this situation, a dove
ends the day with half a food, so it’ll have a 50% chance
of surviving to the next day, and the hawk ends its day
with one-and-a-half food, so it’ll survive for sure, and also have a 50% chance of reproducing. So it looks good to be a
hawk, but it’s also risky. If two hawks meet, they’ll fight, and fighting is taxing. At the very least, they
use a lot of energy, and they might also get injured. So, when hawks fight, each
one gets a piece of food, but they spend so much energy fighting that they use up all the
benefit of the food right away and effectively go home with zero food, meaning they won’t survive. So, now let’s try adding a hawk
creature to our simulation, and see what happens. Now is a good time to pause and predict what you think will happen. (light music) All right, it looks like we have a mixture that fluctuates roughly
around half and half. And, there are also
fewer creatures overall, even with the same amount of food. Here’s an example of how natural selection doesn’t necessarily act for
the good of the species. And, to cover our bases, let’s
try starting with all hawks. (light music) Okay, not too surprisingly, they’re tearing each other apart, and their max population
size didn’t even reach half of the population size of the doves. Now, if we add a dove to
the mix in the next day, what do you think will happen? Okay, so it took the doves a little while to gain a foothold here, but eventually we end up
in a similar situation, with a fluctuating mixture
of hawks and doves. So why do we care? Well, this is a situation
where survival of the fittest doesn’t help us understand
what’s going on. There isn’t one fittest strategy. We can get a better sense for why this is by translating our conflict
rules from before into a table. If two doves face each other,
they’ll each get one food. If a dove faces a hawk,
the dove gets half a food, and the hawk gets one and a
half or three-halves food. And if we reverse perspectives,
if a hawk faces a dove, they’ll get three halves and one half. And when a hawk faces another hawk, they’ll each end up with zero after they waste a lot of that
energy fighting each other. Now that we have this
table, let’s imagine blobs that can choose which
strategy they want to play. Say I control the blob on top, and you control the blob on the left. Say you know that I’m going
to play a hawk strategy, which of course I am, what should you do? Well, you’re better off just backing down and taking your half food. That might be annoying since it feels like I’m winning somehow, and you might be tempted to
challenge me and also play hawk to teach me that I can’t
just push you around. This could make sense if we
were gonna play this game against each other over and over again, as two humans might do, and that is something we’ll
talk about in future videos. But, in this situation, we’re just these simple blobs
with no social structure, interacting once, and even if
we do see each other again, we won’t remember it. So, all that matters is how much food we take home right now. And if you want to maximize
your chances of surviving and reproducing, you’ll play dove. Discretion is the better
part of valor here. Let’s record this by drawing an arrow. If we’re in the right-hand
column because I’m playing hawk, the situation in the upper-right square is the best you can do. Okay, in the other case
where I’m not so mean, you know that I’m going
to play the dove strategy. In this case, you’ll
do better playing hawk. And here again, because
you’re a very smart human, you might be tempted to
think about the future, and want to reward me for playing nice and play dove yourself, but we’re just these really
simple blob creatures who might never see each other again. So, if you want to maximize
your chance of reproducing, you’ll play hawk. And, we can record this
with another arrow. So now, to complete this table, we can reverse perspectives
and think about what I should do in response to you, which I won’t go through in
detail, it’s the same reasoning. But, we’d get similar
arrows in the rows here. These arrows all point to
more advantageous strategies, and the interesting thing to notice is that there are two stable situations: either you play hawk and I play dove, or you play dove and I play hawk. If we’re in one of those two situations, either one of us would be worse off if we pick a different strategy. And by the way, this
way of analyzing choices is called Game Theory, which is a whole field of math. In a situation where nobody benefits from changing their strategy, it’s called a Nash Equilibrium,
named after John Nash, who some would say had a beautiful mind. So, the best strategy isn’t hawk or dove. It’s to do the opposite of
what your opponent is doing. When there are a lot of doves,
it’s better to be a hawk, and when there are a lot of
hawks, it’s better to be a dove. There’s some equilibrium fraction of doves that the population is
always pulled toward. Great, so we have the main
conceptual point down, but we can deepen our understanding by calculating what that
equilibrium fraction should be. The population will be an equilibrium if doves and hawks have the same expected average score in a contest. Right? Equilibrium is when, on average, we don’t expect a change
one way or the other, so we can’t have one
strategy doing better. They’re equal. Our goal is to find the fraction of doves that makes this condition true. On our way there, let’s first calculate the expected average score for a dove in a hypothetical example. Say, where the rest of the
population is 90% doves. So let’s see, a dove
will have a 90% chance of facing another dove, in which case it gets the dove versus dove payoff of one food. And a dove also has a 10%
chance of facing a hawk, right? That’s just the rest of the creatures. In which case it only gets a half a food. So overall, when a dove
runs into another creature, when the rest of the
population is 90% doves, it’ll come away with 0.95 food on average. This number is pretty
meaningless on its own. But, once we calculate
the expected hawk score, we can compare the two to see whether the equilibrium condition is met. So let’s do that; let’s find
the expected hawk score. It could be good to pause
and try to do this yourself to make sure it all makes sense. Maybe even rewinding to
watch the dove part again. Okay, just like before, the rest of the population is 90% doves, and against a dove, a
hawk gets one-and-a-half or three-halves pieces of food. And again, there’s a 10% chance of running into another hawk, in which case our hawk
goes home with zero food. And this comes out to
1.35 food on average. Now, notice that 1.35 is more than 0.95. So at 90% doves, hawks will do better, and we’d expect the fraction
of hawks to increase in the next generation. So, it’s not equilibrium. Not 90%. Now to find out what fraction of doves does meet the equilibrium condition, we can write the fractions
of doves and hawks as variables instead of just
guessing at specific numbers. And you might be saying right now, “Wow, that’s a lot of letters,” which is a fair point,
but we’re almost there, and our next step is actually to get rid of one of those letters. So, there’s a nice treat already. Doves and hawks make up all the creatures, so their fractions have to add up to one. And, this means we can replace the small h with one minus small d. And now, the expected dove and hawk scores are both written as
functions of one variable. And the same variable. So, we can graph them
on top of each other. The expected scores are equal
when the graphed lines cross. And, indeed, the equilibrium
condition is met at 50% doves. And, if we run a simulation with way more creatures than before, unfortunately too many to animate, the randomness smooths out a bit, and we can see that
the prediction is true. Okay, so, it might feel like
that was kind of a lot of work just to verify what we already thought. But, the fraction of doves isn’t always going to be one half. It depends on the numbers
in our payoff grid. The most interesting
number to play with here is the hawk-versus-hawk payoff. So far, we’ve been saying that the hawks each get one piece of food, but waste all the energy
of the food on fighting. But, what if instead, they only waste most of the energy, not all of it, and go home with a score of 1/4th? Plugging that in, we see the population move toward 1/3rd doves. And again, we can see this
borne out in the simulation. At this point, congratulations, we have a pretty detailed understanding of how populations of
hawks and doves work. And as basic as this model is, with only two simple strategies, it’s a powerful starting point for analyzing behavior in the real world. And, before we go, I want
to give you some teasers for how we’ll build on this to get closer to reality in future videos. First, creatures in the real world can play more than one strategy. So instead of having their behavior completely determined by a single gene, our creatures could have several genes affecting their behavior, causing them to have different chances of playing hawk or dove. And the Game Theory term for
this is mixed strategies. There can also be more
complex, conditional strategies that act differently
depending who they’re facing. For example, there could be a strategy that fights with hawks,
but is nice to doves. And, there could also be a strategy that tries to threaten a fight, but runs away if things get serious. And, seeing what happens with
these kinds of strategies can help us understand why some animals put on threatening displays
while rarely actually fighting, or have somewhat ritualistic fights that usually don’t harm anyone. Next, most conflicts
are actually asymmetric. So far, we’ve been
assuming that everyone has the same amount to gain and lose, and that all the creatures
are on equal footing. But when this changes, we can
start to understand things like territorial behavior
and dominance hierarchies. And last, let’s go back to our equations and see what happens as the hawk payout gets less and less bad. Say, getting to three fourths. Now the graphed lines don’t cross at all. There’s no equilibrium. At this point, even if you
know you’re facing a hawk, the three-fourths food
you get from fighting is better than the one-half
you get from being nice. So these arrows should actually flip, and, it only ever makes
sense to play hawk. We end up in this tragic situation where everyone’s fighting all the time, even though they would do better if they could just cooperate. This kind of situation has a special name. It’s called the prisoner’s dilemma. It can feel kind of grim,
but there are ways out of it, which we’ll talk about in future videos. And, I’ll see you then. Okay, so now I have some people to thank. First, thanks to you
for watching to the end. Second, thanks to everyone who’s
become a patron on Patreon. Your support is what makes me feel like people actually get
value from these videos, and gives me the confidence
that they’ll be funded into the future. Third, I want to thank
the channel 3Blue1Brown, who shared the last video and really gave this channel a kick. If you like this channel, you really should go
check out 3Blue1Brown. And finally, this video was
supported in part by Brilliant. If you like how I treat biology
as a quantitative subject and want more like it, then I really think you might like Brilliant’s computational biology course. In it, you learn things
like how to analyze genetic information, map ancestry, and predict the structure of proteins. Videos are a great way to
get excited about a topic, but to really learn deeply, you have to engage in
active problem solving. And, that’s what’s so
great about Brilliant. Their courses are built
around answering questions. And some of the exercises
even have you run code, like this script that
analyzes protein folds. Super cool. If you’d like to give Brilliant a try, you can go to brilliant.org/Primer, link in the description, to let them know you came from here. And the first 200 people to use that link get 20% off the annual
premium subscription. Check it out.

100 thoughts on “Simulating the Evolution of Aggression

  1. This doesn't show that humans are naturally competitive or that they're naturally inclined to be greedy. Both of those are myths invented by capitalist economists.

  2. While watching this I constantly thought the way it was animated and narrated reminded me sttrongly of 3blue1brown, didn't know he did mention you though. Love your videos

  3. When you introduce a single dove into an all hawk society, isn’t there a high chance it will instantly die (depending on how likely it will encounter other blobs). I wonder if he had to rerun the simulation because of this without telling us 😀

  4. I'm failing to see how both players playing Dove is in any way bad. As you noted, the total population is the highest in that scenario and also seems to be the most stable long term. And since this is the first video I'm seeing, I'm not sure if you'll get to it, but are there alternate share strategies? conversion tactics such as a dove meeting a hawk who has lost at least one encounter in the past and is therefore open to trying a new tactic? or perhaps hawk life, being quite stressful, may lead some hawks to work against themselves out of unhappiness, perhaps not participating sometimes (depression) or acting out of agression without taking the food? But don't get me wrong, I ABSOLUTELY LOVE these videos and blobkins so… thank you ^_^ this is a fascinating way to visulaize this topic

  5. At the end, how can hawks get both 3/4 if they meet eachother? That would meen there being 2 1/2 food aich theres not. There are a couple of small mistakes in this also like the one where a dove would not be able to reproduce if surrounded by hawks.

  6. Esta es la razón por la que Perú es una mierda. O son muy buenitos o son malos, y no se puede vivir en paz sin tener que compartir o despojarse de lo propio.

  7. This analyzation in choices is called "Game Theory"- dun dun dun dun dun dun dun dun dunnunununu dun dun dun dun dun welcome to GAME THEORY

  8. This is beyond stupid, you act like you're extrapolating the table from the behavior of some natural will or entity, when actually all you did was create a simulation from a couple of equations which YOU created, then you made a CGI video explaining why the things did exactly what you told them to do.

    This has literally zero value. Indeed, it likely has negative value, as it presents itself as some sort of behavioral model that exists in nature, but it absolutely does not. Again, this is just a couple of math functions put to CGI…this has NOTHING TO DO WITH HUMAN OR ANIMAL BEHAVIOR.

  9. Hey! This channel it's very interesting! What program do you use to simulate the calculations and for the animations?🤩

  10. Pause and predict at 2:29: hawks will spread rapidly at first because they can get a better chance of reproducing, while also giving doves a worse chance of survival. However, doves are better at surviving hawks than other hawks are, so once hawks make up enough of a population to impose much pressure, they'll keep each other in check by killing themselves off.

  11. I'm an economics student. When I saw the title, I thought about a piece of psychology or something similar. However, it was game theory…

  12. your style and that of 3blue1brown are similar, calm, informative, simple and interesting.. I like both channels and wish that someday I could become a patreon of both of you.

  13. I dont know how but this helped me understanding one concept of one of my subjects: random variables n state estimation!!

  14. What if the population of dove and hawks were even, and they got opposite types and all doves die while hawks didnt reproduce which then they meet up with the same type and kill themselves. For example 4 Ds and 4 Hs. They meet up like this
    D-H
    D-H
    D-H
    D-H
    Then all doves die and hawks font reproduce unluckily. So…
    H-H
    H-H
    Bruh thats kinda cringe

  15. The Prisoner’s dilemma reminds me of everyone wanting to play high damage classes in some video games causing the team to suffer because there were no medics

  16. i would love to see this experiment repeated with a third group that does actively choose its strategy according to what it encounters to see how long it would take to overwhelm the other species and look at what kind of variables would affect that length of time.

  17. why is having a mixture of Doves and Hawks not in the best interest of the species? with the over population of Doves eventually they run out of food like deer without wolves in the wild. And Why don't blue Doves and red Hawks interbreed and make Purple gummy bears?

  18. Can you please just make a whole village putting together everything you've ever done that would just be mind blowing

  19. You should create 10 or so specialized individuals with personalized traits and then simulate their family lines to see what happens.

  20. as someone who would also describe themselves as "a blob with no social structure" so this really helped but my life in perspective and will help me in the workplace

Leave a Reply

Your email address will not be published. Required fields are marked *