Lottery Game is an interactive illustration designed to demonstrate the extremely low probability of winning a lottery jackpot.
The player is presented with an N × N grid of pixels, with exactly one winning pixel hidden among them. To win the jackpot, the player must click the correct pixel.
After each attempt:
- The player selects one pixel from the grid.
- If it is the winning pixel, the player wins the jackpot.
- If it is not, the player must wait
sseconds before trying again (default: 5 seconds). - The grid is randomly reshuffled after every attempt, meaning the location of the winning pixel changes.
- The player can then make another attempt.
For an N × N grid, the probability of winning on any single attempt is:
P(win) = 1 / N²
For example:
| Grid Size | Number of Pixels | Probability per Attempt |
|---|---|---|
| 100 × 100 | 10,000 | 1 in 10,000 |
| 1,000 × 1,000 | 1,000,000 | 1 in 1,000,000 |
| 10,000 × 10,000 | 100,000,000 | 1 in 100,000,000 |
The purpose of the game is to make extremely small lottery probabilities tangible.
Instead of simply displaying odds such as "1 in 10,000,000", the game allows the player to experience what those odds actually mean through repeated attempts, waiting, and reshuffling.
The game can also display statistics such as:
- Attempts made
- Elapsed time
- Probability of having won after
kattempts - Expected number of attempts before winning
- Expected waiting time before winning
The goal is to provide an intuitive illustration of just how unlikely a lottery jackpot really is.