Documentation.... KRYPTO in TI Extended Basic for the TI99/4a. KRYPTO is a card based maths game much used in schools in the USA to promote maths learning. There are tournaments of the game. The basis is an old one: Select a target number. Now using a particular set of numbers and maths operators (plus, minus, divide, multiply) get to that number. For example: The target is 2 and we have to use all the numbers 11,8,1,13,14. In the following solution (there may be many ways of doing this) the brackets have been added to make it clear the order in which calculations are made. In "normal maths" there is a specified order and in many cases the brackets would not be used. ((14-8)/(13-11))-1=2 We first use the "inner brackets" to produce: (6/2)-1=2 and then working inside the final brakcet first we get: 3-1 =2. If we just select a goal and the numbers to work with at random, there will be many puzzles which cannot be resolved- hence a similar problem in the old tv program Countdown instead looked for the nearest solution rather than a perfect solution. In 1991 I wrote a more or less random number version of Krypto which selected numbers and then tried to find a solution (On TI UK User Group disk Games-22). If the computer failed (by slow brute force) to find a solution the program told you and stopped. Now in 2024 I have revisited the game and produced a program where it will be most unusual for there to be a puzzle that cannot be solved. (Calculated as one in 3000 chance of failure). For added speed the computer will not give you the solution so if you cannot find a solution, you will need to use an online Krypto solver. By selecting the numbers from a particular distribution of numbers, it has been possible to reduce the insoluble sets to as few as one in three thousand problems. The TI99/4a program KRYPTO uses the published number distribution and will produce sets of numbers for you to solve. Here are some problems for you to tackle- answers at the end. Target: 7 Use numbers: 9,13,1,9,21 Target: 22 Use numbers: 21,12,9,6,3 Target: 6 Use numbers: 14,11,10,25,11 Target: 12 Use numbers: 22,13,6,17,2 It is worth noting that 2-2 is zero and 2/2 is one (etc) which are both useful in many cases. The game sold in the USA relies upon a specific distribution of numbers in a special pack of cards to improve the odds. In the beginning the game used the normal number of cards- 52- additional analysis produced a better mix by using 56 cards. For solo play that is all you need, however for several players, the rules initially gave all the players the target and the numbers to use and the first to say "got it" or whatever won if they gave their solution in 30 seconds. If they failed to do so they would lose a point and not participate in the next number set. This caused a problem when players would immediately announce they had the solution, then work it out and declare it in 30 seconds, so tournament play was made fairer by giving the players a set of problems (each had the same numbers) and after a set time collecting the written answers for checking. Don't worry if you can't solve them in 30 seconds! Some of them may take you an awful lot longer... Some solutions to the above problems (they are probably not unique solutions): (2x13)-((9x1)+9)=7 ((6+9)/(3+12))+21=22 (25+(11x11))-(10x14)=6 ((17+6)+13)-(2+22)=12 Enjoy Stephen Shaw