Questions tagged [rubiks-cube]

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

Filter by
Sorted by
Tagged with
15 votes
2 answers
2k views

Shortest Algorithm* That Generates a Harlequin Pattern

What is the shortest sequence of moves that, from the solved state of the cube, creates a pattern that meets the following criteria: 6 colors on each face at most 2 facelets of the same color no ...
q-l-p's user avatar
  • 293
7 votes
2 answers
303 views

How many twisted corners?

Your challenge is to output the number of twisted corners given a 2x2 Rubik's Cube scramble. For the purpose of this challenge, twisted corners are defined as corners where the colour of the top/...
math scat's user avatar
  • 8,463
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 ...
tybocopperkettle's user avatar
11 votes
8 answers
673 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 ...
bigyihsuan's user avatar
  • 8,538
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 ...
qwr's user avatar
  • 11.5k
19 votes
21 answers
2k 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: <...
qwr's user avatar
  • 11.5k
17 votes
2 answers
664 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 ...
caird coinheringaahin g's user avatar
22 votes
7 answers
3k 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 ...
jimmy23013's user avatar
  • 36.9k
37 votes
21 answers
9k 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 ...
Kevin Cruijssen's user avatar
0 votes
0 answers
109 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, ...
Conor James Thomas Warford Hen's user avatar
8 votes
2 answers
331 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 ...
Kevin Cruijssen's user avatar
9 votes
0 answers
122 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 ...
flawr's user avatar
  • 43.7k
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 ...
Charlie's user avatar
  • 12.8k
7 votes
5 answers
777 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 ...
Kevin Cruijssen's user avatar
6 votes
3 answers
310 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 ...
MD XF's user avatar
  • 13.8k
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 ...
MD XF's user avatar
  • 13.8k
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 ...
Wheat Wizard's user avatar
  • 96.5k
13 votes
11 answers
611 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. ...
MD XF's user avatar
  • 13.8k
10 votes
2 answers
548 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,...
TehPers's user avatar
  • 1,397
21 votes
17 answers
7k 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 ...
Julian Lachniet's user avatar
17 votes
5 answers
524 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 ...
Kevin Cruijssen's user avatar
34 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 ...
Gareth's user avatar
  • 11.3k
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 ...
betseg's user avatar
  • 8,753
46 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 ...
Calvin's Hobbies's 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 ...
Geobits's user avatar
  • 19.7k
21 votes
8 answers
2k 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 ...
Jakube's user avatar
  • 21.9k
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 ...
Jakube's user avatar
  • 21.9k
16 votes
2 answers
5k 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 ...
A Frayed Knot's 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, ...
Alex Brooks's 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: <...
aditsu quit because SE is EVIL's user avatar