The Rubik's Cube celebrates its 50th anniversary this year. The goal of this hackweek project is to understand the IDA* (the star is part of the name - not a link to a footnote) algorithm that can be used to find an optimal solution for any (valid) starting condition of a Rubik's cube. The IDA* algorithm also has other applications, e.g. 15-puzzle and pathfinding. I read one paper [1] about it but unfortunately did not understand it well. In any case it is once again graph theory (it is always graph theory if you look at a problem long enough).

Sure there are already implementations of it, e.g.:

https://github.com/Jai0212/Rubiks-Cube-Solver-Using-IDA-Star/

The next hackweek projects are kind of preset already:

  1. Detect cube condition via camera

  2. Build robot to solve real physical Rubik's Cube

[1] https://www.cs.princeton.edu/courses/archive/fall06/cos402/papers/korfrubik.pdf

Looking for hackers with the skills:

rubik puzzle ida*

This project is part of:

Hack Week 24

Activity

  • 4 days ago: PSuarezHernandez liked this project.
  • 9 days ago: aschnell liked this project.
  • 9 days ago: aschnell added keyword "ida*" to this project.
  • 9 days ago: aschnell added keyword "puzzle" to this project.
  • 9 days ago: aschnell added keyword "rubik" to this project.
  • 9 days ago: aschnell started this project.
  • 9 days ago: aschnell originated this project.

  • Comments

    • aschnell
      3 days ago by aschnell | Reply

      So the IDA* algorithm looks more clear now. It finds the solution by iterating the "game tree" but concentrates on the "best" path on every iteration. This is done using a heuristic.

      BTW: Back then test research papers were considered part of artificial intelligence so I'm also doing AI after all.

    • aschnell
      2 days ago by aschnell | Reply

      I have looked at various programs implementing IDA* based solvers. Many are unfortunately unfinished, broken and undocumented.

      The best so far is https://github.com/benbotto/rubiks-cube-cracker. Among other things it properly implements the index to the pattern databases while other programs seem to simply use a hash. It also gives speed measurements: It is really slow (several hours and more). The Korf IDA* solver is apparently still so slow.

      That made me think what the online solver at ruwix.com uses since it usually finds a good solution (never had more that 20 moves) in less than a minute. Maybe it uses another approach called the "Two-Phase-Algorithm" (https://kociemba.org/cube.htm). That also used IDA* but combines it with some group theory.

    Similar Projects

    This project is one of its kind!