adventofcode

Happy Advent 2020! Please put answers in the pinned threads or create one if it does not exist yet. | https://github.com/adventofcode-clojurians/adventofcode-clojurians | Join the private leaderboard with code 217019-4a55b8eb
fellshard 2019-12-19T08:13:37.001500Z

I'm an idiot and made today's far harder for myself on accident

1➕
fellshard 2019-12-19T08:14:10.002200Z

Then I went to describe the logic in a comment and realized I could have done things a chunk faster and far earlier, and with far easier to follow logic. Ah well.

fellshard 2019-12-19T08:14:43.002500Z

Now the solution is practically instant. Heh.

fellshard 2019-12-19T08:15:26.002900Z

Dropping this here just to show how convoluted it was.

fellshard 2019-12-19T08:16:44.003Z

tl;dr, I was tracing the top and the bottom, thinking I needed to check the bounds from an earlier bad assumption about what was needed to solve the problem.

fellshard 2019-12-19T08:29:02.003800Z

Also goofed: I ran it first time for a ship of size 1000, not 100; amazingly, it completed without taking too long.

misha 2019-12-19T10:02:57.004200Z

how instant is "practically instant"?

fellshard 2019-12-19T16:48:38.004700Z

2.5s (measured by hand, w/o benchmark)

fellshard 2019-12-19T16:49:06.005200Z

Compared to... maybe 10-20s the other way?

uneman 2019-12-19T17:32:01.008900Z

i tried to get tangents of both edges then find the corner with simple math. but no luck because errors were so significant...

1😅
misha 2019-12-19T21:38:15.010100Z

went with trigonometry at first too, but was too imprecise.

rjray 2019-12-19T21:45:17.010700Z

I am still hitting a brick wall on day 18. Nothing I do to my code is reducing the search-space enough.

rjray 2019-12-19T21:46:22.011200Z

At this point, my code is so long and convoluted I'm tempted to start over from square 0.

misha 2019-12-19T21:47:35.012300Z

same here, lest 1 cache idea for tomorrow. Already have like 500 lines of code for different bfs/dfs/a*/dj combinations :harold:

misha 2019-12-20T11:47:10.019700Z

yes

misha 2019-12-19T21:48:36.013Z

which solve samples with times like: 2,7,7,∞,30 msec :kappa:

misha 2019-12-19T21:50:15.013900Z

and even if you do find 1 path early - still need to +- exhaust the rest of the space "just in case"