Sim Carol 2001

It's program to solve the numbers game on Countdown, the game show on Channel 4 in the UK. The game works by a contestant picking unseen six numbers from a set of tiles. These numbers are presented and a random number is picked. Two contestants have 30 seconds to create a formulae using only the six numbers available, which calculates to the picked random number. Only the normal four functions (add, subtract, divide and multiply) are allowed.

For example; Contestant picks 3, 7, 10, 14, 25 and 75. Random number generator (Cecil) picks 372. One answer would be...

( ( ( ( ( 3 * 10 ) - 7 ) * 14 ) - 25) + 75) = 372

If no one can work out the correct answer, a presenter, Carol Vorderman shows off and produces the correct answer with no problem at all, although she has been known to miss a few puzzles.

Sim Carol 2001 is released under the terms of the Gnu Public License. If you wish to distribute copies of this code, please do, but it must be in accordance with this license.

A big hand must go to Dave Jackson, me ole bud. This program started out as a programming contest between the two of us. He was a big help. *applause*

You are encouraged to modify my code to make it work better, or if you want to, write your own solution from scratch. Please send me a copy of your work if you do.

Using Sim Carol 2001

Once you have compiled the code, use the command line to give your numbers and target;

sc2001 <n1> <n2> <n3> <n4> <n5> <n6> -t <target>

The program will then go off and work out how to get the six given numbers calculated into the target.

Each possible solution found will be listed one step at a time. If no exact match can be found, the nearest is displayed.

Give your answer to Carol, and look all clever.


[Bacchae] Copyright © Bill Godfrey, 2002.