« first day (19 days earlier)      last day (1119 days later) » 

01:54
@emanresuA i tried rotation matrices and failed so i just got every permutation of the point and every place that could be negated
then i got 48 different possibilities
02:06
... aren't there 24?
02:19
yep
@emanresuA i did not have the patiennce to find the relevant 24
it was fast enough to not be bad even with 2n point rotations
Can you just ignore rotations when matching and align the absolute distances, or does that lead to problems?
you need rotations
because you need to figure out what on earth the probe positions are
when matching
As in you just figure out "this set of beacons has absolute differences of [435.32, 1932.4, 953.2], and so does this set, so they must share these points"
Then figure out where #2 is based on that
Can you do that?
hm i've no clue
but you can try
idk how you'd align the points based on that
02:39
i don't think there's any way to do it without rotations
and even if there is
it would far exceed the difficult of just doing the rotations
how i did rotations is just for each of the four x-axis rotations, look at all of the four y-axis rotations, and then consider z-axis rotate +1 and -1
and that covers the 24 exactly
there are many ways of going about it
 
2 hours later…
04:40
20m
15m
quiet today huh
8m
7m
Phew, made it just in time
Had to take care of 5 pets in 20 minutes
advent of pet ownership?
6m
Well, nobody said I own the pets
Two cats, who are mine and also the rest of my family's, same with one dog, one dog my family's taking care of for a friend, and my sister's hamster
They're gone on a trip
This feels directed at me lol
impossible
4
adventofrealizingicanttype
Adventofruntimelongerthancodingtime
(Lanternfish p2)
@RedwolfPrograms fine, advent of pet sitting
2.75m
04:58
2m
Any time you write awful code, think about the fact that in some slice of time, that code is the culmination of the entirety of the universe's existence
what
1m
glhfaag
glhfnr
(good luck have fun ninja redwolf)
Wait that's cursed
p1 always has the same parity on their score
& p2's parity alternates
05:13
that was
very confusing to read, for some reason
p2 looks fun at least
I was incrementing the dice by 1 each turn instead of 3
I'm not even sure how to approach p2
2/68
that's... a massive diff and a half
Also how do you three-sided-die?
i somehow managed to drop the "roll the die thrice" part from my p2 solution...
cost me about 50pts
i got so caught up in figuring out how to make p2 efficient that i didn't even realize a) i am fucking stupid b) you don't really need efficiency
Wait you don't
Uh oh
05:20
oh yeah i guess that's a hint for p2 now that lb's (basically) closed - you don't really need a particularly smart approach
I've figured it out I think
(Just use a dict with count of every state, right?)
in fact my attempt to make it smart cost me about 5-10 minutes of doing nothing
because it was a completely incorrect approach in the first place
@emanresuA yes, memoization is really all you need
oh
i reclaimed #4
Done 60/221
05:26
nice
I incorrectly interprteted the dice as d2s rather than d3s in my solution
Which took me a while to fix, and another while to manually transcribe in how many universes every total occurs
Total:
3 in one universe
4 in 3 universes
5 in 6 universes
6 in 7 universes
7 in 6 universes
8 in 3 universes
9 in one universe
oh i just did [x + y + z for x in [1, 2, 3] for y in [1, 2, 3] for z in [1, 2, 3]]
That would work, but that idiom didn't occur to me
and did not bother doing multiplication on the substates
i just did memoization
05:28
Interesting that we came up with so different approaches to the same problem
@TheFifthMarshal 1110^3 = 1367631000
What does that have to do with anything?
Dang it I made a dumb mistake on p2
To save memory, adding a die is equivalent to windowed sums
But I did get top 10 on p1!
05:30
pog!
I'm gonna end up with 9/1000 or something like that lol
Idk what I'm doing wrong on p2, I'm miscounting universes somewhere
Ohhh hang on I think I see where maybe
I literally lost 5 minutes to unary minus precedence
i was using an unbelievably shit way to work with state
that involved [::-1**t]
and i forgot that had to be [::(-1)**t]
05:35
nah that had to be more than five minutes actually
Oh my god I'm an idiot
more like
15 minutes?
I typed 1 instead of 0
@UnrelatedString JS gives: Uncaught SyntaxError: Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence
nice
wish python did that lmao
05:37
JS's operator precedence is very sus
Python's too
Okay, finally mine should be working
C one is relatively simple if you ignore bitwise ops: unary postfix > unary prefix > any infixes
Just for fun someone should calculate the results for all 100 possible inputs
Day       Time  Rank  Score       Time  Rank  Score
 21   00:03:33     9     92   00:39:05   664      0
