Skip to content

About

Lottery game illustration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Lottery Game

Concept

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.

How It Works

After each attempt:

  1. The player selects one pixel from the grid.
  2. If it is the winning pixel, the player wins the jackpot.
  3. If it is not, the player must wait s seconds before trying again (default: 5 seconds).
  4. The grid is randomly reshuffled after every attempt, meaning the location of the winning pixel changes.
  5. The player can then make another attempt.

Probability

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

Purpose

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 k attempts
  • 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.

About

Lottery game illustration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors