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

whatshisface5 replies#
Sometimes the initial rotation hides a part of the shape.

Also, I have always wondered if there's a way to translate these shapes to strings for quick "mental algorithm" matching. Something like, "5, left turn, 3, right turn..."
I guess you'd need a normal form. The first turn can be defined as always "right" or "left," and subsequent turns can be right, left, up or down. The first turn that's "up" or "down," can be defined as "up." That leaves two ways to read any shape, but that's an uhh constant-factor overhead. :)
(I can't think of a way to define a normal form reading direction that wouldn't involve potentially reading an arbitrary distance in before having to re-start the other way.)

musingsole#
I think that's basically what I did, just without elevating the forms to anything conscious. By the end, I was matching shapes too fast to have actually counted much of anything -- some sort of consolidated memory had started.
akomtu2 replies#
A small improvement: use a vowel to encode turns, and consonants to encode segment lengths. So each shape would be encoded by a "word", e.g. "bakitux". Brains have dedicated "word-processing units" and those are much faster than number-processing units.
Teever#
> Brains have dedicated "word-processing units" and those are much faster than number-processing units.

*In most people.

biomcgary#
Abstracting into words will lead to invention of words that are disconnected from the underlying geometry (i.e., shapes that are not possible due to collisions), but have strong verbal associations. Eventually, the word thinkers will redefine the system to allows them to play word games without dealing with the pesky geometric limitations.
crdrost3 replies#
> The first turn can be defined as always "right" or "left,"

No it can’t, not in 3D... it is just a turn.
You can however choose to rotate about the first segment until the turn is Right, then use this orientation for the rest.
In terms of normal form and restarts, who cares? Just generate the string both ways, it’s 2n computations, choose the lowest in lexicographic order, and life is good. If you get to billions of turns are humans really going to be doing the comparison? Surely we’d just stream the string into a hash function or something...

whatshisface1 reply#
Right-handed rotation is different from left-handed rotation no matter what coordinate system you choose.
crdrost#
WLOG the shape starts at the origin (0,0,0), the first kink is at (0, 0, m), and the next point is (x, y, m), where x²+y²=n²

You can always rotate this to (n, 0, m) and view from the +y axis looking down, and it is a right turn.
The L shape is not complex enough to be chiral, but the post is (and you are!) is claiming that you need an extra bit of information to specify “which L, the right handed one or the left handed one?” ... That is a distinctively 2D question.

emschlr#
The keyword is "define"!

You can just define the first turn to be Right no matter how it is oriented.
If you are not happy with that then just rotate the first segment until it looks Right to you. Then label the other turns.
If you are still not happy with the word Right to denote the first term then just make up new notation. Define the first turn to be 1. Use numbers to denote turns if you object to using Left and Right.

kuhewa#
> No it can’t, not in 3D... it is just a turn

Not if it is chiral. then whatever turn is defined as right is not left

djtango#
>Also, I have always wondered if there's a way to translate these shapes to strings for quick "mental algorithm" matching. Something like, "5, left turn, 3, right turn..."

I was once measured to have abysmal spatial reasoning (which is probably backed up by poor hand-eye coordination and sense of direction) but I had no problem doing molecular geometry and group theory, I suspect it was because I applied logic rather than visualisation to compensate. (I am terrible at walking into an empty place an imagining how I might want to fill it)

bottled_poe#
Playing on mobile, it would be cool if the accelerometer rotated all the pieces at once.
barrkel2 replies#
IMO this would be more enjoyable if the shapes were more different morphologically, and fewer (ideally no) close pairs which differ only in the length of a segment by a single block.

After the first couple of wrong guesses (though I'm pretty sure one guess was correct - could be the bug https://news.ycombinator.com/item?id=30408567) I started to count segment lengths rather than relying on mental shape rotation.

2muchcoffeeman#
I don’t think it’s a bug. I resorted to some guessing because I saw shapes that were similar but different only by length. But the view was obscured so I couldn’t count the blocks.
_3u101 reply#
Using less strength in your solving algo is a peak shape rotator skill. It’s yet another kobyashi Maru incident.
emschlr1 reply#
IIRC Kobyashi maru incident involves a no-win situation where you change the rules of the game to create a winning situation. How are we looking at a Kobyashi maru incident here? Can you explain?
_3u101 reply#
Shape rotation is often used as a proxy for G.

The shapes generally progress in difficulty until they are deemed “impossible” for any human shape rotator to figure out.
If you reduce the problem to counting instead of shape rotation (3D matrix multiplication) many humans can “shape rotate” to impossibly high levels of IQ

Continue this thread — 1 reply

exikyut5 replies#
A totally different style of game which also seriously stretches spatial reasoning: https://vladimirslepnev.itch.io/zigzag

Inspired by Super Hexagon (remember that?), you need to repeatedly tell a "snake" which way to go with the left and right arrow keys... while the game viewport twists and rotates randomly as it continually zooms out.
GoOd lUcK.
(It's from here, 1 month ago: https://news.ycombinator.com/item?id=29923707)
I incidentally find I have to mute the background music, as I really get into it (used to listen to it often!) and zone out... welp
(Also, for completeness - the APK link is sadly dead, but it still lives on on the scary APK sites that are out there, and my phone doesn't seem to mind it.)

typon#
This make is making me feel really stupid
jonnycomputer#
zigzag is pretty wild. A kind of reversal task.
jck#
Thanks for this. I was a huge fan of super hexagon and enjoyed this too.
jck#
Much like super hexagon, I found that "turning my mind off" and going on instinct/intuition is a surprisingly good strategy for this game - till it isn't.
svet_04 replies#
Small bug: occasionally there are multiple matching pairs, although only 1 works (screenshot: https://ibb.co/JpRp0Pm)

Additionally, the auto rotation itself is mostly confusing, could be better to enable manual mouse rotation.
Cool game nonetheless!
Edit: The bug seems to be that shapes with different "DNA" can still be isometric in some cases: https://github.com/0xf00ff00f/rotator/blob/master/demo.cc#L4...

phreeza1 reply#
I encountered the same bug and it was also a donut kind of shape, maybe something to do with the closing of the loop?
svet_0#
Probably. L-U-R-D is the mirror of R-D-L-U but not the mirror of L-D-R-U, although isometric to both.
0xf00ff00f2 replies#
Ouch. Thank you so much for noticing this! Looks like I need a more robust test.
blamestross1 reply#
Ismorphism is hard to detect, even in reduced spaces. Really hard in arbitrary graphs.

For a "fast filter" generate the center of gravity for each (just the average of the voxel points as doubles) and abs+sort the resulting vector and assume they match if the "Sorted Cog Vector" matches. It will have false positives sometimes but no false negatives.

0xf00ff00f#
Great suggestion, thanks!
cptskippy#
Ok so I'm not crazy. The shapes moving had me second guessing myself trying to compare them.
0xf00ff00f1 reply#
Hey, this should be fixed now. Thanks again!
0xf00ff00f#
I feel stupid. Now it should be fixed, for real.

Thank you!

Load more comments