Puzzle 6 (Evil) Non-Heuristic Heuristic
¡@ 1 ¡@ 4 ¡@ ¡@ ¡@ ¡@ 7
¡@ ¡@ ¡@ ¡@ ¡@ 5 6 ¡@ 4
¡@ 3 ¡@ ¡@ ¡@ ¡@ ¡@ 8 ¡@
¡@ ¡@ 2 ¡@ 1 4 ¡@ ¡@ ¡@
¡@ ¡@ 9 ¡@ 7 ¡@ 5 ¡@ ¡@
¡@ ¡@ ¡@ 6 5 ¡@ 9 ¡@ ¡@
¡@ 7 ¡@ ¡@ ¡@ ¡@ ¡@ 2 ¡@
3 ¡@ 8 5 ¡@ ¡@ ¡@ ¡@ ¡@
2 ¡@ ¡@ ¡@ ¡@ 7 ¡@ 3 ¡@

Puzzle cannot be solved.

¡@

. . Solving Sudoku . . .

insert_square/3: Puzzle has a mistake at square 23

 

[8,9]

1

6

4

2

9

3

5

7

[8,9]

2

7

[1,3,8]

[3,8]

5

6

1

4

[4,5]

3

[4,5]

7

6

[1]

2

8

9

[5]

5

2

9

1

4

8

6

3

[6,8]

8

9

2

7

3

5

4

1

1

4

3

6

5

8

9

7

2

[4,5,6,9]

7

[1,4,5]

[1,3,8]

[3,4,6,8,9]

[1,6,9]

[1,4]

2

[5,6,8]

3

[6,9]

8

5

4

2

7

1

6

2

[6,9]

[1,4,5]

[1,8]

[6,8,9]

7

4

3

[5,8]

 

execution aborted

¡@

Sudoku is solved using backtracking.

¡@

9 1 6 4 8 2 3 5 7

8 2 7 1 3 5 6 9 4

4 3 5 7 9 6 2 8 1

5 8 2 9 1 4 7 6 3

1 6 9 2 7 3 5 4 8

7 4 3 6 5 8 9 1 2

6 7 1 3 4 9 8 2 5

3 9 8 5 2 1 4 7 6

2 5 4 8 6 7 1 3 9

¡@

There is a bug in some method.  In box 4 and column 1 there is no possibility for a 7.  As a result of this error there are two squares with 5's in the same row and same box.  As can be seen in the diagram, the non-heuristic version fails to continue applying box, column and row rules  in the remaining squares of the puzzle that it would have otherwise gotten to had the error not occurred.