cubejs icon indicating copy to clipboard operation
cubejs copied to clipboard

Weird solution

Open andretietz opened this issue 6 years ago • 1 comments

When I try solving:

 UUUUUUUUUFFFRRRRRRLLLFFFFFFDDDDDDDDDBBBLLLLLLRRRBBBBBB

The solution is:

R L U2 R L F2 R2 U2 R2 F2 R2 U2 F2 L2 U

instead of

U

Even though the solution is completely working, it's a bit long.

andretietz avatar Feb 01 '19 08:02 andretietz

Haha, I guess the two phase algorithm wasn't made with the intention to solve trivial cases optimally :P. If you find this an important feature it would probably be pretty easy to do a 3-4 depth search before running the actual algorithm to see if it's a trivial case. Or maybe there's a way to edit the algorithm so that it would handle these more trivial cases natively, not sure haha!

emilgoldsmith avatar May 09 '19 04:05 emilgoldsmith