Countdown Numbers Game: Solved, Analysed, Extended
Total Page:16
File Type:pdf, Size:1020Kb
Countdown Numbers Game: Solved, Analysed, Extended Simon Colton1 Abstract. The Countdown Numbers Game is a popular arithmeti- Figure 1. An example of the cal puzzle which has been played as a two-player game on French Countdown Numbers Game and British television weekly for decades. We have solved this game involving all four large numbers in the sense that the optimal solution for the nearly 12 million puzzle and two small numbers as input, instances has been generated and recorded. We describe here how with target integer 952. we have achieved this using the HR3 Automated Theory Formation system. This has allowed us to analyse the space of puzzles; sug- One solution to this puzzle is: gest gamesmanship tactics and game design improvements to the ((((75∗6)=50)∗(100+3))+25) online/handheld versions of the game; and begin to investigate the potential for automatic invention of such games. if neither achieves this, the contestant or contestants achieving the closest answer scores 7 points. 1 Introduction An example puzzle from Countdown, to which we refer through- The French television show Des Chiffres et des Lettres is one of out, is given in figure 1. While fairly difficult for most people, solving the longest running quiz shows worldwide, having been on air instances of the puzzle is relatively easy for software, and there is an for 48 years. The British counterpart is called Countdown, and is abundance of online solvers available. Many of these solvers claim to also long running: there have been more than 5000 episodes since be perfect in the sense that they will always give an optimal solution its debut in November 1982. Both shows have a section which (with the notion of optimal changing) for any problem instance. For www.crosswordtools.com/ involves an arithmetical puzzle to be solved by both contestants. instance, the solver available at: numbers-game intuitive In the British version, this is called the Numbers Game while is designed to give the most solution in the French version it is called Le Compte est Bon (“the total based on the difficulty of applying the different arithmetical operators is right”). Each puzzle instance involves an input list which (e.g., with addition being easier to apply than division). Other aspects is a randomly ordered sublist of 6 elements from this integer list: of how difficult a puzzle instance might be for a person include the f1; 1; 2; 2; 3; 3; 4; 4; 5; 5; 6; 6; 7; 7; 8; 8; 9; 9; 10; 10; 25; 50; 75; 100g number of inputs required for a solution and the size of the largest The numbers 1 to 10 are called the small numbers, with the numbers number used in the calculation. For instance, when solving the puz- 318∗75 = 23850 25, 50, 75 and 100 being called the large numbers. Contestants zle in figure 1, contestant James Martin calculated 23800=25 = 952 apply only the basic arithmetical operators (addition, subtraction, and to find a solution. The simpler solution in fig- multiplication and division) to the inputs to arrive at a randomly ure 1 requires lesser mental feats. The Compte est Bon variant of the chosen target number. Each input number may be employed only puzzle was employed by Defays in [8] and chapter 3 of [9] to study once in the solution, and no fractional or negative numbers can be relations between perception and cognition as part of Hofstadter et. employed. There is no requirement to use all the input numbers. al’s fluid analogies programme. The British and French versions differ a little. In the British ver- Concentrating on the Countdown variant, to solve this in the sense sion, the target number is between 100 and 999 and contestants are that the 15-puzzle and Rubik’s Cube have been solved, means calcu- given 30 seconds to solve the puzzle, while in the French version, the lating and storing the optimal solution to each puzzle instance. For target is between 101 and 999, and the time limit is 45 seconds. In the Numbers Game, such a total solution can be achieved through both cases, the target number is calculated using a random number generating each problem instance and solving it using a trusted generator which is not linked to the input list. In the French version, solver. This has been achieved by Alliot in unpublished (in the peer- the input numbers are chosen randomly by computer, whereas in the reviewed sense) work, via a detailed and interesting investigation [1] British version, a contestant chooses from the shuffled integer list. of the puzzle space, with an emphasis on complexity analysis. Al- The choice is blind, but the contestant has the option to include 0, liot uses a highly optimised solver which uses a breadth first search 1, 2, 3 or 4 of the large numbers. There are two Numbers Games in and is able to solve single instances in mere milliseconds. He reports each show, hence both contestants get to choose the numbers for an that it solves the entire puzzle space in 53 seconds. It is fair to say instance. Scoring of the game also differs slightly between the two that this approach frames the task of solving the Countdown Num- problem solving paradigm of AI versions. In Countdown, contestants score 10 points if they achieve bers game in the , as discussed in a perfect solution, but if neither achieves this, then the contestant or [6], whereby an intelligent task to perform is interpreted as a series contestants with the closest answer scores 7 points if they are within of problems to be solved. Our approach is different. As described be- artefact generation paradigm 5 of the target, and 5 points if they are within 10. In Des Chiffres low, we have framed the task within the of AI et des Lettres, contestants score 10 if they get a perfect solution, but , whereby intelligent tasks are interpreted as a series of valuable objects to be generated. Our approach is slower, as it exhausts the 1 Computational Creativity Group, Department of Computing, Goldsmiths, space for solutions for every puzzle instance, but there are benefits to University of London ccg.doc.gold.ac.uk having all solutions, as discussed later. The advantage to solving games is summarised neatly in [10]: 3 Solving the Countdown Numbers Game “Solving a game takes this to the next level by replacing the heuris- tics with perfection”. In addition to always providing perfect answers We define a puzzle instance as a quadruple P = hT; I; C; Ai, where to given puzzles, puzzles more appropriate to ability can be selected T is the target number, I is the list of six input numbers ordered from when a game has been solved, as the puzzle space can be analysed smallest to largest, C is the calculation performed over I, and A is and aspects of its nature determined and utilised, as for the Numbers the answer, or result of the calculation (which may or may not be the Games in section 4. In addition, we can use such projects to investi- same as T ). Note that the calculation C must follow the rules, i.e., gate and validate the abilities of a generic AI approach in a novel situ- involving each i 2 I only once and requiring the calculation of no ation. To this end, we have solved the Numbers Game using the HR3 negative or fractional numbers at any stage. For a given instance P , Automated Theory Formation system, which is described in section we denote PT to be the target of P , with PI , PC and PA defined 2, with details of its application given in section 3. We conclude by similarly. It is clear that this covers all the possible puzzles which discussing the potential of automatically inventing new games, by could be shown on the television show up to permutation of the input briefly describing a novel variant of Countdown that we have solved. numbers, and there is no need to consider puzzles which do not have numerical ordering on the inputs, as these are trivially isomorphic to an instance as defined above. 0 0 2 The HR3 System An instance P is said to be correct if T = A or @ P s.t. P = hT;I;C0;A0; i is an instance, and jT − A0j < jT − Aj. For an in- Automated Theory Formation (ATF) is a hybrid AI approach which stance P , we define U(P ) to be the number of input numbers used starts with minimal background knowledge about a domain and pro- in PC , L(P ) to be the largest number calculated at any interme- duces a theory. Such a theory consists of examples, concepts which diary stage of PC , not including A, and N(P ) to be the num- categorise the examples, conjectures which relate the concepts, and ber of distinct numerical operators used (counted only once) in the proofs which demonstrate the truth of certain conjectures, which be- calculation. Given two instances P and Q, we denote P < Q come known as theorems. The first implementation of an ATF system if PT = QT ;PA = QA and either (i) U(P ) < U(Q) or (ii) was HR1 [4], written in Prolog, and the second, Java, implementa- U(P ) = U(Q) and L(P ) < L(A) or (iii) U(P ) = U(Q) and tion was HR2 [5]. Both systems have been used for mathematical L(P ) = L(A) and N(P ) < N(Q). We say that an instance P is discovery tasks, some of which are summarised in [5], in addition to 0 0 optimal if @ P s.t.