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

If `--mindepth` is used, pruning tables are not generated to the same depth that they should be #14

Open benwh1 opened 12 months ago

benwh1 commented 12 months ago

If I run twsearch --mindepth 40 puzzle.tws scramble.scr, I would expect the pruning table to be generated out to the same depth that it would be if a full search was ran without using --mindepth, but it doesn't seem to do this. If there is no cached table file, it only goes to depth 3, and if there is a cached table file, it loads it but doesn't extend it until after the first search at depth mindepth is finished.

(I wanted to solve 3x3x3 superflip in qtm without using D moves, but because of #13 I tried to manually stop the program from doing an odd depth search and restart it at the next even depth, but I noticed it didn't extend the table when I restarted it, so the search would have taken even longer)

rokicki commented 12 months ago

Sorry about that. I'm working on a fix, but it won't be coming along for a bit. In the meantime, you can do what you want fairly easily (but it's a hack). Just run it (without mindepth) for a while until you have a pretty good table generated (an hour or two will do), interrupt, and then rerun it with mindepth. We know for the case you care about mindepth is 26, and I suspect you'll get solutions pretty quickly on that second run.