creint wrote:My solver can now solve all the hardest puzzles.
Forcing nets inside forcing nets is the maximum that is required to solve them.
- Code: Select all
98.7.....7.....6....6.5.....4...5.3...79..5......2...1..85..9......1...4.....3.2.
Takes 8 seconds, but this last steps it only take the first found.
Is your implementation a 2 deep T&E ?
creint wrote:place a -> placements+exclusions. Take this as new pencil mark grid and solve, if contradiction then a is invalid.
If you call forcing net 1 deep T&E then yes.
An easy/slower implementation but it can use all the logic.
Posts are from March 18,19 2021, so some time ago. But my Nested Forcing Nets search can not solve all puzzles.
What I do:
Consider cell A holds candidates. Forcing NET (1 deep)
First placing: place A some candidate -> placements+exclusions.
Take this as new pencil mark grid and solve, if contradiction then A is invalid. OK.
Consider cell A and cell B hold candidates. Nested Forcing NET (2 deep)
..First placing: place A some candidate -> placements+exclusions.
..Take this as new pencil mark grid and solve, if NOT contradiction then try B
....Second placing: place B some candidate -> placements+exclusions.
....Take this as new pencil mark grid and solve, if contradiction then A can be invalid OR B can be invalid(or both)
......What to do?
What I implemented: If ALL candidates B lead to contradiction then A must be invalid.
Where can I improve?