GHOST HUNT

A quantum search game · Flip, then reflect around the average · Grades 6–8

The hotel

Night 1

rounds0
chance to catch12.5%
squares add to128

The sweet spot

Each dot is the chance to catch a ghost if you look after that many rounds. The ring marks where you are now.

best rounds–
chance to catch–
normal search looks–

Spot the pattern

Each time the hotel gets 4 times bigger, the quantum search needs only about 2 times as many rounds. A normal search needs 4 times as many looks.

How to play

Solo quick play. Play a six-night duel against the computer. On your hunts, choosing a round count runs those rounds together; then LOOK. On your hiding nights, pick rooms and lock them in. The tracker keeps the arithmetic available. Turn off “Resolve chosen rounds together” or enable math practice to take every step yourself. New duel keeps your settings.

The idea. A ghost hides in one of 8 rooms, numbered in binary from 000 to 111. A quantum computer spreads a search wave over every room (4 in each room). It cannot look at the wave, but it can change it.

One round = flip, then reflect. 1. FLIP: the ghost room's wave changes sign (only the hider knows which room). 2. AVERAGE: add all 8 rooms and divide by 8. 3. REFLECT: every room's new wave = 2 × average − old wave. 4. CHECK: the squares of all 8 waves still add up to 128.

Two numbers are enough. Every empty room always has the same wave, so you only track G (each ghost room) and E (each empty room). With M ghosts: average = (M × (−G) + (8 − M) × E) ÷ 8, new G = 2 × average + G, new E = 2 × average − E.

Look. Flip 7 coins and read them as a binary number from 0 to 127. If it is less than M × G², you caught a ghost.

Ghost Duel. The hider secretly picks 1, 2 or 3 ghost rooms. The hunter then picks 0 to 3 rounds without knowing how many ghosts there are. The game reveals the number of ghosts (not where they are), runs the rounds, and the hunter looks. Swap roles each night; 6 nights.

Why it works

This is Grover's quantum search algorithm (1996). The flip is the "oracle", which marks the answer. Reflecting around the average is the "diffusion" step. Each round moves a little more of the wave into the ghost room, but too many rounds push it back out again. With 1,000,000 rooms and one ghost, the first peak is at 785 rounds; with 1,048,576 rooms (2²⁰), it is at 804 rounds. A normal search needs about half the rooms on average. A real quantum computer does the flip and reflect with gates on qubits; here you do the same arithmetic by hand.

For teachers
In the gameMath or computer-science idea
Flip: the ghost room's wave becomes its oppositeThe opposite of the opposite is the number itself (CCSS 6.NS.C.6.a)
Average of the 8 roomsThe mean (CCSS 6.SP.B.5.c)
Reflect: 2 × average − oldDistance on the number line and rational-number arithmetic (CCSS 7.NS.A.1.b, 7.NS.A.3)
Squares add up to 128Whole-number exponents (6.EE.A.1); a checksum for catching mistakes
Chance = M × G² ÷ 128; coin lookProbability models (7.SP.C.7)
Rooms 000–111, 7-coin binary numberBinary numbers and data encoding (CSTA 2-DA-07)
Repeat "flip, reflect" and stop at the right time; the 128 check as a testLoops and testing (CSTA 2017: 2-AP-12, 2-AP-17)
Best rounds ≈ 0.785 × √roomsSquare roots (CCSS 8.EE.A.2)

Faithfulness. The two-number rule is exactly Grover's algorithm: it matches the real circuit (Hadamard gates, oracle, diffusion) for every hiding place. The 7-coin look matches the exact chance to within 0.6%.

Background. Hadamard's Hoard (Institute for Quantum Computing, University of Waterloo) is an earlier quantum-search board game. In it a quantum player races a classical player along a track of preset chances. Ghost Hunt instead has students compute the waves themselves and adds the hidden number of ghosts.

Ghost Hunt · developed using QCaMP material · works offline in any browser.