Questions tagged [rubiks-cube]

For challenges concerning the Rubik's Cube or variations like the Pocket Cube.

Filter by
Sorted by
Tagged with
21 votes
9 answers
2k views

Simplify Rubik's Cube Moves

Background On a Rubik's cube there are 54 moves that you can execute, for example, turn the right face anti-clockwise, or rotate the top face and the horizontal slice twice. To notate any move, each ...
user avatar
10 votes
8 answers
597 views

Expand a Rubik's Cube Commutator

Background We will be using a 3x3 cube for this challenge. Rubik's cubers have their own notation for movements on the cube: Each of the 6 faces has a clockwise turn notated with a single capital ...
user avatar
  • 3,223
24 votes
18 answers
2k views

Random Move 2x2 Scrambling

A simple way to scramble a 2x2x2 Rubik's cube is to make a sequence random moves. This is not how official scrambles are done, but can get pretty close to a uniform distribution of all possible ...
user avatar
  • 11.2k
19 votes
21 answers
1k views

Scramble a Megaminx!

Scramble a Megaminx! A megaminx is a dodecahedral version of the familiar Rubik's cube. Since 2008, the World Cube Association uses Stefan Pochmann's megaminx scrambler. The scrambles look like this: <...
user avatar
  • 11.2k
17 votes
2 answers
627 views

43 quintillion permutations

We can represent a Rubik's Cube as a net as follows (when solved): WWW WWW WWW GGGRRRBBBOOO GGGRRRBBBOOO GGGRRRBBBOOO YYY YYY YYY Each letter ...
user avatar
22 votes
7 answers
2k views

Surface of the 3x3x3 cube as a graph

Your task is to generate a graph with 54 vertices, each corresponds to a facet on a Rubik's cube. There is an edge between two vertices iff the corresponding facets share a side. Rules You may ...
user avatar
  • 36.1k
35 votes
21 answers
8k views

Amount of permutations on an NxNxN Rubik's Cube

Introduction: A 3x3x3 Rubik's Cube has \$43,252,003,274,489,856,000\$ possible permutations, which is approximately 43 quintillion. You may have heard about this number before, but how is it actually ...
user avatar
0 votes
0 answers
107 views

Compute the order of a Rubik's Cube cycle without trivially counting them [duplicate]

On a Rubik's Cube, performing a particular sequence of moves repeatedly will always return it to its original state. Your job is to figure out the "order" of a particular sequence of moves, that is, ...
user avatar
8 votes
2 answers
312 views

Execute Triangularity Move

TL;DR for those not interested: Look at the test cases at the bottom. Have a program/function that outputs the 2D list displayed for the given input. Introduction: On November 15th, 2018 puzzle ...
user avatar
9 votes
0 answers
120 views

Order of Elements of the Rubik's Cube [duplicate]

Introduction All the possible moves and their combinations of a Rubik's Cube form a group. A group in general is a set with some binary operation defined on it. It must contain a neutral element with ...
user avatar
  • 43.1k
18 votes
2 answers
9k views

Rubik-sorting a matrix (a.k.a. the torus puzzle)

The idea for this code-challenge is simple: given a matrix of integers, let's sort it by applying Rubik-style movements. This means that you can select a single row or column and rotate its elements ...
user avatar
  • 12.6k
7 votes
5 answers
752 views

Orient the Rubik's Cube

Introduction: I collect twisty puzzles, so I'm quite the fan of rubiks-cube-challenges (even though most are fairly difficult). So, let's try a fairly easy rubiks-cube-challenge for a change. When ...
user avatar
6 votes
3 answers
296 views

Of Dumps and Cubes, and Structured Nonsense

Your challenge is to translate a Cubically cube-dump to the format specified in this challenge. Input The input will represent a Rubik's Cube, formatted how Cubically prints its memory cube at the ...
user avatar
  • 13.3k
11 votes
2 answers
2k views

Solve a Rubik's Cube

