Enter the maze

Texting Marakech: The Secret

Another Mobile phone with a red glow

The way to win at texting Marakech is to draw out a magic square from the numbers 0 to 9 so that all the rows, columns and diagonals add up to 15 (see below). Each time you make a move, you put a cross over the number you texted. Put an O over the numbers texted by your opponent. Because the square uses all the numbers from 1 to 9 and all the rows, columns and diagonals add up to 15, each line corresponds to a winning triple of numbers in the game. Spotted it yet - unlike your opponent, you are now just playing noughts and crosses...and that needs no maths at all!

Lets go through that game again:

Texting Marakech as OXO

You can sell the same program to different people as different products!

So while your opponent is juggling numbers, you secretly play noughts and crosses. This is a common trick of computer science - work out a solution to one basic problem (here noughts and crosses) and then find ways to convert other similar problems (like the Marrakech game) into it. That way you reduce the amount of work you have to do...and if you are an entrepreneur too, out to make yourself rich, then you can sell essentially the same program repackaged to different people as apparently different products. Write a program that plays Noughts and Crosses and the repackaged core program can also be sold as a Marrakech playing program too. The only extra work is to write a new user interface, not the AI game itself.