<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Azimuth]]></provider_name><provider_url><![CDATA[https://johncarlosbaez.wordpress.com]]></provider_url><author_name><![CDATA[John Baez]]></author_name><author_url><![CDATA[https://johncarlosbaez.wordpress.com/author/johncarlosbaez/]]></author_url><title><![CDATA[Game Theory (Part&nbsp;3)]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><a href="https://johncarlosbaez.wordpress.com/2013/01/13/game-theory-part-2/">Last time</a> we started looking at 2-player normal form games.  The idea is that player A has <img src='https://s0.wp.com/latex.php?latex=m&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='m' title='m' class='latex' /> different choices of which move to make, while player B has <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> choices, and we have two <img src='https://s0.wp.com/latex.php?latex=m+%5Ctimes+n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='m &#92;times n' title='m &#92;times n' class='latex' /> matrices of payoffs, <img src='https://s0.wp.com/latex.php?latex=A&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A' title='A' class='latex' /> and <img src='https://s0.wp.com/latex.php?latex=B.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='B.' title='B.' class='latex' />   If player A makes choice <img src='https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i' title='i' class='latex' /> and player B makes choice <img src='https://s0.wp.com/latex.php?latex=j%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='j,' title='j,' class='latex' /> then the payoff to player A is <img src='https://s0.wp.com/latex.php?latex=A_%7Bi+j%7D%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A_{i j},' title='A_{i j},' class='latex' /> while  the payoff to player B is <img src='https://s0.wp.com/latex.php?latex=B_%7Bi+j%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='B_{i j}.' title='B_{i j}.' class='latex' /></p>
<p>What should you do if you&#8217;re playing a game like this?  As we saw when playing rock-paper-scissors, sometimes the best thing is to adopt a strategy with some built-in randomness.  In this game, if your opponent knows what you&#8217;re going to do, he can exploit that and beat you!</p>
<p>A strategy involving randomness is called a <b>mixed strategy</b>.  They&#8217;re very important, and we&#8217;ll talk about them a lot.  But today we&#8217;ll only consider <b>pure strategies</b>, where we definitely choose <i>one</i> of the choices available, with no randomness.  </p>
<p>Notice: there are as many pure strategies as there are choices!  For each choice, there&#8217;s a pure strategy where you always make that choice when playing the game.  So, a lot of people say &#8216;pure strategy&#8217; for what I call a &#8216;choice&#8217;.  Other people use the word &#8216;action&#8217;.  </p>
<p>Anyway: let&#8217;s try to figure out the best pure strategy for each player, if we can.   </p>
<p>Sometimes this is impossible. For example, rock-paper-scissors has no best pure strategy.  Could playing <b>rock</b> be best?  No, because paper beats rock.  Could playing paper be best?  No, because scissors  beats paper.  Could playing scissors be best?  No, because rock beats scissors.  </p>
<p>But sometimes we can find a best pure strategy, and the ideas we meet will help us later when we study mixed strategies.  So, let&#8217;s dive in!</p>
<h3> Nash equilibria </h3>
<p>Suppose player A makes choice <img src='https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i' title='i' class='latex' /> and player B makes choice <img src='https://s0.wp.com/latex.php?latex=j&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='j' title='j' class='latex' />.  Then we say <img src='https://s0.wp.com/latex.php?latex=%28i%2Cj%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(i,j)' title='(i,j)' class='latex' /> is a <b><a href="http://en.wikipedia.org/wiki/Nash_equilibrium">Nash equilibrium</a></b> if neither player can improve their payoff by changing their choice.</p>
<p>For example, look at this game:</p>
<div align="center">
<table border="0">
<tr>
<td></td>
<td align="center"><font color="red"><b>1</b></font></td>
<td align="center"><font color="red"><b>2</b></font></td>
</tr>
<tr>
<td><b>1 &nbsp;&nbsp;</b></td>
<td align="center">(10,<font color="red">10</font>)&nbsp;&nbsp;</td>
<td align="center">(9,<font color="red">-1</font>)</td>
</tr>
<tr>
<td><b>2</b></td>
<td align="center">(-1,<font color="red">1</font>)</td>
<td align="center">(-1,<font color="red">-1</font>)</td>
</tr>
</table>
</div>
<p>Here we are writing the matrices <img src='https://s0.wp.com/latex.php?latex=A&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A' title='A' class='latex' /> and <img src='https://s0.wp.com/latex.php?latex=B&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='B' title='B' class='latex' />  together in one table, like last time, with <img src='https://s0.wp.com/latex.php?latex=A&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A' title='A' class='latex' /> in black and <img src='https://s0.wp.com/latex.php?latex=B&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='B' title='B' class='latex' /> in red.  But we could also separate them out:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=A+%3D+%5Cleft%28+%5Cbegin%7Barray%7D%7Brr%7D+10+%26+9+%5C%5C+-1+%26+-1+%5Cend%7Barray%7D+%5Cright%29+%2C+%5Cqquad+B+%3D+%5Cleft%28+%5Cbegin%7Barray%7D%7Brr%7D+10+%26+-1+%5C%5C+1+%26+-1+%5Cend%7Barray%7D+%5Cright%29++&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A = &#92;left( &#92;begin{array}{rr} 10 &amp; 9 &#92;&#92; -1 &amp; -1 &#92;end{array} &#92;right) , &#92;qquad B = &#92;left( &#92;begin{array}{rr} 10 &amp; -1 &#92;&#92; 1 &amp; -1 &#92;end{array} &#92;right)  ' title='A = &#92;left( &#92;begin{array}{rr} 10 &amp; 9 &#92;&#92; -1 &amp; -1 &#92;end{array} &#92;right) , &#92;qquad B = &#92;left( &#92;begin{array}{rr} 10 &amp; -1 &#92;&#92; 1 &amp; -1 &#92;end{array} &#92;right)  ' class='latex' /></div>
<p>It&#8217;s just a different way of conveying the same information.</p>
<p>Either way, it&#8217;s pretty clear what the players should do in this game!  Both players should make choice 1.  That way, they both win 10 points. </p>
<p>Furthermore, this pair of choices <img src='https://s0.wp.com/latex.php?latex=%28i%2Cj%29+%3D+%281%2C1%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(i,j) = (1,1)' title='(i,j) = (1,1)' class='latex' /> is certainly a Nash equilibrium.  In other words: neither player can improve their payoff by unilaterally changing their choice!  If player A switches to choice 2, their payoff drops to -1 points.  If player B switches to choice 2, their payoff drops to 9 points.</p>
<p>Let&#8217;s give an official definition of Nash equilibrium and then look at some trickier examples.   Remember, player A&#8217;s choices are <img src='https://s0.wp.com/latex.php?latex=i+%3D+1%2C+2%2C+%5Cdots+%2C+m%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i = 1, 2, &#92;dots , m,' title='i = 1, 2, &#92;dots , m,' class='latex' /> while player B&#8217;s choices are <img src='https://s0.wp.com/latex.php?latex=j+%3D+1%2C+2%2C+%5Cdots%2C+n.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='j = 1, 2, &#92;dots, n.' title='j = 1, 2, &#92;dots, n.' class='latex' /> </p>
<p><b>Definition.</b>  Given a 2-player normal form game, a pair of choices <img src='https://s0.wp.com/latex.php?latex=%28i%2Cj%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(i,j)' title='(i,j)' class='latex' /> is a <b>Nash equilibrium</b> if:</p>
<p>1) For all <img src='https://s0.wp.com/latex.php?latex=1+%5Cle+i%27+%5Cle+m&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1 &#92;le i&#039; &#92;le m' title='1 &#92;le i&#039; &#92;le m' class='latex' />, <img src='https://s0.wp.com/latex.php?latex=A_%7Bi%27j%7D+%5Cle+A_%7Bij%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='A_{i&#039;j} &#92;le A_{ij}.' title='A_{i&#039;j} &#92;le A_{ij}.' class='latex' /></p>
<p>2)  For all <img src='https://s0.wp.com/latex.php?latex=1+%5Cle+j%27+%5Cle+n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1 &#92;le j&#039; &#92;le n' title='1 &#92;le j&#039; &#92;le n' class='latex' />, <img src='https://s0.wp.com/latex.php?latex=B_%7Bij%27%7D+%5Cle+B_%7Bij%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='B_{ij&#039;} &#92;le B_{ij}.' title='B_{ij&#039;} &#92;le B_{ij}.' class='latex' /></p>
<p>Condition 1) says that player A can&#8217;t improve their payoff by switching their choice from <img src='https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i' title='i' class='latex' /> to any other choice <img src='https://s0.wp.com/latex.php?latex=i%27.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i&#039;.' title='i&#039;.' class='latex' />  Condition 2) says that player B can&#8217;t improve their payoff by switching their choice from <img src='https://s0.wp.com/latex.php?latex=j&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='j' title='j' class='latex' /> to any other choice <img src='https://s0.wp.com/latex.php?latex=j%27.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='j&#039;.' title='j&#039;.' class='latex' /></p>
<h3> Examples </h3>
<p>Let&#8217;s look at more examples of Nash equilibria, to see some funny things that can happen.  First let&#8217;s modify the last game a little:</p>
<div align="center">
<table border="0">
<tr>
<td></td>
<td align="center"><font color="red"><b>1</b></font></td>
<td align="center"><font color="red"><b>2</b></font></td>
</tr>
<tr>
<td><b>1 &nbsp;&nbsp;</b></td>
<td align="center">(10,<font color="red">10</font>)&nbsp;&nbsp;</td>
<td align="center">(-1,<font color="red">10</font>)</td>
</tr>
<tr>
<td><b>2</b></td>
<td align="center">(10,<font color="red">-1</font>)</td>
<td align="center">(-1,<font color="red">-1</font>)</td>
</tr>
</table>
</div>
<p>Is there a Nash equilibrium?  Yes&#8212;and just as before, it happens when both players pick pure strategy 1.  Now player A&#8217;s payoff doesn&#8217;t get any <i>worse</i> when they switch to pure strategy 2.  But it doesn&#8217;t <i>improve</i>, either!  It stays equal to 10.  Similarly, player B&#8217;s payoff doesn&#8217;t get any worse when they switch to pure strategy 2&#8230; but it doesn&#8217;t improve.  So, neither player is motivated to change their strategy.</p>
<p>I said a Nash equilibrium is a situation where neither player can improve their payoff by changing their choice. But it might be clearer to say: neither player can improve their payoff by <i>unilaterally</i> changing their choice.</p>
<p>What do I mean by &#8216;unilaterally&#8217; changing their choice?  I mean that one player changes their choice while the other player does not change <i>their</i> choice. </p>
<p>But if <i>both</i> players change their choices <i>simultaneously</i>, sometimes they can improve both their payoffs!  Lets see an example of that:</p>
<div align="center">
<table border="0">
<tr>
<td></td>
<td align="center"><font color="red"><b>1</b></font></td>
<td align="center"><font color="red"><b>2</b></font></td>
</tr>
<tr>
<td><b>1 &nbsp;&nbsp;</b></td>
<td align="center">(10,<font color="red">10</font>)&nbsp;&nbsp;</td>
<td align="center">(9,<font color="red">-1</font>)</td>
</tr>
<tr>
<td><b>2</b></td>
<td align="center">(-1,<font color="red">8</font>)</td>
<td align="center">(20,<font color="red">20</font>)</td>
</tr>
</table>
</div>
<p>Now it looks like both players will be happiest if they pick pure strategy 2.  And it&#8217;s true!  Moreover, this is a Nash equilibrium.   Check and see.</p>
<p>But what if both players pick choice 1?  This is <i>also</i> a Nash equilibrium!  Shocking but true.  If they both use pure strategy 1, neither player can improve their payoff by unilaterally changing their choice.  If player A changes <i>her</i> choice, her payoff drops to -1.  And if player B changes <i>his</i> choice, his payoff drops to -1.  </p>
<p>Of course, they can improve their payoff if they both <i>simultaneously</i> change their choice to 2. But that&#8217;s not what the concept of Nash equilibrium is about.  </p>
<p>This raises the question of whether Nash equilibrium is a good definition of &#8216;the best&#8217; choice for each player.  The big problem is figuring out what &#8216;best&#8217; means&#8212;we&#8217;ll have to talk about that more.   But we&#8217;re also seeing some problems with the word &#8216;the&#8217;.  There may be <i>more than one</i> Nash equilibrium, so we can&#8217;t always talk about &#8216;the&#8217; Nash equilibrium.</p>
<p>In other words, our example shows there isn&#8217;t always a <i>unique</i> Nash equilibrium.  </p>
<p>Furthermore, a Nash equilibrium doesn&#8217;t always <i>exist!</i> Check out the game of rock-paper-scissors:</p>
<div align="center">
<table border="0">
<tr>
<td></td>
<td align="center"><font color="red"><b>rock</b></font></td>
<td align="center"><font color="red"><b>paper</b></font></td>
<td align="center"><font color="red"><b>scissors</b></font></td>
</tr>
<tr>
<td><b>rock &nbsp;&nbsp;</b></td>
<td align="center">(0,<font color="red">0</font>)&nbsp;&nbsp;</td>
<td align="center">(-1,<font color="red">1</font>)&nbsp;&nbsp;</td>
<td align="center">(1,<font color="red">-1</font>)&nbsp;&nbsp;</td>
</tr>
<tr>
<td><b>paper &nbsp; &nbsp;</b></td>
<td align="center">(1,<font color="red">-1</font>)&nbsp;&nbsp;</td>
<td align="center">(0,<font color="red">0</font>)&nbsp;&nbsp;</td>
<td align="center">(-1,<font color="red">1</font>)&nbsp;&nbsp;</td>
</tr>
<tr>
<td><b>scissors &nbsp; &nbsp;</b></td>
<td align="center">(-1,<font color="red">1</font>)&nbsp;&nbsp;</td>
<td align="center">(1,<font color="red">-1</font>)&nbsp;&nbsp;</td>
<td align="center">(0,<font color="red">0</font>)&nbsp;&nbsp;</td>
</tr>
</table>
</div>
<p>It&#8217;s easy to see that there&#8217;s no Nash equilibrium.  No matter what both players choose, at least one of them can always improve their payoff by switching to a different choice.  If one of them wins the game, the loser can improve their payoff by switching to a different choice.  If it&#8217;s a tie, either player can improve their payoff by switching to a different choice.</p>
<p>So: Nash equilibria are interesting, but they don&#8217;t always exist&#8212; at least not when we consider only pure strategies, as we&#8217;ve been doing. And even when they do, they&#8217;re not always unique!  This is a bit frustrating.  We&#8217;d like game theory to tell us how to play games well.  </p>
<p>We can improve the situation by allowing <b>mixed strategies</b>, where a player picks different choices with different probabilities.  If we do this, there is always at least one Nash equilibrium!  This result was proved by&#8212;you guessed it!&#8212;<a href="http://en.wikipedia.org/wiki/John_Forbes_Nash,_Jr.">John Nash</a>.  He did it in 1950, in this astoundingly short paper:</p>
<p>&bull; John F. Nash, Jr., <a href="http://www.pnas.org/content/36/1/48.full">Equilibrium points in n-person games</a>, <i>Proceedings of the National Academy of Sciences</i> <b>36</b> (1950), 48–9.</p>
<p>He eventually won the Nobel prize in economics for this work.  </p>
<p>In fact, Nash was not the first to think about Nash equilibria; this idea goes back to the French economist Antoine Cournot, who wrote about it way back in 1838!  However, Nash was the first to consider Nash equilibria for mixed strategies for general simultaneous multi-player games, and prove they always exist.  (As we&#8217;ll see later, von Neumann and Morgenstern had already done this for the zero-sum 2-player games.)</p>
<h3> John Nash </h3>
<p>If you haven&#8217;t seen the movie about Nash called <a href="http://en.wikipedia.org/wiki/A_Beautiful_Mind_%28film%29"><i>A Beautiful Mind</i></a>, you should!   Here&#8217;s the scene where Nash figures out something about multiplayer games:</p>
<div align="center"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='560' height='315' src='https://www.youtube.com/embed/2d_dtTZQyUM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></div>
<p>It&#8217;s not very clear, mathematically speaking&#8230; but oh well.  It&#8217;s a good movie and it gives you some sense of how Nash battled with mental illness for much of his life.  He has now largely recovered and spends his time at Princeton University.</p>
<p>Here&#8217;s the young Nash&#8212;click for more details:</p>
<div align="center"><a href="http://www-history.mcs.st-andrews.ac.uk/Biographies/Nash.html"><br />
<img src="https://i1.wp.com/math.ucr.edu/home/baez/mathematical/john_nash.jpg" /></a></div>
<h3> A &#8216;practical&#8217; question </h3>
<p>A student in my class asked what&#8217;s the best book or website on how to play blackjack well.  I asked this on Google+ and got over 50 replies, which you can read <a href="https://plus.google.com/u/0/117663015413546257905/posts/KbJVTPooDDj">here</a>.  If you know more, please tell me!</p>
<div align="center"><a href="http://en.wikipedia.org/wiki/Blackjack"><img width="400" src="https://i2.wp.com/math.ucr.edu/home/baez/mathematical/blackjack_cards.jpg" /></a></div>
]]></html><thumbnail_url><![CDATA[https://i1.wp.com/math.ucr.edu/home/baez/mathematical/john_nash.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[326]]></thumbnail_height><thumbnail_width><![CDATA[271]]></thumbnail_width></oembed>