CHAPTER 2

image

The Strategies

Not all strategies are created equal. When solving a Sudoku puzzle manually it makes sense to use simpler strategies as long as they result in candidate removals and cell solutions, and only then move to more complex strategies. Obviously, there is no reason for making the same distinction when writing a computer program to solve Sudokus. And yet, that is precisely how I structured my Sudoku-solving program. The reason is that I want to use the Sudoku Solver to estimate the difficulty of Sudoku puzzles. If the program applied more complex strategies before achieving what is possible with simple ones, it would be impossible ...

Get Sudoku Programming with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.