daj95376 wrote:When I started my solver, I knew there was a long list of techniques ahead for me to implement. I wrote the basics -- Naked/Hidden Singles/Pairs/Triples/Quads and Locked Candidates (1&2). Then I stopped and took a deep breath before implementing X-Wing, Swordfish, and Jellyfish.
At this point, I stopped again to consider the increasingly complex (and often convoluted) techniques that lay ahead.
daj95376 wrote:When I encounter an invalid candidate in a cell with two candidates, then I report the valid candidate as leading to a solution -- instead of the invalid candidate leading to a contradiction.
.3.8.....1.5.......4...952.....9...28.1..5.7.....1...4...5.724..9.2..8..4........
. 3 .|8 . .|. . .
1 . 5|. . .|. . .
. 4 .|. . 9|5 2 .
-----+-----+-----
. . .|. 9 .|. . 2
8 . 1|. . 5|. 7 .
. . .|. 1 .|. . 4
-----+-----+-----
. . .|5 . 7|2 4 .
. 9 .|2 . .|8 . .
4 . .|. . .|. . .
29 3 2679 | 8 5 246 | 467 16 167
1 2678 5 | 346 23467 2346 | 3467 9 3678
67 4 678 | 1 367 9 | 5 2 3678
----------------------------------------------------------------------------
3567 567 4 | 367 9 368 | 1 58 2
8 26 1 | 346 2346 5 | 9 7 36
29 2567 23679 | 367 1 2368 | 36 58 4
----------------------------------------------------------------------------
36 1 368 | 5 368 7 | 2 4 9
3567 9 367 | 2 346 1346 | 8 136 1567
4 25678 23678 | 9 368 136 | 67 136 1567
...........16394..8.......94...9...5.6...8.2...7..31.42.......1..94213...........
. . .|. . .|. . .
. . 1|6 3 9|4 . .
8 . .|. . .|. . 9
-----+-----+-----
4 . .|. 9 .|. . 5
. 6 .|. . 8|. 2 .
. . 7|. . 3|1 . 4
-----+-----+-----
2 . .|. . .|. . 1
. . 9|4 2 1|3 . .
. . .|. . .|. . .
Karlson wrote:#6:
- Code: Select all
. . .|. . .|. . .
. . 1|6 3 9|4 . .
8 . .|. . .|. . 9
-----+-----+-----
4 . .|. 9 .|. . 5
. 6 .|. . 8|. 2 .
. . 7|. . 3|1 . 4
-----+-----+-----
2 . .|. . .|. . 1
. . 9|4 2 1|3 . .
. . .|. . .|. . .
357 9 2346 | 8 17 24 | 2567 13 267
57 25 1 | 6 3 9 | 4 58 278
8 234 2346 | 5 17 24 | 267 13 9
----------------------------------------------------------
4 23 23 | 1 9 6 | 8 7 5
1 6 5 | 7 4 8 | 9 2 3
9 8 7 | 2 5 3 | 1 6 4
----------------------------------------------------------
2 3457 348 | 39 68 57 | 567 49 1
56 57 9 | 4 2 1 | 3 58 678
356 1 348 | 39 68 57 | 2567 49 267
357* 9 2346 | 8 17 24 | 2567 13 267
57* 25* 1 | 6 3 9 | 4 58* 278
8 234 2346 | 5 17 24 | 267 13 9
----------------------------------------------------------
4 23 23 | 1 9 6 | 8 7 5
1 6 5 | 7 4 8 | 9 2 3
9 8 7 | 2 5 3 | 1 6 4
----------------------------------------------------------
2 3457 348 | 39 68 57 | 567 49 1
56- 57 9 | 4 2 1 | 3 58* 678
356 1 348 | 39 68 57 | 2567 49 267
daj95376 wrote:My emphasis was on finding cell candidates that produced invalid puzzles if used.
However, to keep my solver from printing out two equivalent statements for a cell with two candidates when one is removed, I only report the assignment of the final cell value. Thus, my solver's output would seem to conflict with the statements I made about finding invalid cell candidates. I added this statement to explain this contradiction.
I'm sorry if it was confusing!
PS: I'm in the process of updating my solver so that it lists the chain associated with an invalid cell candidate. Without validation, my results seem to lack acceptability.
Karlson wrote:there is an empty rectangle of 5s:
then a few dual implication chains and nice loops solve it
357 9 2346 | 8 17 24 | 2567 13 267
57 25 1 | 6 3 9 | 4 58 278
8 234 2346 | 5 17 24 | 267 13 9
----------------+----------------+----------------
4 23 23 | 1 9 6 | 8 7 5
1 6 5 | 7 4 8 | 9 2 3
9 8 7 | 2 5 3 | 1 6 4
----------------+----------------+----------------
2 3457 348 | 39 68 57 | 567 49 1
6 57 9 | 4 2 1 | 3 58 78
35 1 348 | 39 68 57 | 2567 49 267
357 9 2346 | 8 17 24 | 257 13 267
57 25 1 | 6 3 9 | 4 58 278
8 234 2346 | 5 17 24 | 267 13 9
----------------+----------------+----------------
4 23 23 | 1 9 6 | 8 7 5
1 6 5 | 7 4 8 | 9 2 3
9 8 7 | 2 5 3 | 1 6 4
----------------+----------------+----------------
2 3457 348 | 39 68 57 | 67 49 1
6 57 9 | 4 2 1 | 3 58 78
35 1 348 | 39 68 57 | 2567 49 267
*--------------------------------------------------------*
|^357 9 2346 | 8 17 24 | 257 13 267 |
|^57 *25 1 | 6 3 9 | 4 58 278 |
| 8 -234 2346 | 5 17 24 | 267 13 9 |
|------------------+------------------+------------------|
| 4 *23 23 | 1 9 6 | 8 7 5 |
| 1 6 5 | 7 4 8 | 9 2 3 |
| 9 8 7 | 2 5 3 | 1 6 4 |
|------------------+------------------+------------------|
| 2 3457 348 | 39 68 57 | 67 49 1 |
| 6 57 9 | 4 2 1 | 3 58 78 |
| 35 1 348 | 39 68 57 | 2567 49 267 |
*--------------------------------------------------------*
Eliminating 3 from r3c2(ALS-XZ A=235 in r4c2, r2c2 B=357 in r2c1, r1c1 x=5 z=3)
35679 234579 23456 | 8 157 24 | 2567 13567 2367
57 257 1 | 6 3 9 | 4 578 278
8 23457 23456 | 57 157 24 | 2567 13567 9
---------------------+------------------+------------------
4 123 238 | 17 9 67 | 68 37 5
135 6 35 | 157 4 8 | 9 2 37
59 589 7 | 2 56 3 | 1 68 4
---------------------+------------------+------------------
2 3457 34568 | 39 678 567 | 5678 49 1
567 578 9 | 4 2 1 | 3 5678 678
13567 13457 34568 | 39 678 567 | 25678 49 267