Readit News logoReadit News
Posted by u/0xf00ff00f 4 years ago
Show HN: Test your shape rotation skills0xf00ff00f.github.io/rota...
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

whatshisface · 4 years ago
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.)

djtango · 4 years ago
>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 · 4 years ago
Playing on mobile, it would be cool if the accelerometer rotated all the pieces at once.
musingsole · 4 years ago
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.
akomtu · 4 years ago
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.
biomcgary · 4 years ago
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.
Teever · 4 years ago
> Brains have dedicated "word-processing units" and those are much faster than number-processing units.

*In most people.

crdrost · 4 years ago
> 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...

whatshisface · 4 years ago
Right-handed rotation is different from left-handed rotation no matter what coordinate system you choose.
emschlr · 4 years ago
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 · 4 years ago
> 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

barrkel · 4 years ago
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 · 4 years ago
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.
_3u10 · 4 years ago
Using less strength in your solving algo is a peak shape rotator skill. It’s yet another kobyashi Maru incident.
emschlr · 4 years ago
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?
exikyut · 4 years ago
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.)

ajot · 4 years ago
Another good one is the eyeballing game, by Matthias Wandel. You have to eyeball half-distances, half-angles, center of a shape, etc.

https://woodgears.ca/eyeball/index.html

exikyut · 4 years ago
Wowch, I'm really bad :) 9.29: https://i.imgur.com/BEEqbKL.png

Thanks for the pointer!

jck · 4 years ago
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.
typon · 4 years ago
This make is making me feel really stupid
jonnycomputer · 4 years ago
zigzag is pretty wild. A kind of reversal task.
jck · 4 years ago
Thanks for this. I was a huge fan of super hexagon and enjoyed this too.
svet_0 · 4 years ago
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...

0xf00ff00f · 4 years ago
Ouch. Thank you so much for noticing this! Looks like I need a more robust test.
blamestross · 4 years ago
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.

amelius · 4 years ago
In chemistry, there is the problem of normalization of molecule identifiers that looks like this problem.

https://en.wikipedia.org/wiki/International_Chemical_Identif...

cptskippy · 4 years ago
Ok so I'm not crazy. The shapes moving had me second guessing myself trying to compare them.
0xf00ff00f · 4 years ago
Hey, this should be fixed now. Thanks again!
aimor · 4 years ago
phreeza · 4 years ago
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 · 4 years ago
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.
krick · 4 years ago
Damn, that's surprisingly difficult. But I think I shouldn't be allowed to brute-force answers (that's really tempting in the current design) and I'd probably appreciate if shapes were standing still, since the movement is distracting and barely relates to the skill being tested.
otherme123 · 4 years ago
-10 seconds if you fail a pair should work against brute force.
oneoff786 · 4 years ago
Agreed. I found by the end I was better off rapidly tapping out the answers due to no penalty for incorrect guessed
ravi-delia · 4 years ago
I think they move so that they aren't accidentally covering up crucial bits, and so you get a sense for them in 3d. I'd also like it if they moved less, or had a pause button though.
0xf00ff00f · 4 years ago
Added a time penalty on misses and an accuracy percentage at the end, hopefully this should discourage brute forcing.
ChuckMcM · 4 years ago
That's a lot of fun, I'm sure pmarca loves it :-). Initial rotation can result in feature hiding that is critical, perhaps making the wobble selectable (easy = big wobble, medium = current wobble, hard = no wobble) The follow on should be the folding one (planar surface with dotted lines, pick the folded version) I always thought those questions in IQ tests were put there so that there would be some "easy" questions that everyone got right, but found later my wife couldn't do them!
chungy · 4 years ago
I know it's not the point, but I find it way easier to just brute force it. Got 31 pairs matched that way (three matches in the last two seconds, even).
8note · 4 years ago
Makes sense, you have to wait to see enogh information to be able to actually submit choices, vs being able to start brute forcing immediately
folmar · 4 years ago
Also the need to manually unselect a pair to try new one favours brute forcing over thinking.
fsckboy · 4 years ago
because of the "vanishing point" style 3d perspective it's difficult for me to tell relative sizes of things, so I had to frequently resort to counting bricks on the front leg vs the rear leg for extra-dimensional-L pieces; it was more about that than things like chirality. The result was, didn't really feel like a shape matching game to me, felt like a brick counting game. I guess in a certain way I was expecting something that felt more like those "which cube matches this piece of paper folded up" type matches

Also, don't mind being timed to the nth of a second, but I'd prefer a clock that was not so frenetic in my field of vision, just showing seconds would be enough.