Rubik's cube algorithms

Rubik's cube algorithms are short, fixed move sequences that do one job, like turning a corner or swapping two edges. Start here: the 16 cases of the 4-look last layer are below, each with a diagram and a 3D cube that plays it.

What a Rubik's cube algorithm is

A Rubik's cube algorithm is a sequence of turns that changes a few pieces in a known way and leaves the rest of the cube as it was. You do not need to see why it works: you recognize the case, hold the cube the right way and do the moves. Every method uses some, from the beginner method to the methods speedcubers use.

Algorithms are written in cube notation: R, L, U, D, F and B turn the right, left, up, down, front and back face a quarter turn clockwise (as you look at that face), a ' means counter-clockwise and a 2 a half turn. Lowercase letters turn two layers, M is the middle slice, and x, y, z turn the whole cube.

Every algorithm here is tested. Each one was replayed move by move on a virtual cube: starting from a solved cube, undoing the algorithm must give exactly the case it is listed under, with the rest of the cube untouched, and every alternative must solve the same case. The case lists were also checked for completeness by listing every possible position of the pieces involved, so no case is missing and none appears twice.

The beginner set

The beginner method solves the cube layer by layer with seven short algorithms, and you can paint your own cube there to get a walkthrough. It is the best place to start if you have never solved a cube.

The 4-look last layer

The next step up is the 4-look last layer, the set shown in the tool above: 2-look OLL plus 2-look PLL, 16 cases in four steps. It is a common bridge from the beginner method to CFOP.

StepCasesCount
1. Yellow crossLine, L shape, dot3
2. Yellow cornersOLL 21 to 27 (Sune, Antisune and five more)7
3. Place the cornersHeadlights (T perm), no headlights (Y perm)2
4. Place the edgesUa, Ub, H, Z perms4

Then grow each step into the full sets: all 57 OLL algorithms turn the last layer yellow in one look, all 21 PLL algorithms finish it in one more, and the 41 F2L cases speed up the first two layers.

Famous algorithms

The sexy move, R U R' U', is the most common trigger in cubing: it appears inside many OLL, PLL and F2L algorithms. Repeat it six times and a solved cube comes back to solved, as you can watch here:

The sledgehammer, R' F R F', is the other common trigger, and six repeats also bring the cube back. The Sune, R U R' U R U2 R', twists three corners of the top layer (moving some top pieces along the way) and is OLL 27; it too returns a solved cube to solved after six repeats. The T perm, R U R' U' R' F R2 U' R' U' R U R' F', swaps two corners and two edges and is used both in 2-look PLL and in blindfolded solving.

Practice and timing

Use Practice these cases above to drill recognition: a random case appears on the 3D cube and the timer runs until you press Done. Mark cases as learned to focus on the rest; the marks are shared with the OLL and PLL pages in this browser. Time full solves with the cube timer, and if you get lost, the cube solver solves any position.

Sources: Speedsolving.com wiki: PLL; Speedsolving.com wiki: OLL. Rules checked . Found a problem? Tell us.

Questions

How many algorithms do I need to solve a Rubik's cube?

The beginner method on this site uses seven short algorithms. The 4-look last layer uses 16 cases, and full CFOP uses 57 OLL plus 21 PLL algorithms (78), with F2L usually solved by understanding rather than memory.

What is the easiest algorithm to start with?

The sexy move, R U R' U'. It is four moves, it is part of the beginner method and of many advanced algorithms, and six repeats return the cube to where it started.

What is the 4-look last layer?

The last layer solved in four steps with 16 algorithms: yellow cross (3 cases), yellow corners (7), corner positions (2) and edge positions (4). It is 2-look OLL plus 2-look PLL.

Why do the algorithms on this page not work on my cube?

Check the hold: yellow on top and green in front, as in the diagrams. Then check the notation, especially ' (counter-clockwise as you look at that face). Press Play on a card to compare with the 3D cube move by move.

What is the difference between an algorithm and a method?

A method is the plan for the whole solve, such as the beginner method, CFOP, Roux or ZZ. Algorithms are the move sequences a method uses for its steps.