# OK to post homework # RDB, 2022-02-20, HW8 # 1. Done! # 2. (* Consider the game |[R, R] [S, T]| G = |[T, S] [P, P]|, where T(emptation) > R(eward) > P(unishment) > S(ucker). The (possibly mixed) Nash equilibria of a game is a selection of strategies (p1, p2) where p1 is a fixed point of the best-response function for player 1, and p2 is a fixed point of the best-response function for player 2. The expected payoff for player 1 given the probabilities p1 and p2 is sum(p1[i] p2[j] G[i, j][1], i, j) = p1[1]p2[1] R + (1 - p1[1]) p2[1] T + p1[1](1 - p2[1]) S + (1 - p1[1]) (1 - p2[1]) P. This is a linear function in p1[1] with slope (P + R - S - T) p2[1] + (S - P) = (R - T) p2[1] + (1 - p2[1])(S - P), which is negative for all p2[1]. Therefore, the best response function gives p1[1] = 0. By symmetry considerations, the best response for player 2 is always p2[1] = 0. So the only shared fixed point of the strategies is p1[1] = p2[1] = 0, i.e., both players fink. *) # 3. (* Take the argument from before, but now say that T > R > S > P. That is, swap the place of S and P. The expected payoff for player 1 is still a linear function in p1 with slope (R - T) p2 + (1 - p2) (S - P), but now that S - P > 0 we are in some trouble. This is not always negative. If the slope *is* negative, then we take p1 = 0 again. This requires p2 > (S - P) / ((T - R) + (S - P)). which is possible. But p1 = 0 means that the slope for player 2 will be be positive (it's the mirror of player 1's situation), so the best response for player 2 is p2 = 1. So (0, 1) is one equilibrium. Reversing the signs and words above shows that (1, 0) is another equilibrium. What's left is the case where the slopes are both 0, which gives p1 = p2 = (S - P) / ((T - R) + (S - P)). *) # We can also do this in Maple as follows. read "C7.txt": G := [[ [R, R], [S, T] ], [ [T, S], [P, P] ]]: # Prisoner's dilemma. MNE22(G) assuming T > R and R > P and P > S; # Snowdrift. MNE22(G) assuming T > R and R > P and S > P;