Hacker News new | past | comments | ask | show | jobs | submit login
2D Rubik’s Cube solution visualization (twitter.com/jagarikin)
275 points by iamben on Nov 23, 2022 | hide | past | favorite | 65 comments



Someone linked [1] an interesting tool in the replies: MagicTile - Geometrical and Topological Analogues of Rubik's Cube - http://roice3.org/magictile/

"If you want to try solving the Rubik's Cube this way, you should try @roice713's MagicTile. You can choose the Rubik's cube among hundreds of puzzles. The stereographic projection makes it look like the animation in this post."

[1] https://twitter.com/mananself/status/1595132523264167936


> The stereographic projection makes it look like the animation in this post.

Couldn't be further from the truth. The image in the tweet is a huge improvement over the stereographic projection.


It is the same thing, with two tiny changes:

1. different-size projected squares are replaced with same-size circles

2. the tweet's image puts the north pole on a corner; the projection on the upthread link puts the north pole on the face.

Keeping the corner at the north pole does make it easier to understand, but it's still a stereographic projection.


https://github.com/HactarCE/Hyperspeedcube enables you to solve 4D cubes, the exploded visualization is standard but I think it is pretty cool

here is it in action https://www.youtube.com/watch?v=FCvn9-JvXgY&list=PLKwXjCUFqO...


Mathologer video going in depth on MagicTile and Rubik's cube variants like Kleij Bottle.

https://www.youtube.com/watch?app=desktop&v=DvZnh7-nslo


As someone who as held national records in the sport of speedcubing, I don't feel this makes it easier to understand, at least if you are going for an instrumental understanding of how to solve it. I think the community are pretty good at teaching that now! But it does look extremely cool.

My favourite one-liner for improving understanding is something roughly like 'solve areas made of pieces, not faces made of stickers'. Very much clearer when you have a cube to take apart and put together in the order you would solve them.


My feeble record is just under one minute. But I spent a lot of time thinking about how to represent the cube in a computer. Yes think pieces, not stickers. But for a long time I thought pieces had position and orientation. More recently I noticed that if we imagine each piece of a solved cube being connected to the cube center (an imaginary extension of the piece) it becomes clear that rotation is the only real freedom, and if a piece is in the correct orientation it is automatically in the right position! The reverse is not true of course.

I don't think this is helpful for humans solving, but for computers it largely takes position out of it. Position does determine which pieces are rotated by any given move though.


Agree with you completely - I can't see how this would help me, but it's very cool to watch!

And congrats on the records! I've managed to get just below the minute mark a handful of times and remain in complete awe of anyone sub 60 seconds!


Thank you, very kind. I myself am in awe of the current best solvers, the difference between my previously world-class average and the records now is massive.


Was trying to make sense of that solve, but couldn't see any algorithmic thing happening. Either that's the craziest method I ever saw, or it's just a reversal of a random scramble.

Regardless, none of that takes away from the nifty 2D projection technique!


There are algorithms that are more efficient than the typical speed cubing methods, but are based on large amounts of computation, rather than pattern matching, thus unfit for humans.


I guess you mean efficient in that they produce a shorter (or even the shortest) sequence of moves to solve a given scramble. But if it takes 5 minutes of computation to produce the solve, then in practice they are not yet very efficient.


By computation in this case I mean evaluating the state of the cube after a series of moves. It’s extremely difficult for a human, but a computer can simulate millions of moves in a fraction of a second. So realistically, any modern computer can find a low rotation count solution to any scramble almost instantaneously.


it depends how much you value a move, vs a computer instruction.

Get a faster computer and a larger cube, the trade-off is likely worth it. A rubik's cube isn't such an intractable problem, I doubt a computer can't solve it faster than a human: in the worst case, they can rely on the same algorithm. Then, they can try to find shortcuts or just shorter paths.

I always thought minimizing the number of moves was the goal, hence "more efficient" made sense to me too.


If it depends on large amounts of computation, how can it be considered more efficient? If it's precomputed, then it's again pattern matching. If by algorithm you mean the sequence of rotations, then yes there is a small upper bound that speedcubers typically exceed in solving any specific randomization. [I never liked that some call a fixed sequence of moves an algorithm.]

Rubik's Cube solution unlocked by memorising 3915 final move sequences[0].

> For the first time, a speedcuber has demonstrated a solution to the Rubik’s cube that combines the two final steps of the puzzle’s solution into one

[0] https://www.newscientist.com/article/2334632-rubiks-cube-sol...


> If it depends on large amounts of computation, how can it be considered more efficient?

More efficient in terms of rotations necessary to solve the cube.


I also wondered the same and could not recognize any of the normal speed cubing methods.


