|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.solver.Main
public class Main
Main class of the solver. Use this class to invoke the solver from the command line.
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Command line format: |
static void |
startBatch(java.lang.String[] args)
|
static void |
startGUI()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
>java ch.randelshofer.rubik.solver.Main FaceSpecifier1 FaceSpecifier2 ... FaceSpecifier6
where each face specifier is of the form f:mmmmmmmmm
and f (face) must be one of {U,D,F,B,L,R} and m (marker) can be any printable ASCII character. Grasp the left or right side of the cube with one hand and rotate it so that the face under consideration is in front of you. The order of the markers is left-to-right, top-to-bottom with respect to each face. For example, consider the following "unfolded" cube:
Red Red Wht
Yel Wht Wht
Wht Red Red
Wht Wht Grn Org Yel Yel Blu Red Org Yel Grn Grn
Red Org Org Yel Yel Yel Blu Red Org Blu Grn Blu
Yel Wht Grn Org Wht Org Yel Blu Blu Red Grn Red
Blu Org Blu
Grn Blu Grn
Wht Org Grn
With the faces above corresponding to:
Up
Left Front Right Back
Down
Then one possible way to enter this configuration is:
>java ch.randelshofer.rubik.solver.Main L:WWGROOYWG R:BROBROYBB U:RRWYWWWRR D:BOBGBGWOG F:OYYYYYOWO B:YGGBGBRGR
Note: that the choice of marker characters is completely arbitrary, one must only use them consistently within any given cube configuration specification. Also, the order of each face specification is arbitrary.
When run, the program will first load the move mapping and pruning tables (it will regenerate them if not found) then perform the search. Successively shorter solutions will be printed out until an optimal solution is found (that may take a very long time) and the program terminates, or the program is aborted by the user.
public static void startBatch(java.lang.String[] args)
public static void startGUI()
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||