Books · The Fiddler: Solutions
Chapter 98
Can You Play ‘The Price Is Right’ Continuously?
Players and take turns at a wheel that returns a real number uniform on . goes first: spin once, or spin twice and add the two results, but a total above is an instant loss. Then does the same, knowing ’s result. Whoever ends with the higher total at or below wins. With both playing optimally, what is ’s probability of winning?
The Fiddler, Zach Wissner-Gross, April 26, 2024(original post)
Solution
Work backwards from . Suppose finishes with a valid total . If ’s first spin exceeds , stops and wins; otherwise must spin again and clear without busting, which happens with probability . So wins with probability , and wins with probability exactly (a bust by counts for ).
So should maximise the expected value of . After a first spin , stopping scores , while spinning again scores . Stopping wins once , that is past the root of . Therefore which evaluates to Going first is a real disadvantage: wins less than half the time.
The computation
Play the game under the optimal rules: stops if its first spin reaches , otherwise spins again; , knowing ’s total , stops if its first spin beats , otherwise spins again. The simulated win frequency for matches the closed form.
import numpy as np
from scipy.optimize import brentq
rng = np.random.default_rng(0)
c = brentq(lambda x: x**3 + 3*x**2 - 1, 0, 1) # optimal stop threshold ~0.532
N = 8_000_000
x, y = rng.random(N), rng.random(N)
tA = np.where(x >= c, x, np.where(x + y <= 1, x + y, 0.0)) # A stops at first spin >= c
u, v = rng.random(N), rng.random(N)
tB = np.where(u > tA, u, np.where(u + v <= 1, u + v, 0.0)) # B stops at first spin beating A
print((tA > tB).mean()) # ~0.4538
Extra Credit
Now three players , , spin in turn, each once or twice, highest valid total wins. What is ’s probability of winning?
Solution
The backward induction gains one layer. The last player , facing the current best total , stops on any first spin above and otherwise spins again, beating with probability , so overtakes a total with probability . Knowing this, the middle player , holding ’s total , values stopping at a first spin at (it beats but may overtake) and spinning again at ; comparing the two, ’s optimal cutoff rises to , with the two-player threshold. The first player , now exposed to two opponents, raises its own first-spin threshold to about . Sweeping that threshold and playing the game out gives and the order penalty deepens: first, middle, and last win roughly , , and . Spinning last, with full information and no one to follow, is worth the most. (A closed form is more than the puzzle needs; this is the numerical optimum.)
The computation
Encode all three players with their optimal rules ( stops above the best, at ) and sweep ’s first-spin threshold, taking the best.
import numpy as np
from scipy.optimize import brentq
rng = np.random.default_rng(0)
c = brentq(lambda x: x**3 + 3*x**2 - 1, 0, 1) # optimal stop threshold ~0.532
N = 4_000_000
def shares(tA_thr):
x, y = rng.random(N), rng.random(N)
tA = np.where(x >= tA_thr, x, np.where(x + y <= 1, x + y, 0.0))
u, v = rng.random(N), rng.random(N)
thrB = np.maximum(tA, c) # B's optimal cutoff
tB = np.where(u > thrB, u, np.where(u + v <= 1, u + v, 0.0))
best = np.maximum(tA, tB)
uc, vc = rng.random(N), rng.random(N)
tC = np.where(uc > best, uc, np.where(uc + vc <= 1, uc + vc, 0.0))
return [((p > q) & (p > r)).mean() for p, q, r in
[(tA, tB, tC), (tB, tA, tC), (tC, tA, tB)]]
best = max((shares(t)[0], t) for t in np.linspace(0.55, 0.75, 11))
print(round(best[0], 3), "at", round(best[1], 2)) # ~0.305 at 0.65