cubing / twsearch

🔍 Twizzle Search — a program to find algs and scrambles for twisty puzzles
GNU General Public License v3.0
24 stars 8 forks source link

The --checkbeforesolve option does not work right when ? orientation is specified #17

Closed rokicki closed 11 months ago

rokicki commented 11 months ago

Copy samples/main/3x3x3.tws and put a ? for the orientation of piece 4 of CORNER in Solved.

Run this scramble file:

Scramble TestQ EDGE 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 0 0 0 0 0 0 0 0 0 CORNER 1 2 3 4 5 6 7 8 1 0 0 ? 0 0 0 0 End

Essentially, we are saying, twist corner 1, and do anything twist-wise to corner 4, but ensure all cubies remain in place.

Now, if you run twsearch on these two files, normally, everything works; you get solutions as you expect and those solutions do what you intend.

But if you add the --checkbeforesolve option, twsearch complains "ignoring unsolvable position". This is incorrect.

Likely the resolution procedure used for checkbeforesolve is insufficient to discover solvability when using ?, and instead twsearch should fatal out saying it cannot check solvability in this case. This is better than giving the wrong answer.

rokicki commented 11 months ago

This is resolved with merge 5262aee 518b664.