06.09.2021 Views

Mind, Body, World- Foundations of Cognitive Science, 2013a

Mind, Body, World- Foundations of Cognitive Science, 2013a

Mind, Body, World- Foundations of Cognitive Science, 2013a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

After two applications <strong>of</strong> the “last available label” constraint, the cage illustrated in<br />

Figure 8-5A becomes the cage shown at the top <strong>of</strong> Figure 8-6. Note that this cage<br />

has only two ambiguous cells, each with the possible labels 3 and 5. These two cells<br />

define what Sudoku solvers call a naked pair, which can be used to define a third<br />

rule called the “naked pair constraint.”<br />

3<br />

3<br />

5<br />

5<br />

7 6<br />

8 1<br />

2 9 4<br />

457<br />

89<br />

34<br />

89<br />

1<br />

457<br />

6<br />

8<br />

Figure 8-6. The “naked pair constraint.”<br />

In the naked pair pointed out by the two arrows in Figure 8-6, it is impossible for<br />

one cell to receive the label 3 and for the other cell not to receive the label 5. This<br />

is because these two cells have only two remaining possible labels, and both sets <strong>of</strong><br />

labels are identical. However, this also implies that the labels 3 and 5 cannot exist<br />

elsewhere in the part <strong>of</strong> the puzzle over which the two cells containing the naked<br />

pair have control. Thus one can use this as a constraint to remove the possible labels<br />

3 and 5 from the other cells in the same column as the naked pair, i.e., the cells<br />

shaded in grey in the lower part <strong>of</strong> Figure 8-6.<br />

The three constraints described above have been implemented as a working<br />

model in an Excel spreadsheet. This model has confirmed that by applying only<br />

these three constraints one can solve a variety <strong>of</strong> Sudoku problems <strong>of</strong> easy and<br />

medium difficulty, and can make substantial progress on difficult problems. (These<br />

three constraints are not sufficient to solve the difficult Figure 8-3 problem.) In<br />

order to develop a more successful Sudoku solver in this framework, one would<br />

have to identify additional constraints that can be used. A search <strong>of</strong> the Internet<br />

for “Sudoku tips” reveals a number <strong>of</strong> advanced strategies that can be described as<br />

constraints, and which could be added to a relaxation labelling model.<br />

374 Chapter 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!