A standard Rubik's Cube is shown in 3-D and also unfolded to identify the specific Tile-face/Vector numbering.
The faces are White-Up / Red-Left / Blue-Front / Orange-Right / Yellow-Down / Green-Back (ULFRDB)
Moves are denoted as F for clockwise rotation of the Front face. F' is CCW and F2 is F twice. The loaded function r_new=rubick_rot(mov,r) implements moves 1-18: UFDLBRU'F'D'L'B'R'U2F2D2L2B2R2.
Input: (rubik)
rubik: row vector of size 54
(The cube started [L=0,U=1,F=2,D=3,B=4,R=5] and then received one or two face moves.
Output: mov (A row vector of one or two of values {1:18})
mov: is a vector values 1:18 representing the moves in order to fix the cube: UFDLBRU'F'D'L'B'R'U2F2D2L2B2R2
- Example:
- If the cube was randomized by [1 9] UD', the one and only 2 move answer is [3 7] DU' which are the complements in reverse order.
- Minimum moves is also required. Scramble by 13(U2) should return a [13], not [1 1] or [7 7]
- Verifications will be by executing your move vector against the provided rubik and checking number of moves.
The function rubik_rot(mov,r) is available for usage
This is the next incremental solution step: Move optimization.
Additional Challenges will be solving the cube at even deeper depths for time and minimizing face moves utilized. This depth does not justify a time check.
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers5
Suggested Problems
-
Return the largest number that is adjacent to a zero
5511 Solvers
-
3429 Solvers
-
3036 Solvers
-
49 Solvers
-
Create a recurrence matrix for a vector of data
23 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Error: Error downloading URL.
I get the same error...
doesnt load rubic_rot :(
fixed tinyurl. Sourcing from my googlepage. 9/29/2020
I think the test suit is still problematic :)