Nordstrom, Introduction to Game Theory ยง3.1 ยท nordstrommath.com ยท CC BY-SA 4.0
Play the same game many times. If an equilibrium exists, play it every round (pure strategy). If not, mix: assign probabilities to your strategies so your opponent cannot exploit any pattern.
Pure strategy in repeated play
When a game has an equilibrium point, the optimal repeated strategy is simple: play the equilibrium every single round. There is no reason to vary. The equilibrium is already the best response to the opponent's best response.
Scheme
; Game with equilibrium: play it every round; Matrix: [[-1 1]; [ 0 2]]; Equilibrium at (1,0) with value 0
(define game-with-eq '((-11) (02)))
; Pure strategy: always play equilibrium
(define (pure-repeated game strategy rounds)
(let loop ((t 1) (total 0))
(if (> t rounds) total
(let* ((r (car strategy))
(c (cadr strategy))
(payoff (list-ref (list-ref game r) c)))
(loop (+ t 1) (+ total payoff))))))
(define total (pure-repeated game-with-eq '(10) 10))
(display "10 rounds of pure (R2,C1): total = ") (display total) (newline)
(display "Average per round: ") (display (/ total 10))
Mixed strategy: when there is no equilibrium
Without an equilibrium, playing the same strategy every round is exploitable. Instead, randomize. A mixed strategy assigns a probability to each pure strategy. Over many rounds, the expected payoff converges to a predictable value, even though individual outcomes are random. This cycle of perceiving outcomes, updating beliefs, and adjusting strategy is the same feedback loop that appears in the natural framework for information processing.
Scheme
; No equilibrium: must mix; Matrix: [[1 0]; [-1 2]]; No saddle point (maximin=-1, minimax=1)
(define no-eq-game '((10) (-12)))
; Simulate mixed strategy with pseudo-random choices; P1 plays R1 with probability p, R2 with (1-p); Use a simple LCG for deterministic "randomness"
(define seed 42)
(define (next-rand)
(set! seed (modulo (+ (* 1103515245 seed) 12345) 2147483648))
(/ (modulo seed 1000) 1000))
(define (mixed-play game p1-prob p2-prob rounds)
(let loop ((t 0) (total 0))
(if (>= t rounds) (/ total rounds)
(let* ((r1 (next-rand))
(r2 (next-rand))
(row (if (< r1 p1-prob) 01))
(col (if (< r2 p2-prob) 01))
(payoff (list-ref (list-ref game row) col)))
(loop (+ t 1) (+ total payoff))))))
; P1 mixes 60/40, P2 mixes 50/50
(display "Avg payoff (100 rounds): ")
(display (mixed-play no-eq-game 0.60.5100)) (newline)
(display "Avg payoff (1000 rounds): ")
(display (mixed-play no-eq-game 0.60.51000))
Python
# Simulating mixed strategies in repeated playimport random
random.seed(42)
game = [[1, 0], [-1, 2]]
def mixed_play(game, p1_prob, p2_prob, rounds):
total = 0for _ inrange(rounds):
row = 0if random.random() < p1_prob else1
col = 0if random.random() < p2_prob else1
total += game[row][col]
return total / rounds
print(f"Avg (100 rounds): {mixed_play(game, 0.6, 0.5, 100):.3f}")
print(f"Avg (1000 rounds): {mixed_play(game, 0.6, 0.5, 1000):.3f}")
Rock-Paper-Scissors: the classic mixed game
RPS has no pure equilibrium. Any fixed strategy is exploitable. The optimal mixed strategy is uniform: play each option with probability 1/3. This makes your opponent indifferent, so they cannot gain an edge no matter what they do.
Scheme
; Rock-Paper-Scissors: optimal mix is uniform (1/3 each); Payoff matrix (row player):; Rock Paper Scissors; Rock 0 -1 1; Paper 1 0 -1; Scissors -1 1 0
(define rps '((0-11) (10-1) (-110)))
; Expected payoff of uniform vs uniform
(define (ev-uniform game n)
(let ((size (length game)))
(/ (apply +
(map (lambda (row)
(apply + row))
game))
(* size size))))
(display "Uniform vs uniform EV: ")
(display (ev-uniform rps 3)) (newline)
; 0 โ perfectly fair when both play optimally; But if P2 favors Rock (0.5, 0.25, 0.25):
(define (ev-vs-biased game p1-probs p2-probs)
(apply +
(let rloop ((rows game) (rps p1-probs) (acc '()))
(if (null? rows) acc
(rloop (cdr rows) (cdr rps)
(append acc
(map (lambda (cell cp) (* (car rps) cp cell))
(car rows) p2-probs)))))))
(display "Uniform vs biased-Rock: ")
(display (ev-vs-biased rps '(0.3330.3340.333) '(0.50.250.25)))
; Slightly positive โ exploiting the bias