Questions tagged [rubiks-cube]

Rubik's Cube is a 3-D combination puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik.

Rubik's Cube is a 3-D combination puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. Originally called the "Magic Cube", the puzzle was licensed by Rubik to be sold by Ideal Toy Corp. in 1980 via German businessman Tibor Laczi and Seven Towns founder Tom Kremer, and won the German Game of the Year special award for Best Puzzle that year.

Source: Wikipedia (Rubik's Cube)

128 questions
70
votes
13 answers

How would you represent a Rubik's Cube in code?

If you were developing software to solve a Rubik's Cube, how would you represent the cube?
Mendokusai
  • 1,313
  • 2
  • 16
  • 20
28
votes
7 answers

Easiest to code algorithm for Rubik's cube?

What would be a relatively easy algorithm to code in Java for solving a Rubik's cube. Efficiency is also important but a secondary consideration.
kokokok
  • 459
  • 3
  • 9
  • 14
16
votes
16 answers

Simple 3D graphics project?

I'm looking for some good ideas for a simple 3d graphics program as my final project for an intro to computer graphics class. As for some background information, we'll be using opengl and will have a little over a month to work on it, so nothing…
Bryan Denny
  • 27,363
  • 32
  • 109
  • 125
8
votes
5 answers

Marker Recognition on Android (recognising Rubik's Cubes)

I'm developing an augmented reality application for Android that uses the phone's camera to recognise the arrangement of the coloured squares on each face of a Rubik's Cube. One thing that I am unsure about is how exactly I would go about detecting…
8
votes
2 answers

Using Dictionaries in Python in place of Case/Switch statement

I want to randomize a rubik's cube that is initialized as complete (all colors on the correct sides). I have move functions that rotate the cube. I want to randomly pick 50 functions in a row to properly randomize it. I am doing this project to…
d d
  • 181
  • 1
  • 3
  • 14
6
votes
3 answers

Rubik's cube genetic algorithm solver?

Is it possible Rubik's cube to be efficiently solved by genetic algorithms? What kind of chromosome encoding should be used? How the crossover and mutation should be done? I am using this model of the cube: #ifndef RUBIKSCUBE_H_INCLUDED #define…
Todor Balabanov
  • 376
  • 3
  • 6
  • 17
6
votes
2 answers

Solving Rubik's Cubes for Dummies

Mr. Dum: Hello, I'm very stupid but I still want to solve a 3x3x3 Rubik's cube. Mr. Smart: Well, you're in luck. Here is guidance to do just that! Mr. Dum: No that won't work for me because I'm Dum. I'm only capable of following an algorithm like…
Frank Bryce
  • 8,076
  • 4
  • 38
  • 56
6
votes
1 answer

Algorithm for solving NxNxN Rubik's cube

I want to write cubesolver for Rubik's cube of any size. I know the way how cubes bigger than 3x3x3 can be solved: First we need to solve the center (flat) fields of cube, so they will look like at the picture. Second, we solve the edges: And…
Firzen
  • 1,909
  • 9
  • 28
  • 42
5
votes
2 answers

OpenGL rubiks cube - face rotation with mouse

I am working on my first real OpenGL Project. It is a 3x3x3 Rubiks Cube. Here is a link to a simple screenshot of what i have so far(my rubiks cube) Rotating the cube is done with dragging the mouse while holding the right mouse button. This works…
VanillaBear
  • 63
  • 1
  • 4
5
votes
1 answer

Heuristic Function for Rubik's cube in A* algorithm Artificial Intelligence

So I am trying to solve a Rubik's Cube by different algorithms using C++. I have tried the Iterative Deepening Search (IDS) and got it right but now I am stuck at A* algorithm. I have done some research and found that 3D Manhattan distance for…
5
votes
1 answer

How to create a pattern database for solving Rubik's Cube?

I'm trying to implement Korf's algorithm for solving 3x3x3 Rubik's Cube. Part of the solution is to create a pattern database. This is quote from the paper that contains, literally, the whole information on how to do it: Using a breadth-first…
ptyshevs
  • 1,602
  • 11
  • 26
5
votes
5 answers

Solving Rubik's cube programmatically

I am trying to develop a program for solving a Rubik's cube in C. I used back tracking technique for this. It is a very long process and it takes lot of iterations, so I'm not able to solve it. Please give me suggestions on how to solve this more…
Aravindhan
  • 15,608
  • 10
  • 56
  • 71
4
votes
1 answer

How to represent a Rubik's cube

I want to know how we can design a rubics cube in mathematica .Is it possible and how can we go with it. how can we decide the different separation of the smaller cubes on the 6 faces of the cube .
4
votes
1 answer

How to add listeners to Swing components in Scala?

I'm trying to implement the MVC design pattern in a Rubik's cube Scala application. In Java, I would do this by adding an ActionListener to the buttons with the listeners in the controller class. In Scala, I've found this extremely difficult. Can…
oscar
  • 41
  • 1
  • 2
4
votes
2 answers

How to find orientation of rubik cube?

I'm trying to make a rubik cube game in webgl using three.js (you can try it here). And I have problems to detect on witch axis I have to rotate my cube according the rotation of the cube. For instance, if the cube is in original position/rotation,…
1
2 3
8 9