Your challenge is to write a program to solve a 3x3x3 Rubik's Cube. This challenge is based on this one from 2013, rewritten to adhere to current community standards, and reposted with the original ...
user avatar
  • 13.3k
25 votes
2 answers
1k views

Is it a Rubik's Cube?

A venerated pass time of pedants is to point out that pictures of "Rubik's Cubes" (on t-shirts, posters etc.) are not actually solvable. The first thing that should be checked is that the cube is ...
user avatar
  • 89.4k
13 votes
11 answers
599 views

Sum a Cubically cube's faces

Manually summing a Cubically cube's faces is tedious and time-consuming, sorta like writing code in Cubically itself. In Most efficient cubifier, I asked you to translate ASCII to Cubically source. ...
user avatar
  • 13.3k
10 votes
2 answers
509 views

Implement the Cubically Cube

Cubically is a fairly new esoteric language capable of creating short, golf-like answers for a very specific subset of problems. It is unique in that it stores memory in the form of a 3x3 Rubik's cube,...
user avatar
  • 1,377
21 votes
16 answers
6k views

Reverse a Rubik's Cube Algorithm

Whenever you make a move on a Rubik's Cube, there is a reverse move which undoes the first move. Because of this, every algorithm (set of moves) has a reverse algorithm which undoes the first ...
user avatar
17 votes
5 answers
516 views

Determine the type of Cuboid

Introduction: I'm a twisty puzzles collector. Here you can see my current collection of ± 300 puzzles. I think everyone knows the regular Rubik's Cube (3x3x3 Cube), which is a NxNxN Cube. There are ...
user avatar
33 votes
1 answer
2k views

Totally Cubular

Create a program or function to unjumble a 9x9x9 cube of digits by rotating individual 3x3 cubes within it. This is similar to (but, I suspect, a bit harder than) my Flippin' Squares question. Input ...
user avatar
  • 11.2k
41 votes
8 answers
3k views

Simulate a Rubik's cube

A Rubik's cube has 6 colors: red, orange, yellow, white, blue, and green. Red and orange, yellow and white, and blue and green faces are on opposite sides. Net of a solved Rubik's cube looks like ...
user avatar
  • 8,703
44 votes
6 answers
3k views

There's an ant on my Rubik's Cube

A standard, solved, 3×3×3 Rubik's Cube has 6 differently colored faces, where each face is a 3×3 grid of squares of one color. The white face is opposite the yellow, the red opposite ...
user avatar
44 votes
9 answers
1k views

Cycling with Rubik's

While idly twisting my Rubik's cube around, my son noticed that it kept going back to the solved state. I'm pretty sure he thought this was some sort of voodoo magic at first, but I explained that if ...
user avatar
  • 19.6k
21 votes
8 answers
1k views

Rubik's Cube Scrambles

Your task is to create a random sequence of moves, which can be used to scramble a Rubik's Cube. Such a scramble is made up of exactly 25 moves. Each move consist of of the letters ...
user avatar
  • 21.8k
32 votes
4 answers
2k views

Identity sequences on the Rubik's Cube

A move sequence is a sequence of moves (turns) on a Rubik's Cube (for the notation look down below). Beside the empty move sequence, there are many other other move sequences, that have no effect on ...
user avatar
  • 21.8k
16 votes
2 answers
4k views

Solve the (Rubiks) Pocket Cube

Your task .. is to do what Brian Fantana apparently couldn't do, and solve the 2x2x2 Rubik's Cube. The Layout ...
user avatar
34 votes
0 answers
3k views

Rubik's Revenge [closed]

Everyone likes a good puzzle. After all, that's the basis for Code Golf and Code Challenge! What better puzzle exists than the famous Rubik's Cube? Well what else but her slightly larger sister, ...
user avatar
39 votes
3 answers
24k views

Solve Rubik's cube

Write the shortest program that solves Rubik's cube (3*3*3) within a reasonable amount of time and moves (say, max. 5 seconds on your machine and less than 1000 moves). The input is in the format: <...
user avatar