[0:00] - [Justin] This video is sponsored by Blob Shirt. It's a soft, comfy shirt with blobs on it. When a resource is contested, is it better to work together, or look out for yourself? We're gonna analyze this question from an evolutionary perspective using simulations and game theory. Each of these mango trees has two mangoes on the bottom layer. So if a blob finds a tree on its own, it gets to eat both mangoes. Then when it goes home, it uses the energy from each mango to make one offspring. [0:31] So two offspring in this case. And also, it dies. The blobs only live for one day. On the next day, the newly born blobs will spread out to each get their own tree, and then again, they'll reproduce twice before dying. So now there are four blobs, but still only two trees. So they're gonna have to deal with that somehow. We'll start out with blobs that work together as a team. They'll notice that there are two more mangoes higher up in the tree. And so they'll work together to shake the tree, causing those mangoes to drop, [1:02] and then they'll share the total. So that comes out to two mangoes each when they cooperate. It does cost them a little bit of energy to shake the tree though. So let's subtract a quarter mango worth of energy from each blob, leaving them with one and three quarters when they go home. You might notice that this number is completely made up. Later on, we'll look at what happens when we change some of these numbers. But for now, we're just picking something specific to get a simulation running. When these blobs reproduce, they'll use the first unit of energy to create one offspring for sure, [1:33] then the remaining three quarters will convert into a probability for one more offspring. Okay, two of them reproduced once, and two of them reproduced twice. So now we have six blobs total. But we still only have two trees. The blobs avoid going to a tree that already has two blobs. So if the world has more than twice as many blobs as it does trees, then the last blobs to go out will end up wandering around until they die. So two times the number of trees will be the carrying capacity for any of these worlds. All right, at this stage, let's introduce a mutation. [2:06] Instead of a team blob, this red blob is a solo blob. Instead of cooperating, it'll fight trying to get as many mangoes for itself as it can. Just like team blobs, they can also get a tree to themselves. And when a solo blob and a team blob meet, the team blob will still offer to cooperate and start shaking the tree. But the solo blob is just gonna start eating the mangoes. Once the team blob realizes what's going on, it'll start eating too, trying to get what it can before the solo blob gets everything. We're gonna have to make up a number here too, [2:37] which again, we can change later. But let's start by saying the solo blob gets one and a half mangoes and the team blob gets the remaining half a mango. Then when they go home to reproduce, the solo blob will produce one offspring for sure, and then have a 50% chance to produce a second. And the team blob will just have a 50% chance to produce one offspring. Okay, now that we have two solo blobs, we can see what happens when they meet. They each go for the other one's mango, but then they fight a little bit. They end up stopping and eating their one mango, [3:09] but not before wasting some energy. Let's say the energy penalty is pretty minor for now. So each solo blob goes home with a net reward of three quarters of a mango worth of energy, which then leads to a 75% chance to reproduce. Okay, now that we have all the rewards laid out, let's make the world a bit bigger and set up a graph to track the relative abundance of each type. Before we start this simulation, what do you think will happen? Will one strategy do a better job of reproducing and then be more common in the population? And if so, will it be so extreme [3:41] that the other one will go extinct? Something else? (bright music) (bright music continues) This blue area represents the fraction of team blobs over time. And the red area represents the fraction of solo blobs. And since those are the only two kinds, [4:11] the two fractions have to add up to one. So it looks like teamwork went extinct. That could have been luck though. So let's double check by adding some more worlds. And to mix things up, each world is gonna have a different starting mixture of team blobs and solo blobs. This first world is gonna start with 10% team blobs and 90% solo blobs. The next world will start with 20% team blobs and 80% solo blobs, and we'll increase the fraction of team blobs by 10% all the way up to the final one. That starts with 90% team blobs and 10% solo blobs. [4:44] And here's another opportunity to make a prediction. Got it? All right, let's see how it goes. (bright music) (bright music continues) So this is interesting. In some of these simulations, the team blobs takeover, and in others, the solo blobs take over. But it doesn't look random. It looks like the solo blobs do better [5:14] when there are many other solo blobs, and the team blobs do better when there are many other team blobs. So why might this be? Now it's time for some game theory, the math. And also some evolutionary game theory. As you might expect from the names, they're related, but not quite the same. In normal game theory, we imagine the game is between two players and each player can choose whichever strategy they want, trying to get the best reward they can. In evolutionary game theory though, the players don't really have a choice. [5:44] They just do what their genes tell them to do and their reproduction is determined by the reward. Before we really get into analyzing these rewards, there's a couple things we can do to make it easier. First, we can ignore this case where the blobs find their own tree. That case is important for helping the population of blobs fill up the carrying capacity of the world, but it doesn't have anything to do with the competition, which is what we're trying to focus on. And this thing we're left with is called a reward matrix. Second, it'll be a little bit easier [6:14] to compare the rewards if we write them as simple fractions with the same denominator. Okay, so these rewards are for the player on the left, so let's think of ourselves in that position with the top player as our opponent. If your opponent is going to cooperate, then you're better off cooperating too. Seven is bigger than six. And we can record this decision with an arrow. And since this game is symmetrical, the same is true from the opponent's perspective. This can be a little easier to see if we extend each entry in the table [6:45] to also show the rewards for the opponent. There's no new information here, but it makes it a little bit easier to see that the opponent should also cooperate if we're going to cooperate. Again, because seven is bigger than six. This kind of situation, where neither player benefits from switching, is called a Nash equilibrium. In my humble opinion, the reward matrix looks a bit cluttered this way. And these two arrows are really the same arrow, so we only need one of them to see that this situation with both blobs working together as a team is a Nash equilibrium. [7:16] So let's go back to just showing each reward one time. So what if your opponent is gonna go solo? Well, you're better off also going solo, even though you'll get in a fight. And again, the same is true from the opponent's perspective. So the case where both players fight is also a Nash equilibrium. Usually the best plan is to play toward the Nash equilibrium if there is one. But in this case, there are two of them. So which one should you choose? You're best off doing the same thing your opponent is going to do, but it's not clear which one they'll choose, [7:47] so it's not clear which one you should choose. To decide, you might have to resort to psychology, or some other aspect of the situation. Now for evolutionary game theory, we saw in the simulation that when the population is full of one kind of creature, that kinda does well. The population essentially ends up at a Nash equilibrium by accident, rather than by analysis. If a mutant shows up and starts playing a different strategy, it doesn't gain an advantage. A strategy with this property is called an evolutionarily stable strategy. [8:18] This is a pretty significant concept. For a genetic behavior to take over a population and stay dominant, it needs to be part of an evolutionarily stable strategy. In this case, both strategies are evolutionarily stable, so whichever one of them gets a lead ends up dominating the population. There's some crossover point where the situation goes from favoring one type to favoring the other. And we can actually calculate that crossover point based on the reward matrix. But before we do that more general calculation, it'll be useful to try a few more specific variations [8:50] and see what other kinds of possibilities there are. So let's copy this matrix and make a variation. One thing we could do is to make the mangoes harder to shake out of the trees, reducing the payoff of working as a team. Now if you're matched up with the team blob, your reward is gonna be the same, whether you also act like a team blob or like a solo blob. Teamwork is still technically a Nash equilibrium here because if both are cooperating, neither benefits from switching. But even though you don't do better by switching, you don't do worse either. This is called a weak Nash equilibrium. [9:22] And if you do do worse by switching, it's called a strong Nash equilibrium. Frankly, I think these names are a little bit confusing, but you do get used to them over time. All right, time for a couple more simulations. But first, try pausing to guess what the results will look like. (gentle music) Okay, it looks like if the population is full of solo blobs, it stays that way. So in this case, being a solo blob is an evolutionarily stable strategy. And for teamwork, it mostly looks like [9:54] it's not an evolutionarily stable strategy, though there is this one world that started with 90% team blobs, and it pretty much stayed that way for the 50 days. Since teamwork is still a Nash equilibrium, if a weak one, solo blobs in a sea of team blobs don't really have much of an advantage. But the more solo blobs there are, the more of an advantage they have. So as long as it's possible for a team blob to produce an offspring that's a solo blob through a mutation, then it's just a matter of time until the solo blobs take over. [10:25] So teamwork isn't an evolutionarily stable strategy here, even though it's kind of close. So that's one variation. And we could make another variation, making cooperation even less beneficial. So for this matrix, you're better off going solo, regardless of what your opponent is doing. Both blobs fighting is still a strong Nash equilibrium and teamwork isn't even a weak Nash equilibrium. For this one, it seems kind of obvious what's gonna happen. The solo blobs just have an advantage, but we might as well check. [10:55] (gentle music) Okay, yep. Going solo is still an evolutionarily stable strategy and the team blobs get their butts kicked. This kind of situation has a special name. The prisoner's dilemma. When two solo blobs meet, they each get three quarters of a mango as a net reward. But if they would just work as a team, they could each get five quarters of a mango. But in any given case, you're better off going solo, so the solo blobs take over. So now we have three matrices [11:25] that progressively make cooperation less and less beneficial. And these encompass the three possibilities for what gets you the best reward when you meet a team blob. Either you should team up with them, you should go solo, or it doesn't matter. The other thing we could change is to also increase the cost of getting in a fight. First, let's reduce it until the team blobs and the solo blobs get the same reward. This is a sort of mirror image of this other one, but this time teamwork is a strong Nash, and fighting is a weak Nash. So what would you expect here? Is it gonna be pretty much the same, [11:57] just with the role switched? Or will something else happen? (gentle music) Okay, it turns out it is pretty much the same as before, but flipped. Cooperation is an evolutionarily stable strategy, and going solo isn't. Even though the world that started out with mostly solo blobs still seems to be hanging on. Next, let's make fighting even more costly. And this one is a mirror image of the prisoner's dilemma situation. So as you might expect, the results are opposite. [12:28] Teamwork is an evolutionarily stable strategy, and solo blobs get their butts kicked. We've only changed one of the payoffs at a time, but we could combine these changes to get four more cases and these are worth looking at as well. In this middle case here, both strategies lead to a weak Nash equilibrium. I know I keep saying you should try to make a prediction, but here's one I genuinely think is tough. I'm gonna make this one multiple choice. And I'm not gonna grade it, but if you pause and pick, I think you'll learn more. [12:59] So the first possibility is it's just total chaos. The lines are gonna be squiggling everywhere. Another possibility is that the starting populations will tend to stay about where they are. So we'll see roughly straight lines all across the graph. Or maybe the team blobs will do better in more of the worlds because there's just better rewards when everyone's cooperating. Or, it could be that I'm baiting you with all of these and it's none of them, in which case, say what you think is gonna happen. (gentle music) [13:34] Okay, looking at the overall average, it does seem to favor solo blobs slightly, but looking at individual cases, it does seem pretty clear it's just chaos. With this matrix, your reward is entirely dependent on your opponent and it has nothing to do with what you decide to do. It's pure luck. So here, neither strategy is evolutionarily stable. The population also doesn't stay at a consistent mixture because there's nothing to correct lucky bounces one way or the other. And even though the overall rewards are higher when the population is full of team blobs, [14:06] the solo blobs get those rewards too. So there's no advantage for the team blobs. All right, moving on. From here, let's make fighting more costly. This one's not a mirror image of anything we've done so far. So try determining whether either strategy leads to a Nash equilibrium, and whether it's evolutionarily stable. Okay, here's another one where teamwork is an evolutionarily stable strategy. The interesting thing here is that this is the first time we've seen [14:36] an evolutionarily stable strategy that just corresponds to a weak Nash equilibrium. When the population is mostly team blobs, they don't have much of an advantage. So in most of the sims, the solo blobs didn't actually go extinct. But if there are a bunch of solo blobs, they hurt each other. So even though they can linger around, they can never actually take over the population. And when we look at this mirror image case, we again see something similar, but with the roles reversed. All right, one more case, [15:06] where both cooperation and fighting have a high cost. This situation also has a special name. It's called a Hawk-Dove game. The solo blobs are called hawks and the teamwork blobs are called doves. Anyway, what do you expect to happen? (gentle music) Here, neither strategy leads to a Nash equilibrium, not even a weak one, and neither strategy is an ESS either. It turns out there's a fraction of hawks versus doves that the population keeps trying to return to. [15:38] There's still a little bit of chaos, but if one strategy starts to take over, suddenly it's advantageous to be the other strategy and the population moves back toward that fraction of cooperators. And just like that crossover point for the very first situation we looked at, we can calculate what that number will be for any reward matrix. But before we do that, let's see if we can look back, and summarize the relationship between the Nash equilibrium and an evolutionary stable strategy. It looks like a strategy is always an evolutionarily stable strategy if it leads to a strong Nash equilibrium. [16:11] And a strategy can also be an ESS if it leads to a weak Nash equilibrium, as long as the other strategy doesn't lead to a Nash equilibrium, strong or weak. This is the definition of an evolutionarily stable strategy that you'd find in a textbook. But for me at least, it makes a lot more sense after going through all these examples. And these really are all of the examples, at least for a symmetrical game where the players can't communicate. Of course, there could be all kinds of different numbers and there could be more than two strategies. [16:42] But any strategy with any rewards will always lead to either a strong Nash equilibrium, a weak Nash equilibrium, or no Nash equilibrium. And evolutionary stability will still always follow this rule. There may be an upcoming video with more than two strategies, but you're just gonna have to wait. At this point, there is a little bit more we could do. We could derive a formula that'll give us the stable equilibrium mixture in a Hawk-Dove game for any values in the reward matrix. We could do the same thing, but for the crossover point in that first situation [17:14] where both strategies were evolutionarily stable. Another question which turns out to have an interesting answer is, what if we allow the blobs to flip a coin to decide which strategy to play? Consider those questions homework. I know, I said we would do those calculations, but I didn't say in this video. Videos are great and all, but you learn the most when you do things. And when you connect with other people who are also thinking about the same stuff. So if you wanna discuss these questions, or share your answers with me or others, [17:45] or if you're already pretty familiar with this stuff and wanna help out, there's a Discord link in the video description. I also stream myself working on Twitch a few times per week and I'm happy to talk about it there. If you get value from these videos, and you'd like to support monetarily, there's a few ways you can do that. The newest way is to pick up one of these shirts. Another great way is to support monthly on Patreon. Patreons get early access to videos, some behind-the-scenes updates, and discounts on shirts and blob plushies and other things in the store. And even if you're not able to support monetarily, [18:16] I appreciate very much that you watch all the way to the end of the video. And I'll see you next time!