This Rock, Paper, Scissors bot uses an advanced meta-strategy system inspired by legendary bots like Iocaine Powder (Dan Egnor) andGreenberg (Andrzej Nagorko). It exploits human psychological patterns and adapts in real-time to beat human players.
The most famous meta-strategy for computer Rock Paper Scissors is Iocaine Powder, named after the iconic scene in The Princess Bride, with its endless battle of wits. The basic insight is that any successful prediction (P) for your opponent's strategy can run at multiple meta-levels, creating shadow predictors that think at different depths.
This video explains how Iocaine Powder introduced the concept of meta-level thinking, where each predictor can operate at multiple levels (P.0, P.1, P.2, P'.0, P'.1, P'.2) to counter opponents who try to outthink the strategy.
The bot uses a technique called Meta-Strategy where every predictor has multiple "shadow" predictors that think at different levels. Based on the legendary Iocaine Powder algorithm, each predictive algorithm P expands into six possible strategies:
Assume the opponent is vulnerable to prediction by P; then predict the opponent's next move, and play accordingly to win. If P predicts your opponent will play Rock, play Paper to cover Rock. This is the obvious application of P.
Assume the opponent thinks you will use P.0. If P predicts Rock, P.0 would play Paper to cover Rock, but the opponent could anticipate this move and play Scissors to cut Paper. Instead, you play Rock to dull Scissors.
Assume the opponent thinks you will use P.1. Your opponent thinks you will play Rock to dull the Scissors they would have played to cut the Paper you would have played to cover the Rock P would have predicted, so they will play Paper to cover your Rock. But you are one-up to them, and play Scissors to cut their Paper.
This strategy assumes the opponent uses P themselves against you. We modify P to exchange the position of you and your opponent. If P' predicts that you will play Rock, you would expect your opponent to play Paper, but instead you play Scissors to cut their Paper.
As with P.1 and P.2, these represent "rotations" of the basic P'.0 idea, designed to counteract your opponent's second-guessing. These variations add additional layers of meta-thinking to handle opponents who try to outthink the P'.0 strategy.
This multi-layered approach allows the bot to adapt to players who try to outthink it, automatically detecting and countering their level of strategic thinking. The bot tracks the performance of all six variations (P.0, P.1, P.2, P'.0, P'.1, P'.2) for each strategy and selects the best-performing combination in real-time.
The bot employs multiple strategies that target human psychological weaknesses:
Humans often feel that if they haven't played a move in a while, it's "due." The bot tracks move frequencies and predicts the least common move, exploiting this cognitive bias.
Humans fall into rhythmic loops like Rock → Paper → Scissors → Rock. The bot searches for repeating sequences in the move history and predicts based on what followed similar patterns in the past.
This is the #1 psychological weakness in casual players:
The bot exploits this by predicting repeat moves after wins and switches after losses.
If a human plays the same move twice (e.g., Rock, Rock), they are highly unlikely to play it a third time (they feel it's "too predictable"). The bot detects this pattern and adjusts accordingly.
Inexperienced players overwhelmingly start with Rock (perceived as "strong"). The bot always starts the first round with Paper to exploit this tendency.
The bot uses a virtual scoring system:
This allows the bot to automatically discover which strategy works best against each individual player and adapt in real-time.
Humans are terrible at being random. We fall into predictable patterns, cognitive biases, and psychological tells. This bot exploits:
By combining multiple strategies with meta-level thinking, the bot can adapt to almost any human playing style and maintain a significant advantage.
Egnor, Dan. "Iocaine Powder: A Meta-Strategy Algorithm."International RoShamBo Programming Competition, 1999.
https://journals.sagepub.com/doi/abs/10.3233/ICG-2000-23105Linch. "Rock Paper Scissors is Not Solved, In Practice."The Inchpin, Nov 29, 2025.
https://inchpin.substack.com/p/rock-paper-scissors-is-not-solvedMade by Daniel Herman