# Game theory -- Nash equilibrium

1. Dec 1, 2014

Suppose we have a game, played in which Alice and Bob play mixed strategies:
(sorry for the dots, but I don't know how to put a table or tab spacing in this text box)
...........................................................................Bob
.............................................Dove, prob q...........................Hawk, prob (1-q)
.........Dove , prob p....................(2,3)...........................................(4,5)
Alice
..........Hawk, prob (1-p)...............(6,7)...........................................(8,9)

Where "prob" indicates the (unknown) probability that Alice or Bob will play that particular move, and a pair (a,b) means the payoff for Alice and Bob, respectively.

To figure out p and q for a Nash equilibrium, which one of the following reasoning procedures is correct:
Alice's payoff, if she plays Dove, is 2q + 4(1-q) = A
Alice's payoff, if she plays Hawk, is 6q + 8(1-q)= B
Bob's payoff, if he plays Dove, is 3p + 5(1-p) = C
Bob's payoff, if he plays Hawk, is 7p + 9(1-p)= D
For a Nash equilibrium, A=B & C=D, so we solve.....
................OR
The probabilities of each move are
.............................................................................Bob
....................................................Dove, prob q.....................Hawk, prob (1-q)
..........Dove , prob p...........................p*q...................................p*(1-q)
Alice
...........Hawk, prob (1-p)....................(1-p)*q...............................(1-p)*(1-q)
so that
Alice's payoff, if she plays Dove, is 2pq + 4p(1-q) = A
Alice's payoff, if she plays Hawk, is 6(1-p)q + 8(1-p)(1-q)= B
Bob's payoff, if he plays Dove, is 3pq + 5(1-p)q = C
Bob's payoff, if he plays Hawk, is 7p(1-q) + 9(1-p)(1-q)= D
For a Nash equilibrium, A=B & C=D, so we solve.....

Which method (or neither) is correct? Thanks for any indications.

2. Dec 3, 2014

### Staff: Mentor

You could use the [ code ] tags to raw a table:

Code (Text):

row 1    1,1       1,2       1,3

row 2    2,1       2,2      2,3

...

Your post looks like a homework problem. If so you need to use the homework template so we know what level of understanding you have.

3. Dec 3, 2014

Thanks, jedishrfu. First, it is not a homework problem. I am not taking a course. I have a strong mathematical background, but have never delved into game theory (or much discrete maths at all), and I am trying to widen my mathematical base. So feel free to use whatever mathematical explanation you wish, preferably more in the language of probability, since it seems to me the crux of the matter is conditional probability. However, I have zilch computer background, so in explaining computer stuff, use baby talk. (For instance, where do I get these code tags?) A note about the problem: I made up the numbers simply to not make the example too burdened with notation. (In fact, just checking, these numbers come out with "no solution" for the first method, and with a definite solution with method number two.) The numbers chosen are of absolutely no importance; choose your own. ("No Nash equilibrium" is also a result....) It is the method and the associated concepts that I am after. Not just the method: indeed, the first method is the one which I find in elementary texts on Game Theory, but the second method (made up by me) seems more logical. So unless all the texts are wrong, my logic is lousy here. So I could restate the question: why doesn't the second method work?

4. Dec 3, 2014

### Staff: Mentor

Code tags are easy to use as shown in the box below

Code (Text):

Code tags are easy to use:

[ code ]

some code or text goes here using a monospaced font.

[ /code ]

NOTE: Remember to remove the spaces I've added to the tags. If I used the real tags the nesting of tags would ruin the formatting of the post.

5. Dec 3, 2014

### Staff: Mentor

Okay, I think your probabilities are setup wrong in the table:

Code (Text):

|      bob dove       |         bob hawk
--------------------------------------------------------------------------
alice dove    |      p * q            |          (1-p) * q

alice hawk   |      p * (1-q)       |          (1-p) * (1-q)

See the example of Player A and B in the wiki article:

http://en.wikipedia.org/wiki/Nash_equilibrium

On second thought I'm not sure...

Last edited: Dec 3, 2014
6. Dec 3, 2014

### rikblok

I don't think the second method with a variable p makes sense. If you assume Alice plays Dove then p=1, and if she plays Hawk then p=0, so A & B just reduce to the same as the first method.

The advantage of keeping the variable p is you can ask, what is the payoff if Alice plays a mixed strategy: Dove with prob p and Hawk with prob 1-p? Then you get

$$P_{Alice}(p,q) = 2 pq + 4 p(1-q) + 6 (1-p)q + 8 (1-p)(1-q)$$

and think about how Alice can choose p to maximize her payoff.

7. Dec 10, 2014

thanks, everyone, for the replies.
rikblok: allow me to be a bit dense here, to see if I understand your point. Your expression reduces to 4-2p, so the maximal would be to have p=0 and q=1, which doesn't make sense for a mixed strategy, so therefore my method collapses. Is this what you are saying?

8. Dec 10, 2014

### rikblok

Hmm, I think it reduces to
$$P_{Alice}(p,q) = -4 p-2 q+8.$$

Now, Alice has no control over what Bob chooses so q is not something she can control. But she can choose p. So, what should she do?

9. Dec 11, 2014

rikblok, thanks for your patience. Oops:s, slip of the pen in simplifying. So, the answer to the question is that she would set p = 0, i.e., never play Dove. But that does not make sense for a mixed strategy.

10. Dec 11, 2014

### rikblok

You're right -- there is no mixed Nash equilibrium. But not every payoff matrix has one. In this case, there's only one Nash equilibrium and it's pure. Can you see where it is from the payoff table? Is it consistent with the solution p=0 you got?

11. Dec 11, 2014

thanks, rikblok. It is true that the numbers I picked for this example were poorly chosen, and that the pure strategy has a Nash equilibrium of Hawk, Hawk, consistent with the p=0 solution. But this seems to me to be saying that by taking the second method in the original post (which you have done when adding together the payoffs for Alice) you get a correct answer (p=0); but the original question was why the second method is incorrect.

12. Dec 12, 2014

### rikblok

Oh right, I forgot about the original question Let's write Alice's payoff in terms of your first $A$ & $B$ (both functions of $q$):
$$P_{Alice}(p,q)=p A(q) + (1−p) B(q)$$

If Alice wants to optimize her payoff, treating $q$ as a constant, she can take the derivative w.r.t. $p$ and set it to zero:

$$\frac{d}{dp} P_{Alice} = A(q) - B(q) = 0.$$

There's still a neat little trick involved :) but do you see how this connects to your original question?

Cheers,
Rik

13. Dec 13, 2014

Rik, that is fantastic!:w Finally, with the maximizing with the derivative, you have finally answered my question as to why the p disappears! Thank you so much. :D
By the way, what is that extra "neat little trick" that is involved?

14. Dec 13, 2014

### rikblok

Yeah, it's cool, eh? The "trick" or oddity is that $p$ disappears when Alice maximizes (as you pointed out). It's easy to see what that means if $A>B$ (choose $p=1$) or $A<B$ (choose $p=0$) but what if $A(q)=B(q)$? That means Bob has chosen $q$ to make Alice indifferent to her options -- Alice's payoff is the same, regardless of $p$. And vice versa for Bob's payoff.

The mixed Nash equilibrium (if it exists) occurs when both Alice and Bob are indifferent. It's weird (to me) because they don't choose the mixed Nash equilibrium to optimize their own payoffs. Rather, once they're at it, each has chosen a mixed strategy that makes the other player not want to switch to another strategy.

15. Dec 15, 2014