Introduction
I’ve been playing the “Number Place” games in Games and Math and Logic Puzzle magazines for years, and decided earlier this year that I would write a program that would solve these puzzles. Sudoko 1.0 solves easy sudoku puzzles, but will not solve all of the medium, hard, or diabolical puzzles that are out there.
The Sudoku puzzle is stored in two lists: The first list is a list of known values, and the second one is a map of the puzzle. There are several Sudoku’s online, but they all have a simple three by three grid of three by three blocks of cells. Dell’s magazines have published these puzzles with more complex patterns, so the map string stores this information.
The normal map looks like this:
a a a b b b c c c a a a b b b c c c a a a b b b c c c d d d e e e f f f d d d e e e f f f d d d e e e f f f g g g h h h i i i g g g h h h i i i g g g h h h i i i
But there is another mapping that looks like:
a a a b b b c c c a a a b b b c c c a a d d b e e c c a d d d b e e e c f d d d b e e e g f d h h h h h e g f f f h h h g g g f f i i h i i g g f f i i i i i g g
Sudoku 1.0 assumes the first map is used, but will accept any other map that has nine letters (a-i) used nine times each for a total of 81 spaces on the map.