Show HN: Test your shape rotation skills (opens in a new tab)0xf00ff00f.github.io
659 pointsHi all, hope someone enjoys (or not) my weekend project. See how many matching pairs you can find in two minutes.
This is written in C++ and built to WebAssembly with Emscripten. The code is at https://github.com/0xf00ff00f/rotator
Comments (195) 98 threads
Earlier commentsObviously you should not be rotating, but finding features of the shapes that are invariant with respect to rotation to calculate. We can think of the two middle segments as defining two coordinate axes which I'll just call the body, with the remaining segments the legs. There are three cases. 1) both legs coplanar with body: W, question mark, and O. 2) neither leg in the plan of the body: The lightning bolt, and the forklift. 3) one leg coplanar with body: Z with leg, Hook with leg.
Unfortunately, the lightning bolt, Z with leg, and Hook with leg are all chiral, (and are therefore more likely to appear, reducing the effectiveness of this heuristic), but just guessing among matching classes is sufficient to get 20 matches. A quick test of chirality could maybe do better, but I suspect it's most just about speed of guessing after this.
edit: 32 is my high score after playing for an hour. Which is at least higher than the brute force clicker guy's score, so I feel like I can be done. The human brain is very good at optimizing its solutions to this problem.
The snake cube puzzle [1] is a puzzle where you have to fold up a string of 27 cubes, with fixed "turns" like the shapes in the OP, into a 3x3x3 grid.
The goal was not to find a solution to the puzzle, but to find the smallest 2d area the snake could fit into without folding against itself. It turned into a modeling problem (how do you represent the puzzle in code?) and a recursion problem (try all possible folds), but, uh, even with a physical puzzle to play with, it was a little too abstract
A commenter on the link below asked another question over 13 years ago: can the puzzle be folded into a plane without any holes? Obviously if you just lay out the puzzle from end to end it will be in a plane, and without any holes, so maybe the question should be: what is the smallest 2d area the snake can fit into without creating any holes?
[1]: https://mypuzzles.wordpress.com/2008/09/07/the-snake-cube/
It would also be good to have increasing levels of difficulty. Eventually you could add a leaderboard.
As a side note, it's fun to see the amount of humble-bragging going on in the thread right now ;))
All comments shown.
Couldn't load more comments. Check your connection and try again.