By barneyb on March 5, 2010
The next sudoku strategy is called a "pointing pair" which I'm going to start by generalizing into "pointing triple". The strategy is pretty straightforward: if, for a given number in a given block, all the potential cells are in the same row or column, then that number cannot exist in any other block's cells of [...]
Posted in groovy, sudoku
By barneyb on February 18, 2010
The next Sudoku solving strategy I want to dig into is called "hidden single". Here's the implementation to start with:
class HiddenSingleStrategy implements Strategy {
static getTests() {
[
new Test(
'0' * 9 + '000200000' + '0' * 9 [...]
Posted in groovy, sudoku
By barneyb on January 27, 2010
A couple days ago I posted about implementing a Sudoku solver in Groovy as a sort of cross-training exercise, and promised to delve into the strategies a bit more. So here's GameRulesStrategy:
class GameRulesStrategy implements Strategy {
static getTests() {
[
new Test(
[...]
Posted in groovy, sudoku
By barneyb on January 25, 2010
Last week I spent a bunch of time implementing Sudoku solving strategies in Groovy. Actually a pretty interesting exercise, I thought. Even the simple solving techniques/strategies require a bit of thought to generalize into code. This might seems like a pointless exercise, but think of it a cross training. Football players can't hope to compete [...]
Posted in groovy, sudoku
By barneyb on July 19, 2006
For my birthday last month, Heather (my wife) got me a book of Sudoku puzzles. If you like puzzles and haven't tried Sudoku, highly recommended. Simple and fun.
However, being the good computer geek that I am, I quickly decided that it'd be a heck of a lot easier to let the computer solve them for [...]
Posted in personal, sudoku