This code uses the constraint package to solve Sudoku puzzles. It's designed to be flexible, though i've only tested it with 9x9 puzzles with 1-9 as possible values. In theory it should be able to solve puzzles of different sizes comprised of letters or symbols instead of numbers.