Skip to content

Instantly share code, notes, and snippets.

@rousan
Last active July 17, 2021 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rousan/8a3dc677d1f5c80c8d9260d3f645375d to your computer and use it in GitHub Desktop.
Save rousan/8a3dc677d1f5c80c8d9260d3f645375d to your computer and use it in GitHub Desktop.
Algorithms to solve a 3x3 rubiks cube

Algorithms to solve a 3x3 rubiks cube

Algorithms:
1. The Righty Alg: R U Ri Ui
2. The Lefty Alg: Li Ui L U
3. Spin Right: rotote whole cube by 90deg in closewise
4. Spin Left: rotote whole cube by 90deg in anti-closewise

1. White cross(Daisy -> complete
2. First layer corners(solve corners of white face with matching with other face center color with Righty-alg, rotoate bottom 2 layers to match with center pieces)
    1. if it is trapped in white corner with diffrent side, apply a righty alg to get it on top and flollow the prev steps.
3. second layer edge with matching with coressponding centre piece (move top layer edge pieces to middle layer edge pieces except yellow)
    1. take white face on bottom
    2. Find the edge no yellow color from top layer [no edges are found without yellow, then apply any of these]
    3. rotate the bottom two layers together unitil the colors match
    4. Determine whether the edge needs to go left or right. 
    5. If right apply alg: U R-alg spin-right L-alg
    6. If left apply alg: Ui L-alg spin-left R-alg
4. Top face yellow cross only, ignore whatever on other side of edge pieces
    1. Here three states
        1. already yellow cross [good luck]
        2. edge makeing line : Soltion: hold it in horizontal and apply: F R-alg Fi
        3. edge making V or Angle: Solution: hold it on angle on right-front side and apply: f R-alg fi
        4. only centre piece i.e. Dot: Solution: apply alg for line and then angle 
5. Positioning top yellow layer corner pieces with correct position of corresponding edge pieces matches with centres.
    1. holding yellow face on top
    2. rotate the bottom 2 layers and find that top corners are on the correct position of group of centres
        1. state 1: all 4 corners are in the correct postion [skip, move to prev steps]
        2. state 2: 2 corners are one same positions and 2 others are not and in adjacent: sol: hold it that incorrect corners on right side: apply to swap the corners: 3R-alg spin-right 3L-alg                                                                                             and now rotate bottom two layers to position the corners on correct postion.
        3. state 2: 2 corners are one same positions and 2 others are not and in diagonal: apply the state 2 solution after adjacent swap will come and apply above algorithm
    3. expection: yellow top corners are on correct positon in group of centres, and corners maybe twisted, if all corners are not twisted i.e. in correct position only edges are on incorrect then skip to step 6.
    4. flip cube so that white is on top
    5. first find the yellow bottom corner that needs to be twisted and keep it on bottom-right side
    6. Repeat the Righty-alg until that corner is twisted i.e. yellow corner is facing down
    7. perform a D or Di to put the next yellow corner on bottom-right, warning: do not spin the cube only do D or Di move
    8. Repeat the Righty-alg until that corner is twisted i.e. yellow corner is facing down
    9. after doing all yellow on bottom facing rotate the bottom two layer so that all corners matches with centre color.
6. Position yellow face edges
    1. hold  yellow on top
    2. states
        1. state1: only one yello edge positions correcty
            1. hold the correct edge positions face in front and apply: R-alg L-alg 5R-alg 5L-alg [if not solved then repeat the alg again]
        2. sate2: no yellow edges solved
            1. apply the sate1 alg and will find it on state 1 and apply that alg.
DONE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment