Play my pipes game: https://hexapipes.vercel.app/play
NGINX 502 Error :/
NGINX 502 Error :/
Then the 5d array can be a 2d array, where the other dimension is 19**4. But timings were about the same as 5d approach.
Then the 5d array can be a 2d array, where the other dimension is 19**4. But timings were about the same as 5d approach.
It's just a heavy operation however you slice it I think =).
It's just a heavy operation however you slice it I think =).
Day 20 Race Condition used to take almost 2s before I gave it some numpy love.
#python solutions and animations code here: github.com/gereleth/aoc...
Day 20 Race Condition used to take almost 2s before I gave it some numpy love.
#python solutions and animations code here: github.com/gereleth/aoc...
And 0.5px stroke weight is great for hiding the outer hairyness.
I couldn't untangle the crowded third layer, some connections through the center are unavoidable.
And 0.5px stroke weight is great for hiding the outer hairyness.
I couldn't untangle the crowded third layer, some connections through the center are unavoidable.
..
|\
....
|\\\\
.......
Where the max clique was the tight group on top. So I made these concentric circles going in bfs layers from max clique.
..
|\
....
|\\\\
.......
Where the max clique was the tight group on top. So I made these concentric circles going in bfs layers from max clique.
Then I switched to a 5d numpy array for sequence results and worked on buyers in a vectorized way. Takes ~0.7s now. github.com/gereleth/aoc...
Then I switched to a 5d numpy array for sequence results and worked on buyers in a vectorized way. Takes ~0.7s now. github.com/gereleth/aoc...
Or maybe your data is stored differently, linked list style...
I have points as tuples (y,x) so Md calculation is just arithmetic and so is the diamond loop.
Or maybe your data is stored differently, linked list style...
I have points as tuples (y,x) so Md calculation is just arithmetic and so is the diamond loop.
for every node in path after a:
is it close enough?
is the gain good?
=> median ~5000 iterations for various `a`s
vs
for every node within 20 manhattan of a:
is it in the path?
is the gain good?
=> ~400 iterations for every `a`
for every node in path after a:
is it close enough?
is the gain good?
=> median ~5000 iterations for various `a`s
vs
for every node within 20 manhattan of a:
is it in the path?
is the gain good?
=> ~400 iterations for every `a`