Sudoku Rules: Using a Decision Engine to Solve Candidate Pairs


Follow along with the author's most recent installment in their quest to solve Sudoku puzzles, this time with the help of a decision engine to solve candidate pairs.



Sponsored Post.

By Fernado Donati Jorge, FICO

This blog is the third post in our Sudoku series. In case you missed it, catch up on part 1 or part 2.

 

The Addiction

 
According to Euromonitor, chewing gum sales have declined by more than 15% since 2007, and many believe smartphones are the culprits. Ever since the launch of the iPhone, consumers tend to be on their phones in the checkout line and are no longer enticed by the colorful packages of gum lining the shelves in the checkout area.

“Hold my sake”, said Sudoku to the iPhone.

The Independent of London reported that a 700 percent increase in the sale of pencils has been attributed to the sudoku craze. iPhones and other such devices might be addictive. Sudoku is on a whole different level.

Fortunately for fellow Sudoku addicts across the globe, the Sudoku addiction is a vice with mostly beneficial side effects. Relief from depression, lowered blood pressure, and reduced anxiety have all been associated with the Sudoku habit. But as with any type of addiction, it can also create its share of problems.

In 2005 during the peak of the Sudoku craze, British Airways had to issue a memo to its flight attendants, forbidding them from playing Sudoku during takeoff and landing. The puzzles, management explained, were too distracting - a statement many found hard to argue against.

A few years later, a district court judge in Australia had to discharge the jury on a three-month-long drug trial, after jurors were found to be playing Sudoku instead of listening to the evidence. Ironically, the judge had previously complimented the jurors on the copious amounts of notes they were taking, before finding out what they were eagerly using their pencils for.

It has been almost a year now since my fateful flight to Mexico when I first crossed paths with Sudoku and came up with the idea of using the optimized inference engine, along with a few other advanced features of FICO® Blaze Advisor®, to solve Sudoku puzzles. I really should get back to work. Well, maybe just one more game. And then I’ll get back to work.

 

The Half-Solved Puzzle

 
At the end of the previous episode, my attempt to solve a Hard Sudoku puzzle failed. The picture below shows how far my set of five rules could progress.

Sudoku, Removing Candidate Pairs
Figure 1 Half-solved Hard Sudoku Puzzle

 

After a couple of minutes of staring at the half-solved puzzle, I grabbed a pencil and started looking for a solution. It wasn’t as easy as the medium puzzle, but after a few minutes, I started making some progress, scratching wrong candidates here and circling the right ones there, until the puzzle was complete. I then retraced my steps to understand what strategies I had applied.

The breakthrough was really on column seven, looking at the cells on the second and fifth rows. Both cells have just two candidates: 1 and 7. This means one of them will have a value of 1 and the other will have a value of 7, but we don’t know which one is which just yet. What we do know is that no other cell in that column can have 1 or 7 as candidates. This means that in column 7 we can remove candidates 1 and 7 from the cells in rows 3 and 9.

To put it another way, this new Sudoku rule is about candidate pairs. If two cells in the same row, column, or box have the same pair of candidates, then both candidates can be removed from all other cells in the same row, column, or box…

To learn more about my progress on the “Hard” Sudoku puzzle, read the full post of Sudoku Episode 3 here and keep your eyes peeled for part 4 of our series.