I'm back on the global leaderboard too! :D
Top 10 for p1, on the global leaderboard after days of totally throwing, and then totally threw p2. Kind of sums up this this year's AoC for me so far :p
throw aoc;
3
05:42
is this problem as easy as it looks?
oh well then
I overthought p2 then made a tiny type that killed me, but it wasn't too bad either
Help please, my code's infinite looping
You can't use arrays as map keys
It uses the reference to the array as the key
So you'll need to .join(",") them
Actually wait
nvm
You're not using the map how I though you were
05:52
It sets a to a blank map, iterates through states, iterates through all possible dice rolls and adds to those in a, then sets states to a
Wait, actually, you do need to use a string as a map key. The way you're using the map, you'll end up with a zillion copies of everything, all with 0 or 1 as the count
I really wish JS had something like Python's tuples-as-dict-keys
Ooh, that's cool. Don't like that # syntax, though.
05:56
@RedwolfPrograms Tried that, still broken
(p1 + v + v2 + v3) % 10 || 10
Are you storing the positions 0-indexed or 1-indexed?
@RedwolfPrograms Better than the other ([|1,2,3|]) IMO
I kind of like how [?...] and {?...} look, [?...] is what one of my languages uses for tuples
Not sure if it would conflict with any existing syntax though
Shouldn't\
@RedwolfPrograms If you're storing them 1-indexed, you need to do ((p1 - 1) + ...) % 10 + 1
Which it seems like you are, since you provide the inputs as 4 and 8 instead of 3 and 7
06:01
Done, still infinite loooping
It should finish in a universe or two
Can you post your updated code?
Oh nvm
It's there
Well it finishes now
Rather quickly, too
console.log(states.size); lets you monitor the progress
swap p1 and p2 in 19 and 25 lines
06:08
@btnlq Oh thanks
@RedwolfPrograms What browser are you using?
Oh wait nvm
It finished, just took about 10s
Except now it's giving the wrong results...
mine only takes around .2 seconds to run and it doesn't use any crazy optimizations just basic memoization
06:12
Maybe I wrote it in Vyxal by mistake
[238441549296251, 238417507056364] for the example input...
I've confirmed the Map is working correctly, no weird JS typing stuff breaking that
the amount of code duplication is bothering me
anyway what if you move L3 to L7
actually wait
i don't understand how on earth your player toggle is working
k = a.get(f) || 0
a.set(f,count+k)
This seems incorrect
06:15
@hyper-neutrino It isn't
That might be the bug, thx
just use recursion
IT WORKS!
Thanks hyper
And redwofl
And btlnq
redw on floor laughing
Lol
Well, 1575/1786
07:00
hm part 2
bad recursive algo possible?
07:28
definitely
just memoize
no memoization
boo
ran a whole of 10 seconds lol
i really wanted an array based solution for this.. since it's a dp there should be a way to array-ify it is some form
08:05
¯\_(ツ)_/¯ You could use a 4d array
 
2 hours later…
10:28
CMC: Guess who wrote this:
while um:
    r=l()
    if r:
        print(f'got {r}')
    else:
        print('what the fuck')
 
6 hours later…
16:15
@emanresuA ur mom
 
3 hours later…
19:43
@UnrelatedString Mom? Is that you?

« first day (19 days earlier)      last day (1119 days later) »