Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Support for Multiple Solved States #69

Open
DougCube opened this issue Dec 11, 2024 · 5 comments
Open

Request Support for Multiple Solved States #69

DougCube opened this issue Dec 11, 2024 · 5 comments

Comments

@DougCube
Copy link

This is probably a huge ask, but for my use case, I would very much like a mode of operation where for the "same puzzle" (same set of pieces and same moves), I can define multiple "solved states" with different subsets of what are considered identical pieces.

Let me elaborate. Currently, what I'm doing is writting multiple definition files and executing multiple runs with the same ScrambleAlg then finding the best solution among them with post-processing of the results.

I'll give a concrete example. For 3x3, I can define 6 solved states for color-neutral Cross (solves all 4 edges around a center piece), one on each of the 6 faces. I have to run the program 6 times, gather and parse the solutions, then output the shortest solutions among them. I do have a way to automate this now, but the runtimes are rather long. When I profile the performance of it, there is tremendous overhead in I/O operations. If this mode of operation was to be natively supported in the tool, then I can reduce the multiple program calls to just one and greatly improve the performance -- presumably there are optimizations in the tool to leverage the puzzle being the same.

In this toy example, it's only 6 calls, but in practice, I am running usages with hundreds or even thousands of calls.

@rokicki
Copy link
Collaborator

rokicki commented Dec 11, 2024 via email

@DougCube
Copy link
Author

A few days ago, I accidentally stumbled on using smaller memory size causing a dramatic speedup. But not sure what the optimal memory size is for each puzzle. Not sure what you mean be "manually delete pruning tables" tho.

An initial step, just running multiple times in a loop for each solved state, where the puzzle is only loaded once and having a way to define multiple solved states in the same definition file, then post-processing the solutions, would speed things up a bit for my use case. But I guess for other use cases, might be a good idea to support two modes: one where it spits out solutions for each solved state and one where it rolls it up for you. Another problem is how to denote which solved state is achieved by each solution line.

@DougCube
Copy link
Author

How do I delete the pruning tables?

@DougCube
Copy link
Author

Nvm, I figured it out. It was in ~/.cache/twsearch/

@rokicki
Copy link
Collaborator

rokicki commented Dec 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants