Tool to solve countdown numbers games automatically. The Numbers Round in the TV Game Show Countdown is a number games which objective is to get a number with the four elementary operators (+, -, ×, ÷) and a list of randomly picked numbers.

Countdown Numbers Game - dCode

Tag(s) : Number Game

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!

You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? *Contact-me*!

This page is using the new English version of dCode, *please make comments* !

Sponsored ads

Tool to solve countdown numbers games automatically. The Numbers Round in the TV Game Show Countdown is a number games which objective is to get a number with the four elementary operators (+, -, ×, ÷) and a list of randomly picked numbers.

dCode original solver makes all possible calculations with the starting tiles.

The general principle is to start with the list of N numbers, pick 2 and make an operation with these two numbers, if the result is the expected total, then end, else, store the result in the list and try again with the N-1 new numbers in the list. And so on. The goal is to realize all possible operations until on gets a result.

Original solver uses the rules of the TV Countdown gameshow with 6 number tiles, all natural integers positive, calculations cannot use fractions generating decimal numbers.

Advanced solver is limited to 5 numbers but allows the use of the power operator, can add constraints on operations and numbers.

The N-Numbers solver uses original rules but with up to 50 numbers. Given result is not the simplest. Calculation can be very long, billions of iterations, and if there is no answer, it will never end.

There are three main type of algorithms for solving this number game:

Let the numbers be 2 5 10

Recursive search: make all calculation with N numbers. It uses 2 numbers and for each operation, retry with the results and the N-2 remaining numbers.

Take 2 and 5, make an addition : 2+5=7, a subtraction, 5-2 = 3, etc. Take the result 7 (ou 3), and unused numbers: 10, and start over. 7+10 = 17, etc.

Search with cache: same as the previous one, but stores the calculation to avoid remake them, so, slightly faster, but necessitate a lot of memory.

Take 2 and 5, see if results are already known for addition 7, and subtraction 3, etc. Go on more quickly.

Random search: can find a solution quickly but do not make all calculations, it can prove that a solution exists, but not that a solution does not exist.

Take 2 random numbers 5 and 10, make a random operation : multiplication, store the result : 5*10=50 and go on with remaining results : 2 and 50

Negative numbers are ignored because they do not influence resolution. Indeed it is enough to apply the operator - (minus) in front of any negative number so that it becomes positive.

Consider the numbers 3,2,-1 and target 7, you can calculate 3*2-(-1)=7

Consider the numbers 3,2,1 and target 7, you can calculate 3*2+=7

dCode retains ownership of the source code of the script Countdown Numbers Game. Except explicit open source licence (free / freeware), any algorithm, applet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any snippet or function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in PHP (or Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the Countdown Numbers Game script for offline use, for you, your company or association, see you on contact page !

countdown,right,count,letter,calculation,addition,subtraction,multiplication,division,operation,plus,minus,1,2,3,4,5,6,7,8,9,10,25,50,75,100,mathematic,math,find,number,sign

Source : http://www.dcode.fr/countdown-numbers-game

© 2017 dCode — The ultimate 'toolkit' website to solve every problem. dCode