cs0x7f / TPR-4x4x4-Solver

4x4x4 Solver = Three-Phase-Reduction Solver + 3x3x3 Solver
25 stars 5 forks source link

Inverse solution #2

Closed clementgallet closed 12 years ago

clementgallet commented 12 years ago

Add an option to print the inverse solution. This is not obvious, as Bruce pointed out on the speedsolving forum: if when solving you end up with a non standard orientation (not white on top, green on front), then inversing the solution is not enough, as people will start scrambling with white on top and green on front, so they won't obtain the wanted position.

cs0x7f commented 12 years ago

I'll fix this. By the way, "people will start scrambling with white on top and green on front" seems not true. Our wca delegates told me that the orientation of cube before inspection is also randomly decided by the judge (white on top and green on front is only for scrambling, not solving or inspecting)

clementgallet commented 12 years ago

True, white on top green on front is only for scrambling, that is what I meant to say. This is relevant if you want to use the inverse solution of your program as a scrambling sequence, which always start with white on top green on front. In my program, to fix that, I just determined the symmetry of my solved cube and applied this symmetry (or the inverse, don't remember) to all moves of the solving sequence.

cs0x7f commented 12 years ago

I get it. I'll fix this soon.

cs0x7f commented 12 years ago

Fixed. Execute "java -jar threephase.jar 10", it will generate 20 scrambles. The first, third, 5th, 7th, ... is random move scramble. And the second, 4th, 6th...is the inversed-solution scramble which ends with cube rotation and represent the same state as the scramble before it(2nd->1st, 4th->3rd...)

jfly commented 12 years ago

It looks like the line of code inverse = true was left behind in FullCube:public String getMoveString(boolean inverse, boolean rotation). I'm pretty sure this is vestigial debugging code, right? Is it safe to remove? See https://github.com/ChenShuang/TPR-4x4x4-Solver/blob/master/src/FullCube.java#L161