← Back to Blog

30 September 2026

Luck Barely Matters: The Maths of a Perfect Game of Memory Match

Memory Match feels like a game of luck with a bit of memory sprinkled on top. You turn over two cards, and whether they match seems to depend mostly on where the shuffle happened to put them. A good round feels fortunate. A bad round feels unfair.

The numbers say the opposite. Memory Match is a memory game with a very small amount of luck sprinkled on top, and it is possible to work out exactly how small.

The game has been around in some form for well over a century. In Britain it is often called Pelmanism, after the Pelman Institute, a London memory-training school of the early 1900s. American television turned it into a long-running quiz show called Concentration, and in 1959 the German publisher Ravensburger sold it as a boxed set of picture cards under the name Memory, which is the name that stuck. The rules have not changed: pairs face down, turn two over, keep them if they match, turn them back if they do not.

Start with the worst possible player — one with no memory at all, who picks two face-down cards at random every turn and forgets them immediately. How long does that player take?

There is a clean answer. With k pairs left on the table, the first card you turn has exactly one partner among the other 2k − 1 cards, so a random second card matches with probability 1 in 2k − 1, and on average it takes 2k − 1 attempts to clear that pair. Add those up from the last pair to the first and you get 1 + 3 + 5 + …, the sum of the first n odd numbers, which is exactly n squared. A memoryless player needs, on average, 36 moves for 6 pairs, 64 for 8 and 100 for 10.

Now the best possible player: one who remembers every card they have ever seen and plays sensibly. The sensible strategy is short. If you already know where both cards of a pair are, take them. Otherwise turn over a card you have never seen. If it matches one you remember, turn that one and collect the pair. If it does not, turn over another card you have never seen, and remember both.

The expected number of moves for that player was worked out by the mathematicians Daniel Velleman and Gregory Warrington in 2013, and it comes to about 1.61 moves per pair, less a small constant. We checked it against the game on this site by computing it exactly: 9.2 moves on average for Easy’s 6 pairs, 12.4 for Medium’s 8 and 15.6 for Hard’s 10.

Put the two players side by side on Hard. No memory: a hundred moves. Perfect memory: under sixteen. The gap between them is more than eighty moves, and every one of those moves is memory. Luck is what is left over.

And there is not much left over. We simulated three hundred thousand games of perfect play on each difficulty to see how widely the scores spread. On Hard, a perfect memory scores 15 or 16 in about 83 percent of games. It scores 14 or better only about 6 percent of the time, and 17 or worse about 11 percent of the time. On Medium, 12 or 13 covers 87 percent of games. On Easy, 9 alone covers well over half. The best and worst reasonable scores on each difficulty sit within about two moves of each other.

There is a hard ceiling as well. A player with perfect memory can never need more than 2n − 1 moves — 11 on Easy, 15 on Medium, 19 on Hard — because every move either collects a pair or turns over two cards that have never been seen before, and you run out of unseen cards before you run out of pairs. So if your score on Hard is 25, the shuffle did not cost you nine moves. At least six of them were forgotten cards, and probably more.

The opposite tail is just as thin. To clear the board without a single miss, every pair you turn has to match on first sight, and on Hard the chance of that is one in about 650 million. Even on Easy it is roughly one in ten thousand. When you see a leaderboard score at or close to the number of pairs, that player either remembered very well or had a genuinely remarkable run — and you can tell which by whether it happens twice.

This makes Memory Match unusually honest as a test. Your score, minus the perfect-memory average for that difficulty, is very nearly a direct measure of how many cards you lost track of. On Hard, a 20 means about four forgotten cards. A 30 means about fourteen. Improving at the game means making that number smaller, and there is almost nothing else to improve.

The strategy above also contains two rules that players often get wrong, and both came out of the calculation. First, when you do not already know a pair, always turn an unseen card first rather than one you remember. An unseen card might match any card you already know, so it gives you a chance of a pair this move. A remembered card can only match its own partner, wherever that is.

Second, when the first card is new and has no partner you know of, turn another unseen card, not a remembered one. It can feel safer to turn a card you know is a miss, on the theory that you will not muddle your memory with more information. It is never better in a solo game. We checked every position on all three difficulties, and deliberately turning a known card never lowered the expected score. The new card costs nothing to see and is information you will need eventually. (In the two-player version this changes, because anything you reveal is revealed to your opponent too, and mathematicians have shown that holding back information is sometimes the stronger move there.)

The real skill, then, is simply holding on to what you have seen, and a few habits help. Say the word on the card quietly to yourself when you turn it; the version on this site uses words rather than pictures, so each card already comes with a name. Anchor positions to the grid rather than to each other: “Bulan, top row, second from the left” survives better than “Bulan, near the one that was Kucing.” And check your memory against the board before every move, not only when you think you have a match. Mismatched cards stay up for less than a second before they flip back, which is shorter than it feels.

A couple of details of the game itself are worth knowing when you chase a score. Every game draws its words at random from a pool of twenty — six on Easy, eight on Medium and ten on Hard — so the set changes between rounds, and the cards appear in English or Malay depending on which version of the site you are playing. Both cards in a pair show the same word. Your score is the number of moves, where each pair of cards you turn over counts as one; the timer is there for interest, but it is not what the leaderboard ranks. Lower is better, and the best score is kept separately for each difficulty.

Try it with the numbers in mind at cerdikcerdik.com/games/memory-match, and see how close you can get to sixteen on Hard. If you like knowing what your memory can do in more than one form, we looked at the same question for strings of digits at cerdikcerdik.com/blog/number-memory-digit-span and for sequences of colours at cerdikcerdik.com/blog/simon-says-hebb-repetition.

Continue learning →