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

Suboptimal scramble solutions #48

Closed Marius0509 closed 5 months ago

Marius0509 commented 5 months ago

The scramble R2 U2 R2 U2 D2 R2 U2 L2 is 8 move optimal in <R2,U2,L2,D2>.

If I clear the cache and run the command ./twsearch --scramblealg "R2 U2 R2 U2 D2 R2 U2 L2" --moves R2,U2,L2,D2 --writeprunetables never samples/3x3x3.tws multiple times, I randomly get "max depth 8" (2%-3% of the time) or "max depth 12".

If I clear the cache and run the command ./twsearch --scramblealg "R2 U2 R2 U2 D2 R2 U2 L2" --moves R2,U2,L2,D2 --writeprunetables always samples/3x3x3.tws multiple times, the first time I get "max depth 12", and from then on (when the pruning table is already generated) I get "max depth 8".

rokicki commented 5 months ago

Oooh, that's embarrassing. This appears to be related to microthreading. I'm disabling microthreading in (ea381c1fca023421bcc02badd5fba28dae19f03e) until I can get to the bottom of this. Let me know if this resolves it for you. And thank you very much for the excellent report.

rokicki commented 5 months ago

This is fixed in (e40618da4ce869063238dce7553c6f8e1c916af4). Thank you for the defect report. Microthreading has been enabled once more.