Wednesday, June 17, 2015

Is the Nash equilibrium the only way we all get laid?

Hollywood is not known for its accurate portrayal of mathematical concepts. This isn't really a bad thing, because let's face it: I'm paying $15 a ticket to shovel popcorn into my face, not use my brain. But now we're coming up on a month since the untimely demise of John Nash, pretty much inarguably one of the greatest mathematicians of our time (and my first high school celebrity crush). His death has thrust game theory into the spotlight (e.g. this retrospective or this silly video about game theory in the Greece situation from the NY Times and this collection of posts from the Economist). So in honor of the man and his greatness and the surge in public interest in some of his work, let's take a moment to look at one of my personal favorite deviations from mathematical accuracy in modern film: the idea that the concept of "Nash equilibrium" is in any way related to some overgrown frat boys commodifying women and snubbing hot blondes.

Haha, you think my thesis is about what?


Game Theory & Nash Equilibria

Here are the definitions we'll be working with (we're trying to avoid technical stuff and anything that requires a math background here, so we're going for the "convincing waving of hands" method of mathematical discourse). As far as we're concerned, game theory is the study of "players" in a "game" making up strategies in order to "win" said game. All that stuff is in quotes because while we can pretty much put any kind of strategic decision-making scenario into a game framework, we aren't necessarily only talking about games. We might be talking about economics, or psychology, or picking up chicks in bars. The specific branch of games we're going to care about are non-cooperative games: ones in which the players act independently. This basically mean that they're not forced to cooperate---though maybe they'll choose to do so anyway. There are no rules forcing players to act a certain way on the basis of the other player's actions. A strategy for a player in such a game is some set of rules telling us what that player's going to do.

We'll figure out where this whole Nash equilibrium thing comes in with an example. Let's take penalty kicks in soccer. To make this example useful, we'll assume some unrealistic stuff about soccer. For one thing, we'll ignore any influence of home field advantage, weather, other players, whatever. All that matters is the kicker and the goalkeeper. We'll also assume that the kicker isn't going to miss the goal.
Let's pretend this can't happen. Jason Puncheon would sure love to.
Furthermore, we'll assume that the goalkeeper can't instantly react to what the kicker is doing at the second when she starts kicking, so the goalkeeper's decision about which way to dive is going to have to be independent of that. This last one is pretty reasonable, at least.

OK, so the first question here is: what are possible strategies for the kicker, and what are possible strategies for the goalkeeper? For example, the kicker might decide that she'll always kick to the upper right. But if the goalkeeper somehow finds out this strategy (because she's reviewed a bunch of videos, or there's a mole on the kicking team), the kicker is outta luck because the goalkeeper will know exactly which way to dive. So having a deterministic strategy is out for the kicker. This means some randomness has to be involved. But extending our previous logic further: suppose the kicker still really likes the upper right corner, and her strategy says that with a 90% probability, she's going to kick up there, and with a 10% probability she'll do something else. The goalkeeper can still get an advantage if she finds out about this strategy, because she knows that diving toward the upper right will work 90% of the time. So it seems like the only thing that the kicker can do which doesn't become a worse idea if the goalkeeper finds out is to kick to a uniformly random part of the goal. That means that she's equally likely to pick any part of the goal and kick toward it (and since in math-soccer, intention translates perfectly into action, that's where the ball's gonna go). The kicker, in other words, has to show no preference in how she chooses where to place her kick.

How about the goalkeeper? By the same reasoning as above, the goalkeeper shouldn't have a deterministic strategy, either (if she always dives to the upper right, an informed kicker will just kick to the left). Same goes for showing a preference for diving in a certain direction. So the only strategy for the goalkeeper which doesn't suffer from discovery is to dive to a uniformly random part of the goal.

The underlying idea here is this: when a player tries on a strategy, she asks herself, "Does my opponent benefit from knowing that this was my strategy?" If the two players both have strategies such that the answer to that question is no, then this solution concept is what's known as a Nash equilibrium. In our version of math-soccer, the only Nash equilibrium is where the kicker kicks to a uniformly random part of the goal, and the goalkeeper dives to a uniformly random part of the goal.

Fun real-life fact: this kind of analysis, though more complex, works for real-life soccer, too! A bunch of people have worked on it, and the data shows that players do generally play the Nash equilibrium strategy.



The Movie Version
So did that scene in A Beautiful Mind describe a Nash equilibrium in any way? First, a refresher:


A personal note: Before we go on, I will freely admit that when I last saw this film in its entirety, I was in high school and it was one of my favorite movies ever. I didn't really learn what a Nash equilibrium was until I was in grad school, and the revelation that no mathematical epiphany was ever followed with the words "that's the only way we all get laid" hasn't impacted my enduring love for this movie (though it might have impacted my enthusiasm for my career).

OK, so that said, the most coherent summary I can come up with for Russell-Crowe-Nash's sudden insight is this. The work of 18th century economist/philosopher Adam Smith, according to this movie's cadre of econ-bros, can be summarized as "every man for himself." (I am not an economist, but a cursory reading of Adam Smith's wiki article shows this to be vaguely relevant, though overly simplified. We'll just take it as a given, because we've got other fish to fry.) Gladiator Nash notes---assuming an apparently obvious hotness hierarchy which puts blondes above brunettes---that the every man for himself strategy would result in zero babes for each dude, whereas a cooperative strategy would result in one medium-hot babe for each dude, plus a bonus karma bitch slap for the blonde who was obviously just trolling the bar with her ugly friends to boost her own ego.

The movie follows with John Nash slaving away for presumably an entire season at what will become his seminal work, implying that this OK Cupid algorithm he just came up with has something to do with the idea of what will eventually come to be called the Nash equilibrium (which got him his degree, and eventually a Nobel prize). But is the strategy described in the bar an example of a Nash equilibrium?

First of all, we should figure out who the players here are. Since the woman-shaped meat sacks on display obviously have no desires of their own, the only rational agents in this set-up are the men. We'll assume it's true that if they all go for the blonde, nobody ends up with anybody. Suppose that the guys follow the "go for the brunettes" strategy, instead. If I'm Master & Commander Nash, and I know that all of the other guys are going for the brunettes, would I change my strategy? Well, if I consider the blonde a better payoff than the brunettes, then yes---I'll know that the blonde is lonely and desperate for my chauvinistic charms, so I'll just go for her! So the thing described in the movie isn't a Nash equilibrium at all. (Though some efforts have been made to figure out what exactly would be a Nash equilibrium in this game.)

Of course, maybe the whole thing was a clever ruse to fool his less clever friends. Russell Crowe did get the blonde in the end.
link to img source
Wiiiiiink.