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

optimal solver "chokes" on very short scrambles #9

Open
gregorbg opened this issue Feb 8, 2020 · 1 comment
Open

optimal solver "chokes" on very short scrambles #9

gregorbg opened this issue Feb 8, 2020 · 1 comment

Comments

@gregorbg
Copy link

gregorbg commented Feb 8, 2020

When presented with scrambles of length 4, the Search#solution method sometimes comes up with unnecessarily long results:

Lw2 F2 R' 3Fw solved as F2 B' Uw2 U2 F2 D F2 U2
Fw B L2 3Fw' solved as D2 Fw' B R2 B R2 B2
D2 Dw2 3Bw2 U solved as F2 Uw2 U2 F2 U' F2

I would expect the code to be able to find the "reverse solutions" of length 4. This is currently keeping us from using your optimal solver in TNoodle because we use scrambles of length 4 in our CI sanity checks.

Is there a common pattern to these scrambles that would allow you to fix such corner cases?
I can provide you with more samples if you'd like. The code I'm using is the most recent as of writing this issue.

@cs0x7f
Copy link
Owner

cs0x7f commented Feb 9, 2020

The algorithm is not designed for finding the optimal solution.
More specifically, it uses many tricks to improve solving efficiency for random state. And due to these tricks, the optimal solution might not be found by the solver.
Such behaviours also occur in some other algorithms/software. For example, when you solve the state R L U2 R' L' F with two-phase algorithm in Cube Explorer, the optimal solutions will be lost as introduced in the document.

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