Skip to main content My Awesome Blog

Mind-Reading Machine

Published: 2026-01-24
Updated: 2026-01-24

This is the game of matching pennies.

In matching pennies, one player is Even and the other is Odd. Both players simultaneously choose either heads or tails for their pennies. If both players chose the same, then the Even player wins. Otherwise, the Odd player wins.

This program is based on the Mind-Reading Machine created by Claude Shannon in 1953. It might win so often that it seems like it's cheating. In fact, the program does not use information about your current choice to determine its choice. Instead, it predicts your choice using a Markov Chain simulation.

In this round, the computer is Even.

Click H for heads or T for tails.

You're 0-0 against the computer.