Lurker News
Hi 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 comments
ouid1 reply#
20 matches is my high after spending 20 minutes with it. I think I could probably get that to 30 ish with another hour.

Obviously 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.

ak391 reply#
First attempt is 5. But anxiety levels were sky high. Throwback trauma.
sizzle#
Giving me some anxiety from having to rotate molecules in my mind during organic chemistry exams
CodeIsTheEnd1 reply#
This reminds me of a very poor interview question I asked a couple of times (and then never asked again because it is a terrible, terrible, interview question).

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/

orthoxerox#
27x1 would again be the smallest 2d area.
leto_ii#
I would suggest also adding some sort of error counting into the mix (perhaps allowing 3-5 lives in total, maybe with bonus lives if you're fast or you get it on the first try). Right now it's a bit too easy to semi-brute force shapes that are somewhat similar.

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 ;))

cousin_it#
Thanks a lot for making this! Really exciting and difficult game, makes my mind tired. I just got 16 several times in a row, seems like that's my level, will try tomorrow to see if it improves after sleep.

Load more comments