If I understand it correctly, this visualization does not take into account the constraints of some faces being physically tied to each other, by being on the same cube. So, while it can show the process of solving cube, it is not a replacement for the cube (i.e. you can't use it as a simulation to try to figure out new algorithms)


It does, but not elegantly: when a non-slice move is made, you have to rotate the 3x3 group at the center. You see it in the animation.


The corners appear as triangles in the figure. I counted all the triangles I could find and was confused because I only saw 7. But then I realized the 8th is around the outside of the whole figure!


I saw this on Mastodon three hours before the $8Chan link was posted here.

https://piaille.fr/@Mnaudin/109389968985022395

It's a really poor representation, for specific reasons:

- it doesn't convey how the corner and edge colors are constrained into moving together, due to being mounted on the same cube piece.

- doesn't convey how the center face pieces stay in place relative to each other.

- certain rotations "cheat": the dots dance around, not staying on their orbit tracks.


But the actual 3D Rubik's Cube is also a really poor representation, because at all times you can only see at most half of the cube. I guess the point of making a 2D representation is to correct that problem. I can much more easily superimpose the missing connections you have mentioned in my mind's eye onto this 2D representation than I can remember the 3D layout of the half of the cube I can't see. Not everyone's brain works that way, but mine does.


on a similar note, you can get yourself a 4D rubiks cube (projected into 3D)

It is not a 3x3x3x3 but 2x2x2x2.

It looks like Melinda (the inventor) have made them easier to obtain. back when I got one, 3D printed parts, magnets, and coating all came from different sources, but absolutely worth it, they are very unique and work well.

link: https://superliminal.com/cube/2x2x2x2/


Thanks for the link!

I'm now on the waiting list for the next batch (couple of weeks to months), and apparently the new injection moulded version is way better, and a lot cheaper!


yes, that is a good saving, The 3D printed plastic by itself is around USD 140, and the magnets around 40.

Here are the links I used back in 2018:

https://www.shapeways.com/product/965KNUESR/melinda-s-2x2x2x...

http://www.gaussboys.com/store/index.php/catalogsearch/resul...


too late back here to edit, so just another post to share another implementation of 2x2x2x2 I have come across:

https://github.com/roman-tershak/4DMC-Model

https://www.youtube.com/watch?v=7L0vkK_z0gM


Cube solving is a path finding problem.

The way to learn path finding problem is to understand how your actions move you through the space you're navigating.

One of the most effective ways to learn these relationships is to work backwards.

Starting from the goal, take a step away, then step back. Then take two steps away, then those steps back. Then take different steps away and steps back.

As you move farther and farther from the goal you get an explosion of options that quickly requires deduction of strategies over memorization of all paths back to the goal.

This can help ground learning the well known techniques for cube solving.

This visualization might help with that process, but just playing solutions from start to finish (IMO) doesn't.


I found it somewhat fun to think of it in terms of permutations. https://taeric.github.io/cube-permutations-1.html is where I started with the idea. Never went too far with it, sadly.

I do have my own 2d view of the rubics cube there. Was fun to watch the squares jump around. :D


It's a spectacular visualization, kudos to the author. However, I'm not sure it made it particularly easier to understand, although I know that is subjective.

Something that helped me was [1]. It took me from being someone who could not solve at all, to actually being quite good-- in the 13-20 second range. The beginner method listed on the site can easily put you in the sub-minute territory.

[1]: http://badmephisto.com/


I like this guy:

> Q: I Added you as a friend but you didn't accept. WHY DO YOU HATE ME?

> A: I dont accept any friend invites. But maybe I still hate you, who knows?


You'll like him even more if you know who Andrej Karpathy is, as they're the same person.


This is so beautiful. Changing dimensions is often mind boggling even though it makes sense.


4DToys is a VR game where you can "physically" play with 4D objects - as a 3D being of course, so you only get so see and touch one 3D slice, but the object is free to move in 4D (there's an actual 4D physics engine). There's something out of this world to hold a 4D cube in your hand and rotate it. You also get a software cursor to move yourself along the fourth spatial dimension.


I never wanted to learn how to solve it, because finiding my way to solve it is the game. who's like me?

I bought a rubik's cube when my son was born, because I wanted something to play that was not my phone while he was on my lap. 3 years later I'm able to complete one face in like 5 min consistently. still a long way to solve it, new techniques to discover and hours of play in sight. yay!


It's a huge leap to get past the first layer. Your curt rate of progress suggests that your strategy will not solve the cube in your lifetime.

And it's almost impossible to do it without taking notes on paper or computer. (If that were doable, their wouldn't be so many walkthroughs). Solving the cube is a hard applied group theory "homework" problem.

This video explains the principles of solving a Rubik's cube on your own.

https://www.youtube.com/watch?app=desktop&v=-NL76uQOpI0


It's still fun once you learn how to solve it. But fun in a different way.

You're treating it as a puzzle to solve. But once you learn how to solve it, it ceases to be a puzzle and it becomes a really fun fidget toy. Seeing how fast you can solve it is enjoyable and gives your fingers some great dexterity exercise. I have one on my desk and when I want to take a break from coding I'll scramble it up and fidget around with it for a bit.


Actually, solving the cube is just the beginning of the game.

If you are interested in optimizing, there are an infinite numbers of axes you can work on to solve faster.

First, there are several general approaches, although realistically, only two (CFOP, Roux).

Each of these methods have phases which you can practice and improve on separately, A lot of them require simple memorization (muscle memory for the most part) but all of them at some point contain a certain level of intuition and pattern recognition (e.g. lookahead), and for that, the only limit is your brain.

It's a fascinating puzzle with neverending interest, at least for me (I solve in average around 25 seconds).


Given that you can solve the top layer, there is a really nice hack that lets you work out the rest of the puzzle. Say your top layer is completely solved, except that one of the top side pieces is flipped 180 degrees. You know a sequence of moves that will fix that piece, to solve the top layer. If you do that sequence and then run the same sequence backwards, you will get the cube back to the same place, first with that side piece fixed, and then rotated 180 degrees again. But here is the trick: Before you run the sequence backwards, rotate the top! You will restore the cube exactly to where it was, except that now TWO of the top side pieces will have been flipped 180 degrees! This is referred to as a commutator operation, and is what Ryan Heise explains. Variants of this trick will let you rotate two corners in opposite directions, and re-position two top pieces and one bottom piece. One last thing: when solving the bottom layer, you may find yourself unable to re-position cubies into place using 3-way moves. Just rotate the top layer 90 degrees and you will then be able to proceed to completion.


this should have come with a spoiler alert


The [Heise method](https://www.ryanheise.com/cube/heise_method.html) is essentially that, but formalized. No algorithms to memorize, just understanding how the cube works and using that to solve it.


I found my way to solve the Rubik cube thirty years ago. I still can solve the cube in between 5 and 10 minutes. My way of solving is not the fastest. Sometimes I have to repeat the last sequence six times and this takes a long time. But I know that my way is mine and only mine, and this makes me happy.


This comment got upvoted to 1970 and this is my birthday year. Thank you.


another 2D visualisation of the rubiks cube that is popularly used for computer simulation speedsolving is qcube[1]

despite not being able to see all sides of the cube, it's surprisingly easy to solve on, as you essentially see the same stickers that you would in real life.

there is even an IRC based version!

[1] https://mzrg.com/js/qcube-v2.html


How does it work? I couldn't understand keyboard controls.


here's an image of the keymap: https://cube.garron.us/keyboard_layout/files/heise_simulator...

and an explanation of the notation: https://jperm.net/3x3/moves



Kind of reminds me of playing the 4D Rubik’s cube


How is this easier to understand? And is the Rubik's Cuber hard to understand at all?

You got 26 cubes in 3D space that need to go to their correct locations. They can move in 3 axis. They are color coded for recognition.

I think anyone is able to solve the first 2 layers intuitively. Just start by following one of those 26 little cubes and see how it moves about.


Exactly this. It's not just rubik's cubes, it's also very easy to, for example, use just a few lines of bash to implement a stable, featureful sync tool like dropbox. Everyone's always making things seem more complicated than they really are.


I genuinely can't tell if you're being sardonic here. This being HN, I guess I have to assume you're being earnest.


Mentioning Dropbox is the key to it being sarcastic.

Like someone saying “less space than a nomad. Lame.”


yep sorry, the Dropbox reference is a long-standing HN inside joke about comments like these. You can probably search to find the whole history of this reference, it's rather amusing.


long-standing HN inside joke

It's more of a worn-out trope by this point and better skipped. Just sneerfully flag lame comments.


I know the meme, which is why I was wondering, haha :) It's also the sort of thing that could've been meant entirely sincerely, in line with the comment of the person you were responding, being particularly painful to me as I've always had a massive mental block with Rubiks Cubes!

Dark [Rubik's] Magic that they are.


Er... what? I don't understand how this is related at all. And yes, I know about the famous Dropbox HN comment.

I agree with the other commenter that a normal 3D cube feels much more intuitive and simple. I guess it's just personal preference/thinking style.


I'm sure it was just a typo but in case it confuses somebody reading your comment: 27 cubes, not 26 :)


The cube in the center doesn’t exist


Then it was me who was confused, thanks for the correction :)


It exists. (Well, as a matter of the mechanics of the physical object, there is no center cube, but the other parts aren't cubes either.)

But it is not one of the cubes that need to go to their correct locations. The center cube is not moved by any operation on the cube; it is always in its correct location.


Center cube is not moved, but it is rotated. However, since it does not have any colored faces then it's rotations are meaningless.


If the cubes have correct locations, none of them need to have colored faces. The location is enough.

(At least, that's true of the 26 outer cubes. You can't get them all into place without simultaneously aligning them correctly. I don't actually know if correct alignment of the center cube is also required, but it'd be my first guess.)


That's provably false - I witnessed it many times when solving the cube myself. Colored faces determine orientation, in addition to location. In the Rubik solving method that I know (a simple method for amateurs, not remotely close to professional speed cubing methods) there's actually a late stage where ALL the cubes are in their correct locations, except some of the third layer corners might have a wrong orientation - there's a dedicated sequence of turns that allows to solve that.


By the same logic, there are 6 more invisible cubes, 1 above each face. Where does it end?


The center cube is obviously part of the mental model of the cube, the Platonic object that the physical object is supposed to represent.

Nobody believes there are invisible cubes outside the Rubik's cube. That's not the same logic; that's you trying and failing to imagine a problem with the idea that cutting a cube into three parts along each of its three axes will generate a hidden central subcube.


The cube in the center would beg to differ.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: