Yep! I believe AOC 2015 had one input for all players, but each user gets their own generated input that is usable for a given problem for 2016 and on.
Highly recommend this video on AOC, talks about the founding, stumbling blocks, and the process for developing challenges.
Wait, now I'm confused. I got this ugly mess because I wasn't checking for uneven folds, then I corrected it and it looks fine. I don't know if some people got nice inputs or if I'm doing something wrong.
Generally they go out of their way to make it so that people don’t get inputs with varying difficulty (which non-half folds would have done). Is it possible that the folds are halves but the original map just didn’t have dots on one of the edges?
I don't know, at this point it's really confusing me, I don't know what the issue is. I had the full 2D list instead of keeping a set of the coords. The initial list size is based on the max values in the input.
There's exactly one instance where the length of one half is larger by 1 than the other half. It happens because the length of the list is even. Specifically 894, so there's no middle and one half's length is 447 and the other is 446.
Okay, I think that could be the answer: Try taking the first x and y axes and assume that the length and height are double those. This may mean you have an empty row or column at the end.
I had the exact problem. I just assumed that the max values from the input were the dimension of the canvas. Spent way too long trying to accommodate cases where the folding line could be placed wherever.. Oh well.
I spent a lot of time trying to figure out what the coordinate system would be after an uneven fold near the top or left side, such that the folded flap overhangs 0,0.
All "by hand." And yes, it's actually all just 2D.
It's almost a lerp, except that I used a very smooth polynomial easing function, t' = 6t5 - 15t4 + 10t3 (for t and t' from 0 to 1), so that it accelerates and decelerates smoothly. That's not too far from a cosine easing function, t' = (1 - cos(pi t))/2, which is equivalent to a linear angular speed rotation, hence the pseudo-3D effect.
47
u/daggerdragon Dec 13 '21
This animation is so smoof. *chef's kiss*
51
u/volivav Dec 13 '21
Was I the only one expecting a "send nudes" on this video, only to be disappointed?
9
u/DeFlaaf Dec 13 '21
Am I missing something: why is your code different from mine? Does AoC work with different inputs for different players?
Also: pretty animation!
6
u/KT421 Dec 13 '21
Waitaminute it always folds in half? I spent time writing it so it would gracefully take uneven folds :cries:
5
u/SophiaofPrussia Dec 13 '21
Animations like this make me appreciate how hard it must be to make the puzzles and the inputs.
1
u/Mavee Dec 29 '21
Is it always half folds? I made test cases and everything to account for uneven folds 🥲
Fold for less than half:
Fold for more than half:
3
u/wubrgess Dec 13 '21
I'll admit that at some point I was just expecting dickbutt.
1
u/ExuberantLearner Dec 13 '21
This is awesome
1
u/dontaggravation Dec 13 '21
love the animation, that's so nice
thank you for sharing
1
u/aardvark1231 Dec 13 '21
Fantastic! Thanks for taking the time to make and share this!
1
u/kukoscode Dec 13 '21
So nice !!!
1
u/Say8ach Dec 13 '21
Noice.
1
u/Head_Structure1945 Dec 13 '21
There is a bug in adventofcode. I got a code "OPZLPFZL" and when I submit it does not accept it.
0
u/[deleted] Dec 13 '21
[deleted] — view deleted comment