Skip to main content

Countdown Numbers Game Solver

The Countdown numbers game is a mathematical challenge where players use a set of 6 numbers and basic arithmetic operations (addition, subtraction, multiplication, and division) to reach a target number within a time limit, and with the following rules:

  • Each number can only be used once.
  • Players are not required to use all six numbers.
  • Division must result in whole numbers, no fractions.
  • No negative numbers.

Below is an extraordinary example of a game from the british TV show Countdown.

In this project, I implement a solver for the Countdown numbers game in Haskell.

Starting with a naïve brute-force solution that can take 23+ seconds to complete, I optimize the solution to produce a solver that can complete in under 0.5 seconds.

2026