Under the hood
How the AI reads you
No neural network theatrics, no peeking at your pick. Ten small models race to describe your habits, each one is asked how many moves ahead you are thinking, and only the answers that have actually been winning get to decide the hand.
Layer one: ten models of you
Each model answers the same question from a different angle: what will this player throw next? None of them answers with a single hand. They answer with three probabilities, so a weak hunch stays a weak hunch instead of being rounded up into a confident guess. Every model also forgets slowly, so when you change style mid-game it re-learns you rather than holding you to old habits.
Favourite hand
Counts your throws with recent ones weighted heaviest. If you have been leaning on Rock, that bias is the prediction.
Markov chain (order 1)
What do you usually throw after your last hand? Rock then Paper habits live here.
Markov chain (order 2)
Same idea, conditioned on your last two hands. Catches cycles like Rock, Paper, Scissors, repeat.
Markov chain (order 3)
Your last three hands. Longer loops hide here, and most people who "mix it up" are really running a loop.
Response to my hand
What you throw after a given AI hand, learned rather than assumed. This one quietly covers both counter-play and copying.
Response to the exchange
Keyed on the full pair: my hand against yours. "After my Paper beat your Rock, you go Scissors."
Reaction to the result
Win-stay and lose-shift, learned per hand instead of hard-coded. It also learns what you do after a draw, which most models ignore.
Reaction to a run
Two results in a row. Losing twice makes people play differently from losing once, and this is where tilt shows up.
Sequence matcher
Searches the whole game for the longest recent run of hands that has happened before, then plays what followed last time. It picks its own depth, so it catches patterns no fixed chain is shaped for.
The uniform anchor
A model that always says "one third each". It never wins, and that is the point: see the weighting section below.
Layer two: how many moves ahead are you?
Knowing what you will throw is only half the problem. Suppose a model is confident you will throw Rock. The obvious reply is Paper. But if you have worked out that the AI is going to counter your Rock, you will not throw Rock at all: you will throw Scissors to catch the Paper. And if the AI knows you know, it should throw Rock.
There is no way to settle that argument from first principles, so the AI does not try. Every model is expanded into three candidates, one for each level of second-guessing, and they compete on results. Ten models times three levels, minus the anchor which is the same play at every level, gives 28 candidates in the race at once. This is the structure Dan Egnor used in Iocaine Powder, which won the 1999 international rock paper scissors programming tournament, and it is the reason this AI cannot be beaten by simply inverting whatever the read panel tells you.
Layer three: paid by results
After every round each of the 28 candidates is scored, not on whether it guessed your hand, but on what its move would have earned: plus one for a win, zero for a draw, minus one for a loss. That distinction is the whole trick. The three levels of second-guessing share a prediction and differ only in what they do with it, so grading on accuracy alone could never tell them apart. Scores fade with each round, so a candidate that was hot twenty throws ago and cold since drops behind one that has read your last few.
The AI's actual hand is then drawn from a blend of all 28, weighted exponentially by score, so a candidate on a run dominates and the rest fade out. This is where the uniform anchor earns its place. It always scores exactly zero, because playing one third of each wins as often as it loses against anybody. So when nothing is working, when you are genuinely unpredictable or you have worked the AI out, every other candidate sinks below zero and the anchor wins the weight by default. The AI slides back to random play on its own. There is no panic button in the code: not being exploitable is a property of the weighting, which is what makes it trustworthy.
That is also what the "pattern lock" bar under the arena measures. It is not a confidence score the AI awards itself, it is how lopsided the blend has become. When it drops toward zero, you genuinely shook it off.
Measured, not claimed
Every number below comes from the simulation that ships with this site, 30 seeded runs of 500 rounds against each opponent. They are share of contested rounds, meaning draws are excluded, so 50% is the break-even point rather than 33%. Watch the last two rows: those are the ones that would expose a rigged or brittle AI.
| Opponent | AI wins |
|---|---|
| A player who always throws Rock | 99.9% |
| Rock, Paper, Scissors, repeat | 99.7% |
| A five-hand loop | 99.4% |
| Rock 80% of the time, otherwise random | 92.7% |
| Rock 60%, Paper 20%, Scissors 20% | 72.9% |
| Win-stay, lose-shift | 99.2% |
| Always counters the AI's last hand | 99.5% |
| Reads the "AI read" panel and inverts it | 92.7% |
| A second copy of this same AI | 50.1% |
| Perfectly random | 49.2% |
The two rows at the bottom are the honest ones. Against a perfectly random opponent the AI lands on a coin flip, because nothing else is possible. Against a copy of itself it lands there too.
Why it cannot beat true randomness
Rock paper scissors has a known optimal strategy: throw each hand with probability one third, independently, forever. Against that, every opponent, human or Markov chain or deep network, wins exactly a third of all rounds in the long run. No pattern exists, so no pattern can be exploited. This is the game's mixed-strategy Nash equilibrium.
The AI's entire edge is that humans do not play the equilibrium. A 2014 field experiment with 360 players found systematic win-stay, lose-shift behaviour instead of randomness. We also avoid repeating a hand three times in a row far more often than chance would, and we chase the hand that just beat us. Every one of those instincts is a leak, and the ensemble is built to drink from all of them.
So the honest advice for beating it: stop trying to outsmart it and start being boring. Trying to outsmart it is the pattern. Dice help.
See your own leaks
Play a dozen rounds and watch the read panel. It names the exact habit that gave you away, and how many moves ahead it thinks you are playing.
Play vs the AI →Technical FAQ
Does the AI see my move before choosing its own?
No. Each round the AI commits to its hand using only your past throws, before your current pick exists in its world. It wins by prediction, never by peeking. A perfectly random player holds it to about a third of all rounds, which is half of the rounds that are not draws, exactly as game theory demands.
What is the best strategy against a pattern-reading AI?
True randomness. If every throw is an independent one-in-three choice, no predictor can get an edge. In practice humans undershoot: we avoid repeating hands too often, rotate in cycles, and react to the last round. All of those are patterns, and all of them the AI exploits.
Do humans really play rock paper scissors in patterns?
Yes, and it is well studied. A large 2014 experiment at Zhejiang University found players follow "win-stay, lose-shift": they repeat winning hands and switch after losses in a predictable direction. Exploiting just that one habit already beats random play.
What is a Markov chain in this game?
A simple model of "what usually follows what". A first-order chain counts what you tend to throw after your last hand; a second-order chain conditions on your last two. If Rock then Paper keeps appearing in your history, the chain predicts Paper the next time you throw Rock.
Can I beat it by reading the "AI read" panel and doing the opposite?
That is exactly the attack the second-guessing layer exists to stop. An earlier version of this AI could be destroyed that way: in simulation it won only 0.4% of contested rounds against a player who inverted its stated read every turn. The current version wins about 93% against that same player, because inverting the read is itself a pattern, and a very clean one.
Does the AI remember me between visits?
Yes, on this device only. Your move history is kept in your browser's local storage so the AI does not start from zero every time you reload, and it is never sent to a server. "Reset the AI's memory" under the arena clears it completely.