I wondered what Forcing-T&E would give for this puzzle. In a limited sense, Forcing-T&E is the opposite of my usual approach: instead of applying the simplest available rule at each step, regardless of the total number of steps, it tries to minimise the number of steps, regardless of the complexity of each step. Here, "minimise" has to be taken in a broad sense: only one resolution path is followed; optimisation of the choice of the successive starting bivalue pairs is purely local.
What I get is nine steps of Forcing-T&E(S), i.e. many more than in the few examples I had already tried:
(solve "..42....6.6..7..3.2....61..1....46...5..9..1...71....99....37...8..4..5...37....8")
***********************************************************************************************
*** SudoRules 20.1.s based on CSP-Rules 2.1.s, config = S
*** Using CLIPS 6.32-r779
*** Download from:
https://github.com/denis-berthier/CSP-Rules-V2.1***********************************************************************************************
hidden-single-in-a-row ==> r8c1 = 7
hidden-single-in-a-column ==> r5c6 = 7
182 candidates, 976 csp-links and 976 links. Density = 5.93%
- Code: Select all
CURRENT RESOLUTION STATE:
358 1379 4 2 1358 1589 589 789 6
58 6 1589 4589 7 1589 24589 3 245
2 379 589 34589 358 6 1 4789 457
1 239 289 358 2358 4 6 278 2357
3468 5 268 368 9 7 2348 1 234
3468 234 7 1 23568 258 23458 248 9
9 124 1256 568 12568 3 7 246 124
7 8 126 69 4 129 239 5 123
456 124 3 7 1256 1259 249 2469 8
FORCING-T&E applied to bivalue candidates n1r2c3 and n1r2c6 :
.... 1 values decided by n1r2c3 : n1r2c3
.... 45 values decided by n1r2c6 : n1r2c6 n1r1c2 n1r9c5 n7r3c2 n7r1c8 n7r4c9 n5r6c7 n9r4c2 n3r6c2 n3r1c1 n8r7c4 n6r5c4 n9r8c4 n2r8c6 n5r9c6 n6r9c1 n1r8c3 n3r8c9 n5r7c3 n6r7c5 n8r6c6 n4r6c8 n2r7c8 n9r9c8 n4r9c7 n2r9c2 n1r7c9 n8r3c8 n3r3c5 n5r4c5 n3r4c4 n8r1c5 n4r3c4 n5r3c9 n9r3c3 n8r2c3 n2r5c3 n5r2c1 n9r1c7 n2r2c7 n4r2c9 n4r7c2 n2r6c5 n8r5c1 n3r5c7
===> 0 values decided in both cases:
===> 3 candidates eliminated in both cases: n5r2c3 n9r2c3 n1r7c3
- Code: Select all
CURRENT RESOLUTION STATE:
358 1379 4 2 1358 1589 589 789 6
58 6 18 4589 7 1589 24589 3 245
2 379 589 34589 358 6 1 4789 457
1 239 289 358 2358 4 6 278 2357
3468 5 268 368 9 7 2348 1 234
3468 234 7 1 23568 258 23458 248 9
9 124 256 568 12568 3 7 246 124
7 8 126 69 4 129 239 5 123
456 124 3 7 1256 1259 249 2469 8
FORCING-T&E applied to bivalue candidates n5r7c3 and n5r9c1 :
.... 1 values decided by n5r7c3 : n5r7c3
.... 52 values decided by n5r9c1 : n5r9c1 n8r2c1 n1r2c3 n3r1c1 n5r3c3 n9r4c3 n8r5c3 n4r6c8 n6r6c1 n4r5c1 n6r5c4 n9r8c4 n3r8c7 n1r8c9 n2r8c6 n1r9c6 n6r9c5 n2r9c8 n6r7c8 n2r7c3 n4r9c2 n9r9c7 n1r7c2 n6r8c3 n4r7c9 n7r3c9 n9r3c2 n8r3c8 n7r4c8 n3r3c5 n4r3c4 n5r2c4 n8r7c4 n5r7c5 n2r6c5 n3r6c2 n2r4c2 n8r4c5 n5r6c6 n8r6c7 n3r4c4 n5r4c9 n2r2c9 n3r5c9 n4r2c7 n9r2c6 n8r1c6 n1r1c5 n5r1c7 n7r1c2 n9r1c8 n2r5c7
===> 0 values decided in both cases:
===> 2 candidates eliminated in both cases: n6r7c3 n5r7c4
- Code: Select all
CURRENT RESOLUTION STATE:
358 1379 4 2 1358 1589 589 789 6
58 6 18 4589 7 1589 24589 3 245
2 379 589 34589 358 6 1 4789 457
1 239 289 358 2358 4 6 278 2357
3468 5 268 368 9 7 2348 1 234
3468 234 7 1 23568 258 23458 248 9
9 124 25 68 12568 3 7 246 124
7 8 126 69 4 129 239 5 123
456 124 3 7 1256 1259 249 2469 8
FORCING-T&E applied to bivalue candidates n6r8c4 and n9r8c4 :
.... 47 values decided by n6r8c4 : n6r8c4 n8r7c4 n3r5c4 n5r4c4 n6r5c3 n6r9c1 n6r7c8 n5r7c3 n6r6c5 n5r6c7 n3r4c9 n3r8c7 n9r8c6 n7r4c8 n7r3c9 n5r2c9 n8r2c1 n4r5c1 n3r6c1 n2r6c2 n8r6c6 n4r6c8 n2r4c5 n1r7c5 n5r9c5 n2r9c6 n9r9c8 n4r9c7 n1r9c2 n2r8c3 n1r8c9 n2r7c9 n8r3c8 n3r3c5 n9r3c2 n4r3c4 n9r2c4 n2r2c7 n8r5c7 n8r1c5 n9r1c7 n4r7c2 n5r1c1 n1r1c6 n1r2c3 n9r4c3 n3r1c2
.... 3 values decided by n9r8c4 : n9r8c4 n6r8c3 n1r2c3
===> 1 values decided in both cases: n1r2c3
===> 7 candidates eliminated in both cases: n1r1c2 n8r2c3 n1r2c6 n9r3c4 n1r8c3 n9r8c7 n9r9c6
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 4589 7 589 24589 3 245
2 379 589 3458 358 6 1 4789 457
1 239 289 358 2358 4 6 278 2357
3468 5 268 368 9 7 2348 1 234
3468 234 7 1 23568 258 23458 248 9
9 124 25 68 12568 3 7 246 124
7 8 26 69 4 129 23 5 123
456 124 3 7 1256 125 249 2469 8
FORCING-T&E applied to bivalue candidates n6r8c4 and n9r8c4 :
.... 48 values decided by n6r8c4 : n6r8c4 n8r7c4 n3r5c4 n5r4c4 n4r3c4 n9r2c4 n2r8c3 n3r8c7 n1r8c9 n9r8c6 n5r7c3 n3r4c9 n7r4c8 n7r3c9 n5r2c9 n8r2c6 n2r6c6 n8r4c5 n6r6c5 n9r4c3 n2r4c2 n8r3c3 n6r5c3 n9r3c8 n3r3c2 n4r6c2 n1r9c2 n5r9c6 n2r9c5 n1r7c5 n1r1c6 n8r6c8 n5r6c7 n3r6c1 n8r5c1 n5r3c5 n3r1c5 n5r1c1 n8r1c7 n2r7c8 n4r7c9 n6r9c8 n4r9c1 n9r9c7 n2r5c9 n4r5c7 n2r2c7 n9r1c2
.... 2 values decided by n9r8c4 : n9r8c4 n6r8c3
===> 0 values decided in both cases:
===> 1 candidates eliminated in both cases: n6r9c1
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 4589 7 589 24589 3 245
2 379 589 3458 358 6 1 4789 457
1 239 289 358 2358 4 6 278 2357
3468 5 268 368 9 7 2348 1 234
3468 234 7 1 23568 258 23458 248 9
9 124 25 68 12568 3 7 246 124
7 8 26 69 4 129 23 5 123
45 124 3 7 1256 125 249 2469 8
hidden-single-in-a-block ==> r8c3 = 6
naked-single ==> r8c4 = 9
FORCING-T&E applied to bivalue candidates n2r5c3 and n8r5c3 :
.... 4 values decided by n2r5c3 : n2r5c3 n5r7c3 n4r9c1 n4r6c2
.... 49 values decided by n8r5c3 : n8r5c3 n3r8c7 n1r8c9 n2r8c6 n4r7c9 n9r9c7 n9r2c6 n4r5c1 n5r9c1 n1r9c6 n6r9c5 n2r9c8 n4r9c2 n6r7c8 n8r7c4 n5r7c5 n2r7c3 n1r7c2 n9r4c3 n5r3c3 n7r3c9 n9r1c8 n7r1c2 n8r2c1 n3r1c1 n6r6c1 n9r3c2 n2r5c7 n3r5c9 n6r5c4 n5r4c9 n3r4c4 n2r6c5 n3r6c2 n8r4c5 n5r6c6 n8r1c6 n5r1c7 n4r2c7 n8r6c7 n4r6c8 n8r3c8 n5r2c4 n7r4c8 n3r3c5 n1r1c5 n2r4c2 n4r3c4 n2r2c9
===> 0 values decided in both cases:
===> 8 candidates eliminated in both cases: n2r4c3 n2r5c9 n4r6c1 n2r6c2 n4r6c7 n4r7c2 n4r9c7 n4r9c8
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 458 7 589 24589 3 245
2 379 589 3458 358 6 1 4789 457
1 239 89 358 2358 4 6 278 2357
3468 5 28 368 9 7 2348 1 34
368 34 7 1 23568 258 2358 248 9
9 12 25 68 12568 3 7 246 124
7 8 6 9 4 12 23 5 123
45 124 3 7 1256 125 29 269 8
FORCING-T&E applied to bivalue candidates n3r5c9 and n4r5c9 :
.... 2 values decided by n3r5c9 : n3r5c9 n3r8c7
.... 45 values decided by n4r5c9 : n4r5c9 n4r2c7 n4r7c8 n6r9c8 n9r9c7 n4r3c4 n9r2c6 n2r2c9 n1r7c9 n3r8c9 n2r8c7 n1r8c6 n2r7c2 n5r7c3 n4r9c1 n1r9c2 n4r6c2 n2r5c3 n1r1c5 n3r3c5 n5r3c9 n7r4c9 n8r1c7 n3r5c7 n5r6c7 n5r1c6 n2r9c6 n5r9c5 n8r6c6 n2r6c8 n6r6c5 n8r7c5 n6r7c4 n3r6c1 n9r4c2 n8r4c3 n6r5c1 n9r3c3 n7r3c8 n9r1c8 n2r4c5 n8r2c4 n5r2c1 n7r1c2 n3r4c4
===> 0 values decided in both cases:
===> 6 candidates eliminated in both cases: n8r3c4 n8r4c4 n3r4c9 n3r5c1 n3r5c4 n3r6c7
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 458 7 589 24589 3 245
2 379 589 345 358 6 1 4789 457
1 239 89 35 2358 4 6 278 257
468 5 28 68 9 7 2348 1 34
368 34 7 1 23568 258 258 248 9
9 12 25 68 12568 3 7 246 124
7 8 6 9 4 12 23 5 123
45 124 3 7 1256 125 29 269 8
naked-pairs-in-a-column: c4{r5 r7}{n6 n8} ==> r2c4 ≠ 8
FORCING-T&E applied to bivalue candidates n4r7c8 and n4r7c9 :
.... 47 values decided by n4r7c8 : n4r7c8 n4r6c2 n4r9c1 n5r7c3 n2r5c3 n6r9c8 n9r9c7 n9r2c6 n8r2c1 n6r5c1 n3r6c1 n9r4c2 n8r4c3 n5r1c1 n8r1c7 n5r6c7 n7r4c9 n2r4c8 n8r6c8 n2r6c6 n1r8c6 n5r9c6 n2r9c5 n1r9c2 n2r7c2 n1r7c9 n6r6c5 n8r7c5 n6r7c4 n8r5c4 n9r3c3 n7r3c8 n3r3c2 n5r3c5 n3r4c5 n5r4c4 n1r1c5 n4r3c9 n3r5c9 n2r8c9 n3r8c7 n5r2c9 n4r5c7 n2r2c7 n4r2c4 n7r1c2 n9r1c8
.... 5 values decided by n4r7c9 : n4r7c9 n3r5c9 n3r8c7 n1r8c9 n2r8c6
===> 2 values decided in both cases: n3r5c9 n3r8c7
===> 8 candidates eliminated in both cases: n4r2c9 n3r5c7 n4r5c9 n2r7c5 n2r7c9 n2r8c7 n3r8c9 n2r9c6
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 45 7 589 24589 3 25
2 379 589 345 358 6 1 4789 457
1 239 89 35 2358 4 6 278 257
468 5 28 68 9 7 248 1 3
368 34 7 1 23568 258 258 248 9
9 12 25 68 1568 3 7 246 14
7 8 6 9 4 12 3 5 12
45 124 3 7 1256 15 29 269 8
FORCING-T&E applied to bivalue candidates n2r2c7 and n2r2c9 :
.... 45 values decided by n2r2c7 : n2r2c7 n5r2c9 n4r2c4 n8r2c1 n9r2c6 n9r9c7 n8r1c7 n5r6c7 n4r5c7 n6r5c1 n3r6c1 n4r6c2 n5r1c1 n4r9c1 n9r3c3 n8r4c3 n2r5c3 n5r7c3 n9r4c2 n1r1c6 n5r9c6 n2r8c6 n1r8c9 n4r7c9 n7r3c9 n2r4c9 n8r6c8 n7r4c8 n4r3c8 n3r3c2 n5r3c4 n3r4c4 n5r4c5 n8r3c5 n7r1c2 n9r1c8 n3r1c5 n8r5c4 n6r7c4 n1r9c5 n2r9c2 n6r9c8 n1r7c2 n2r7c8 n2r6c5
.... 4 values decided by n2r2c9 : n2r2c9 n1r8c9 n2r8c6 n4r7c9
===> 3 values decided in both cases: n2r8c6 n1r8c9 n4r7c9
===> 7 candidates eliminated in both cases: n4r3c9 n2r6c6 n4r7c8 n1r7c9 n1r8c6 n2r8c9 n2r9c5
- Code: Select all
CURRENT RESOLUTION STATE:
358 379 4 2 1358 1589 589 789 6
58 6 1 45 7 589 24589 3 25
2 379 589 345 358 6 1 4789 57
1 239 89 35 2358 4 6 278 257
468 5 28 68 9 7 248 1 3
368 34 7 1 23568 58 258 248 9
9 12 25 68 1568 3 7 26 4
7 8 6 9 4 2 3 5 1
45 124 3 7 156 15 29 269 8
FORCING-T&E applied to bivalue candidates n5r6c6 and n8r6c6 :
.... 44 values decided by n5r6c6 : n5r6c6 n3r4c4 n1r9c6 n1r1c5 n3r3c5 n5r4c9 n7r3c9 n9r3c2 n2r4c2 n4r9c2 n5r9c1 n6r9c5 n8r7c4 n5r7c5 n6r5c4 n2r7c3 n6r7c8 n8r2c1 n4r5c1 n5r3c3 n4r3c4 n8r3c8 n7r4c8 n9r1c8 n2r9c8 n9r9c7 n4r6c8 n5r1c7 n8r1c6 n5r2c4 n9r2c6 n3r1c1 n6r6c1 n7r1c2 n3r6c2 n1r7c2 n8r5c3 n2r5c7 n8r6c7 n2r6c5 n4r2c7 n9r4c3 n8r4c5 n2r2c9
.... 42 values decided by n8r6c6 : n8r6c6 n6r5c4 n8r7c4 n6r6c1 n3r1c1 n9r4c3 n8r4c8 n7r4c9 n5r3c9 n8r3c3 n2r5c3 n5r7c3 n4r9c1 n8r5c1 n4r5c7 n2r6c8 n6r7c8 n9r9c8 n2r9c7 n1r9c2 n5r9c6 n6r9c5 n9r2c6 n8r2c7 n9r1c7 n7r1c2 n9r3c2 n1r1c6 n2r7c2 n1r7c5 n5r6c7 n3r6c5 n4r6c2 n5r4c4 n2r4c5 n4r2c4 n3r3c4 n3r4c2 n5r2c1 n2r2c9 n4r3c8 n5r1c5
===> 11 values decided in both cases: n9r3c2 n6r9c5 n8r7c4 n6r5c4 n6r7c8 n9r2c6 n3r1c1 n6r6c1 n7r1c2 n9r4c3 n2r2c9
===> 49 candidates eliminated in both cases: n5r1c1 n8r1c1 n3r1c2 n9r1c2 n3r1c5 n8r1c5 n5r1c6 n9r1c6 n8r1c7 n7r1c8 n8r1c8 n5r2c6 n8r2c6 n2r2c7 n5r2c7 n9r2c7 n5r2c9 n3r3c2 n7r3c2 n9r3c3 n5r3c4 n5r3c5 n8r3c5 n7r3c8 n9r3c8 n9r4c2 n8r4c3 n3r4c5 n5r4c5 n2r4c8 n2r4c9 n6r5c1 n8r5c4 n8r5c7 n3r6c1 n8r6c1 n5r6c5 n6r6c5 n8r6c5 n2r6c7 n8r6c8 n6r7c4 n6r7c5 n8r7c5 n2r7c8 n2r9c2 n1r9c5 n5r9c5 n6r9c8
- Code: Select all
CURRENT RESOLUTION STATE:
3 7 4 2 15 18 59 9 6
58 6 1 45 7 9 48 3 2
2 9 58 34 3 6 1 48 57
1 23 9 35 28 4 6 78 57
48 5 28 6 9 7 24 1 3
6 34 7 1 23 58 58 24 9
9 12 25 8 15 3 7 6 4
7 8 6 9 4 2 3 5 1
45 14 3 7 6 15 29 29 8
stte
DEFISE, does your number-of-steps optimisation algorithm apply to this?