Eight sequences, and every one of them loses to another
A game with a fair coin and no cards up anybody's sleeve.
You name a run of three flips — HTH, say. Then I name
mine. Then the coin is thrown over and over until one of the two runs shows
up in the flips, and whoever named it wins. There are only eight runs to choose
from and the coin is honest, so naming first ought to be worth something. It is
worth less than nothing. Whatever you name, I have an answer that beats
it — and the answer is not the same run every time, which is why nobody sees it
coming. Name HHH and I name THH and win seven times in eight.
Name the best you have and you still lose two times in three.
Name yours, and see what answers it
The eight runs, in order. Pick one and the page works out my reply, the
exact odds, and why. It opens on HHH because that is the one
almost everybody names first and the one that loses hardest — not because it
is the interesting case. The other seven are a click away and four of them
are better for you.
—
All fifty-six pairs
Every ordered pair of distinct runs, as the exact probability that the row appears before the column. Green is a row that wins, amber a row that loses, flat grey a pair that really is a coin toss — and there are — of those among the twenty-eight pairs, which is part of why the game looks fair from the inside. The column you named is lit, and the ring in it is my answer.
Read a row and you get the other surprise: no run beats more than four
of the other seven, and HHH and TTT beat none of them at
all — the best either can manage against any of the other seven is a tie.
A run that never wins is not a run you want to name first.
The eight answers, and what each is worth
One bar per opening. The bar is how often my reply beats it. Nothing here is close: the shortest bar is two thirds.
The reply is always the same shape. Take the run you named, drop its
last flip, and stick the opposite of its middle flip on the front.
HTH becomes HHT; TTT becomes HTT. That rule gives
the best reply for all eight, and this page checks that it does by comparing
it against the winner of the whole column.
There is no best run, and here is the loop
If some run beat all the others you would name it and the game would be over. None does, and four of them chase each other in a circle: each of these beats the next, and the last beats the first.
This is the shape of rock-paper-scissors, but nobody put it there. It falls
out of a fair coin and three flips. The reason is that these runs overlap
each other differently: after the coin has thrown TH, the
run THH is one flip from home and HHT is two, and it
is that head start, not any bias, that decides the whole thing.
Where the fraction comes from
The odds are not simulated on this page, they are solved. Conway's method
asks, for two runs, how much of each run's own tail is another run's head —
a run that overlaps itself, like HHH, keeps handing its opponent
a near-miss to build on. Score every overlap of length k as
2k−1, add them up, and the four scores give the odds
directly.
—
That is a closed form, and a closed form is exactly the kind of thing that can be subtly wrong and still look tidy. So the page does not trust it: it also builds the seven-state chain that tracks the last two flips, clears it over exact fractions, and requires all fifty-six answers to come out the same — and then, separately, plays the game.
So play it
Rounds of the real game against your run, with an honest coin, tallied
against the exact odds above. The coin is a seeded generator rather than
Math.random, so this is not a run I picked — reload it and
you get the same flips, and so does the test that checks this page.
—