### Mathematics Awareness Week 1996

Back to Computer Undercut || MAW 1996 || Previous MAWs/MAMs || Current MAM Home Page

## Computer Undercut: Game Strategy

### Computer Undercut: Game Strategy

```For students who know some algebra and some probability, here is one way to
arrive at what would be a "best strategy" using the idea of expected value.
Assume that you selected your number randomly with the following
probabilities.
number chosen                    probability
1                             a
2                             b
3                             c
4                             d
5                             e

Remember that since these are probabilities, a + b + c + d + e = 1.
Next you have to construct a payoff matrix, which gives the net payoffs for
each set of move. For example, if I select 1 and my opponent selects 1, my net
payoff equals my winnings minus his/her winnings which equals 1 - 1 = 0. If  I
selected 4 and my opponent selected 1 then my net payoff equals 4 - 1 = 3.
If I selected 5 and my oppponent selected 4, my net payoff would be -9. Here
is the payoff matrix:

my choice
1       2       3       4       5
1       0      -3       2       3       4
2       3       0      -5       2       3

opponent's choice
3       -2      5       0      -7       2
4       -3     -2       7       0      -9
5       -4     -3      -2       9       0

For this to be a fair game, my payoff should be 0. This means that

0a  -3b + 2c + 3d + 4e = 0
3a + 0b - 5c + 2d + 3e = 0
-2a + 5b + 0c - 7d + 2e = 0
-3a - 2b + 7c + 0d - 9e = 0
- 4a - 3b - 2c + 9d + 0e = 0

Remember that a + b + c + d + e + f = 1. This gives us 6 equations in 5 unknowns
which turns out to be solvable. (This is a great problem for students who are
just learning to solve systems of equations). It turns out that the original
system has an infinite number of solutions, but if you add the requirement
that
a + b + c + d + e + f = 1

a= 10/66
b= 26/66
c= 13/66
d= 16/66
e= 1/66

This says that if you were to play randomly and play

. 1 with probability 10/66
. 2 with probability 26/66
. 3 with probability 13/66
. 4 with probability 16/66
. 5 with probability 1/66

then in the long run you would break even. Since you are rational, this is the
strategy you would choose or so say the gurus of game theory. For more on this