# About

This solver was written by Graeme Cole and is released under the 3-Clause BSD Licence. The source code is available on GitHub.

It solves numbers puzzles according to the rules of the TV show Countdown. It is not affiliated with or endorsed by Countdown or anyone connected with the show.

It's designed for mobile devices, specifically touchscreens in portrait orientation. If you think it seems a bit clunky when used on a desktop, that's why.

# Technical information

In fast mode, the solver will only produce one solution, and aggressively discard expressions it considers redundant. In this mode, an expression is redundant if another expression has already been calculated which comes to the same total and which uses the same set, or a subset, of the numbers. The solver stops as soon as it finds an exact solution, or when it determines that no exact solution is possible in which case it will give the closest possible solution.

In full mode, the solver will only consider expressions to be equivalent if, after some reordering to put addition and multiplication operations in a standard order, they do the same operations on the same starting numbers. The solver will run until it has found all distinct solutions to the puzzle.

In all cases, the first solution given by the solver is always the closest it is possible to get to the target and uses the fewest possible operations. Alternative solutions which are equally close and equally long may exist.

Trivially redundant operations which are never useful in Countdown are always ignored. These include multiplying or dividing by 1, or any expression equivalent to 2x − x or x² / x.

The solver runs entirely in JavaScript in your browser. When solving, it follows a duty cycle of 450ms on, 50ms off, so the browser has enough time to update the page.