Skip to content

Instantly share code, notes, and snippets.

@reflexdemon
Last active September 10, 2019 19:39
Show Gist options
  • Save reflexdemon/97e3c0e33a720c5da9f9c5406457db29 to your computer and use it in GitHub Desktop.
Save reflexdemon/97e3c0e33a720c5da9f9c5406457db29 to your computer and use it in GitHub Desktop.
Solve 2x2 Rubiks cube

Overview

While I was trying to solve the Rubix Cube 2x2 all by myself, found it really challenging. Then bit of help from Google and Youtube, I got the working formula and wanted to share it with everyone.

Solve for 3 colors

Prerequisites

  • Make sure you have 3 whites together.
  • Keep the last white at the bottom row below the blank spot

Goal

White needs to be solved for top side of the cube

Formula:

R' D R D'
  1. Right Reverse (R')
  2. Down Clock wise (D)
  3. Right Forward (R)
  4. Down counter clock wise (D')

You will have to do this in a loop until the goal is obtained.

Solve for Top Row

Prerequisites

  • Make the White side face top
  • If you have any two colors matching on one side keep it facing away from you

Goal

White is solved and top row colors are solved.

Formula:

R' D R L' D' L R' D R
  1. Right Reverse (R')
  2. Down Clock wise (D)
  3. Right Forward (R)
  4. Left Reverse (L')
  5. Down Counter Clock wise (D')
  6. Left Forward (L)
  7. Right Reverse (R')
  8. Down Clock wise (D)
  9. Right Forward (R)

You will have to do this in a loop until the goal is obtained.

Solve for Bottom

Prerequisites

  • Now invert the cube and keep White side facing bottom.
  • If you have one yellow color keep it on bottom left on top.
  • If you have two yellow close to each other then keep it on the right side
  • If yellow is diagonal then make sure one of the yellow color is on bottom left.
  • If there is no yellow, no problem just continue.

Goal

Yellow is solved and top row colors are solved.

Formula:

R U R' U R Ux2 R'
  1. Right Forward (R)
  2. Up Clock wise (U)
  3. Right Reverse (R')
  4. Up Clock wise (U)
  5. Right Forward (R)
  6. Up Clock wise (U), 2 times
  7. Right Reverse (R')

You will have to do this in a loop until the goal is obtained.

Last Stage

Prerequisites

  • Look for any solved side, if you have one then keep it away from you
  • If you don't have solved side no problem, we can still continue.

Goal

To have all the sides solved.

Formula:

R' F R' B'x2 R F' R B'x2 Rx2 B'x2
  1. Right Reverse (R')
  2. Front Clock wise (F)
  3. Right Reverse (R')
  4. Back counter clock wise (B'), 2 times
  5. Right Forward (R)
  6. Front Counter Clock Wise (F')
  7. Right Forward (R)
  8. Back counter clock wise (B'), 2 times
  9. Right Forward (R), 2 times
  10. Back counter clock wise (B'), 2 times

You will have to do this in a loop until the goal is obtained.

Summary

Finally the algorithm goes like this

# Stage 1 : Solve for 3 colors
while NOT ( you have all white solved ) {
	#Apply formula
	R' D R D'
}

# Stage 2 : Solve for Top Row
while NOT ( you have all sides for white is solved ) {
	#Apply formula
	R' D R L' D' L R' D R
}

# Stage 3 : Solve for Bottom
while NOT ( you have yellow solved on bottom ) {
	#Apply formula
	R U R' U R Ux2 R'
}

# Stage 4 : Last Stage
while NOT ( you have the puzzle solved ) {
	#Apply formula
	R' F R' B'x2 R F' R B'x2 Rx2 B'x2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment