Experiment 04 Mixed Strategies
Can You Be Unpredictable?
Play rock-paper-scissors against a pattern-seeking opponent. Then let probability choose your moves.
Loading the interactive experiment…
Start with “Work It Out, Step by Step” below. The optional expert section explains its symbols as you go. For more examples, use the plain-language math guide.
1. Make a Prediction
Can You Outsmart a Pattern Spotter?
You know the rules: rock beats scissors, scissors beat paper, and paper beats rock. A win earns +1, a loss −1, and a draw 0. The opponent earns the opposite score.
The opponent only studies your previous moves. Its next move is fixed before you click. Try a favorite move, then a repeating cycle, and see what it learns.
2. Make a Consequential Choice
Make Your Next Move
The combined score is always zero. This is a contest over relative advantage; there is no extra shared value to create under these rules.
3. Reveal the Incentives
Being Balanced Is Different From Being Unpredictable
A repeating rock–paper–scissors cycle uses each move equally often, but someone who spots the pattern knows what comes next. A mixed strategy chooses randomly each round. Giving each move the same chance on every new draw prevents the opponent from gaining an advantage by guessing your next move.
Work It Out, Step by Step
Example using the default weights: rock 6, paper 2, scissors 2. The examples below stay the same when you change the controls. A “weight” is just a number of chances.
- Add the chances. \(6 + 2 + 2 = 10\). Imagine ten tickets in a bag: six say rock, two say paper, and two say scissors.
- Turn each count into a share. Rock has 6 out of 10 chances: \(6/10 = 0.6 = 60\%\). Paper and scissors each have \(2/10 = 0.2 = 20\%\). Percent means “out of 100,” so 60% is 60 chances out of 100.
- Put the ticket back before the next draw. Mix the bag again each time. Every round starts with the same chances. This does not promise exactly six rocks in ten rounds, and it does not tell anyone what the next move will be.
| Your move | Opponent: rock | Opponent: paper | Opponent: scissors |
|---|---|---|---|
| Rock | 0 | −1 | +1 |
| Paper | +1 | 0 | −1 |
| Scissors | −1 | +1 | 0 |
Now suppose the opponent always plays paper. Each rock ticket loses 1 point, each paper ticket earns 0, and each scissors ticket wins 1. Add the scores for all ten equally likely tickets, then divide by ten:
The negative sign means a loss. The expected average is −0.4 points per round: the average the chances predict over many rounds. You still earn only −1, 0, or +1 in a single round. An actual set of rounds can finish above or below that average.
What if the bag holds one ticket for each move? Against paper, one ticket loses, one draws, and one wins. The average is \((-1 + 0 + 1)/3 = 0\). The same works against rock or scissors. This is why fresh draws with equal chances protect your average score, even though you can still lose a short match.
For experts: formal model and assumptions
How to Read the Symbols
The notation below compresses the ticket-bag example into a few lines. You can read the plain-language translations without learning how to calculate with matrices. The math reading guide provides more examples.
- A matrix is a table
- \(A\) names the table of points. The large parentheses around its nine numbers make it a matrix: a rectangular table. Read it in the same order as the table above: rock, paper, scissors down the rows and across the columns. Read about matrices and vectors.
- A vector is a list
- \(x\) names your list of three chances, and \(y\) names the opponent’s list. Your chances are \(r\) for rock, \(p\) for paper, and \(s\) for scissors. The commas in \((r,p,s)\) separate those entries. Each chance is at least zero, and all three add to 1, meaning 100%.
- The raised T changes a list’s direction
- \(T\) here means “transpose,” or turn a row into a column or a column into a row. It is not a power. \(x=(r,p,s)^T\) writes your three chances as a column; \(x^T\) turns that column into a row for the calculation. Read about raised labels.
- The product x-transpose A y
- \(x^TAy\), read “x transpose A y,” is a compact instruction: for each table cell, multiply your move’s chance by the opponent move’s chance and by the cell’s points; then add all nine results. It gives your expected points, the average those chances predict over many rounds. Read about expected values.
- Min and max
- \(\min\) means “smallest value,” and \(\max\) means “largest value.” \(\min_y\) says to check every allowed opponent mixture and take the lowest expected score for you. \(\max_x\) says to choose your own mixture to make that worst-case score as high as possible. The small \(x\) or \(y\) tells you whose mixture may change. Braces hold the values to compare: \(\min\{3,5\}=3\) says the smaller of 3 and 5 is 3. Read about minimums and maximums.
Payoffs and the Best Worst-Case Average
This is a simultaneous, two-player, zero-sum game. Rows are the player’s moves and columns the opponent’s moves, both ordered rock, paper, scissors. The player’s payoff matrix is \(A\); the opponent receives its negative:
Let \(x=(r,p,s)^T\) be the player’s fixed mixture and \(y\) the opponent’s mixture. All components are nonnegative and each mixture sums to 1. Expected player payoff is \(x^TAy\). Against pure rock, paper, and scissors respectively, the player’s expectations are \(p-s\), \(s-r\), and \(r-p\).
For example, against an opponent who always plays rock, paper wins 1 and scissors loses 1. Your expected score is therefore \(p-s\): the chance of paper minus the chance of scissors. Your own rock earns 0, so it adds nothing. Here “pure” means choosing one move for sure; “nonnegative” means zero or greater.
Read it aloud: “For your chosen mixture, the lowest average an opponent can force is the smallest of these three scores. Your best possible protection against that lowest average is zero.” For the starting chances 0.6, 0.2, and 0.2, the three scores are 0, −0.4, and 0.4. The minimum is −0.4. Giving each move a chance of \(1/3\), meaning one out of three, makes all three scores zero.
The minimum over all opponent mixtures equals the minimum over pure moves because payoff is linear in \(y\). Choosing \(x=(1/3,1/3,1/3)^T\) makes all three pure-response values zero. No mixture can guarantee a higher expectation: the opponent’s equal mixture makes every player move worth zero. This is the minimax guarantee for these payoffs; different payoffs can require unequal mixtures. For the default weights, \(x=(0.6,0.2,0.2)^T\), the worst-case expectation is −0.4 per round.
With ideal fresh uniform draws independent of the opponent’s current move, the conditional expected score is zero each round, even against an opponent that adapts to past play. This is an expectation, not a guarantee about the realized score of a finite sample. Equal overall move counts alone do not provide the guarantee: a deterministic cycle can be predicted.
The pattern spotter examines at most 12 previous moves. If it has observed at least two past moves following your latest move, it predicts the most common such follower. Otherwise it predicts your most common recent move. It breaks ties with the seeded random generator, then plays the move that beats its prediction. Before any history exists, it predicts uniformly.
This is a simple heuristic, not an optimal learner. It has no access to the button you are about to press, the mixture settings, or the current player draw. In a comparison, player sampling and opponent tie breaking use separate pseudorandom streams. The seed makes runs reproducible; it is not a source of secret randomness. Sampled comparison scores concern this specific learner, while the worst-case formula concerns an opponent that knows and best responds to the fixed mixture.
Concept reference: Cornell’s A Course in Networks and Markets, Section 1.7 on mixed-strategy Nash equilibrium. The pattern spotter is the specific learning rule described above.
4. Change One Assumption
Let a Random Mixture Play for You
Weights set the chances of each move, like numbers of tickets in a bag. Weights of 6, 2, and 2 mean rock has 6 chances out of 10, while paper and scissors each have 2. Each round uses a fresh draw. Compare your mixture with one that gives each move an equal chance. Each plays a separate copy of the same pattern spotter, starting with no history.
| Mixture | Wins | Draws | Losses | Your score | Opponent score | Score per round |
|---|
Either mixture can do better in a particular run by chance. Fresh draws with equal chances give an expected average of zero against an opponent that cannot see the current draw. That does not promise a winning session. Changing a setting restarts manual play. Share links preserve settings, not move history.
5. Transfer the Lesson
Should a Patrol Split Its Time Equally?
A security team must choose between guarding two entrances. One entrance gives an intruder access to far more valuable equipment. Should the team patrol each entrance half the time because randomness worked here?
Compare your reasoning
Randomness can make a patrol harder to exploit, but the useful mixture depends on losses, detection chances, and the intruder’s alternatives. The equal mixture here follows from the symmetry of rock–paper–scissors. Change the payoffs and you must solve the new game rather than copy its probabilities.
A Model Is a Place to Start
These small models make the incentives visible. Their results follow from their stated rules; they are not forecasts of how every person or organization behaves. A simulated strategy is a rule, not a personality.
Scenario links save the controls and random seed. To reproduce an interactive run, make the same choices in the same order. Changing a setting restarts the experiment.