My UR loop code does assemble the loop level by level, but it currently only processes even length chains (N or level odd since my arrays are base 0) that pass the SE validity checks. I have a separate remote_pair method, but unless it is activated in the sudoku.ini config file, it does not participate in scoring. I'm not even sure where it would "fit" in terms of a base score.
Activating it for the supplied PM shows the 2 remote pairs that I arbitrarily gave a base score of 4.6:
- Code: Select all
058260041340105826612804905034021568165348297820056413473512689281600054596480102 puzzle 1
79 5 8 |2 6 379 |37 4 1
3 4 79 |1 79 5 |8 2 6
6 1 2 |8 37 4 |9 37 5
--------- --------- ---------+--------- --------- ---------+--------- --------- ---------
79 3 4 |79 2 1 |5 6 8
1 6 5 |3 4 8 |2 9 7
8 2 79 |79 5 6 |4 1 3
--------- --------- ---------+--------- --------- ---------+--------- --------- ---------
4 7 3 |5 1 2 |6 8 9
2 8 1 |6 379 379 |37 5 4
5 9 6 |4 8 37 |1 37 2
1) 4.6 r8c5 <> 37 remote pair[4]-chain r8c7 r1c7 r3c8 r3c5 <37>
2) 4.6 r1c6 <> 37 remote pair[4]-chain r9c6 r9c8 r3c8 r1c7 <37>
3) 1.5 r1c7 <= 3 hidden single in r1
4) 1.5 r1c1 <= 7 hidden single in r1
5) 1.5 r1c6 <= 9 hidden single in r1
6) 1.5 r4c1 <= 9 hidden single in c1
7) 1.5 r2c3 <= 9 hidden single in b1
8) 1.5 r3c5 <= 3 hidden single in b2
9) 1.5 r2c5 <= 7 hidden single in r2
10) 1.5 r3c8 <= 7 hidden single in r3
11) 1.5 r6c3 <= 7 hidden single in c3
12) 1.5 r4c4 <= 7 hidden single in r4
13) 1.5 r6c4 <= 9 hidden single in c4
14) 1.5 r8c5 <= 9 hidden single in c5
15) 1.5 r8c7 <= 7 hidden single in c7
16) 1.5 r8c6 <= 3 hidden single in r8
17) 1.5 r9c8 <= 3 hidden single in c8
18) 1.5 r9c6 <= 7 hidden single in b8
058260041340105826612804905034021568165348297820056413473512689281600054596480102;4.6/4.6/4.6
Are you suggesting that we should consider discontinuous unique-rectangle or otherwise deadly pattern chains??? I'm not sure I'm following where you seem to be going with this. Could you offer some specific examples of what you're looking for out of UR loop algorithms???
Cheers,
Paul