82 Commits

Author SHA1 Message Date
fd84db7072 day 19 wip 2022-12-18 23:08:55 -08:00
88040394db day 18 ivy solution 2022-12-18 17:26:40 -08:00
772dda0bbc day 18 python fix a flood fill bug
not sure how this ever worked
2022-12-17 22:37:20 -08:00
4b5b25e56b day 18 python cleanup 2022-12-17 22:07:34 -08:00
71958605b6 day 18 python solution 2022-12-17 21:41:26 -08:00
910da239c0 new A* optimization: worst-case pruning
i'm not sure if this has been described in the literature exactly but it
is similar to existing branch-and-bound techniques.

it doesn't speed up the search directly (the number of visited nodes is
the same) but it does cut the queue length down by an order of magnitude
and shave a couple seconds off of day 16, presumably due to reduced memory
pressure or something.
2022-12-17 20:15:25 -08:00
e9ada04aa9 lib/astar: report final queue length 2022-12-17 19:29:26 -08:00
e1fb37d229 lib/astar: handle inconsistent heuristics better
before pruning a node we've already visited, we need to check if it has
a better cost.
2022-12-17 19:27:28 -08:00
5a7c8ef732 day 15 svg visualization 2022-12-17 16:36:01 -08:00
032c1df356 day 16 reshuffle files 2022-12-17 15:29:48 -08:00
64a09bb238 day 16 hide my shame 2022-12-17 15:29:32 -08:00
6b0bf5d29b day 16 sample input 2022-12-17 15:26:04 -08:00
2e18e87a95 lib/astar: fix return value for failed search 2022-12-17 15:22:18 -08:00
043a57608d day 16 python part 2 solve with A*, and cleanup 2022-12-17 15:10:28 -08:00
bbc4075137 day 17 python tweaks 2022-12-17 13:31:57 -08:00
8c1696fa32 day 16 speed up search by shrinking the graph 2022-12-17 13:20:30 -08:00
de987b60db day 17 python cleanup 2022-12-17 13:20:30 -08:00
799fefa59a day 17 python part 2 solve 2022-12-17 13:20:30 -08:00
db649d4a56 day 17 python refactor 2022-12-17 13:20:20 -08:00
40b9f86f4c day 17 part 1 python 2022-12-17 13:20:20 -08:00
a54304686d day 16 python alternate solution (astar) 2022-12-17 13:20:20 -08:00
014b7daf09 day 16 part 2 python, finally
ugh
2022-12-17 13:20:20 -08:00
03710f579a day 16 python part 1 solve
this shouldn't work
2022-12-17 13:19:18 -08:00
f39fbe1890 day 16 python attempt
works on the sample input, doesn't work on the real input
2022-12-17 13:18:50 -08:00
7b40516b66 day 15 part 2 alternate solution 2022-12-15 12:55:42 -08:00
2b0ef33a08 day 15 python wip optimizations 2022-12-14 22:50:07 -08:00
5f76b4e69d day 15 python part 2 2022-12-14 22:47:37 -08:00
af21ad12cc day 15 python part 1 2022-12-14 21:26:18 -08:00
37e5ab92e0 day 14 python more cleanup 2022-12-14 01:02:53 -08:00
80cf54d600 day 14 python optimize 2022-12-13 22:18:59 -08:00
99fa431441 day 14 python cleanup 2022-12-13 22:13:50 -08:00
96a5961ed4 day 13 python solution 2022-12-13 21:45:47 -08:00
85e623a9db day 13 python cleanup
convert our less function into a real cmp function
2022-12-13 10:39:36 -08:00
6c175f2d8e day 13 python use json instead of eval
hat tip to benharri
2022-12-13 10:35:29 -08:00
10293ec22d day 13 python solution 2022-12-12 21:23:29 -08:00
f2fc82c55f add astar module and alternate solution for day 12 2022-12-12 12:55:37 -08:00
6421ecf7fa day 12 python simplify 2022-12-12 11:22:01 -08:00
e378777cd3 day 12 python tweaks 2022-12-12 11:06:05 -08:00
6c62ff8a9d day 12 python solution 2022-12-11 21:57:13 -08:00
f15e68e65e day 8 ivy part 2 cleanup
still don't love this, but i can't think of a better approach
2022-12-11 18:21:07 -08:00
aeaf4f524c day 11 python slight optimization 2022-12-10 23:48:39 -08:00
648ce83517 day 11 python tweaks 2022-12-10 23:38:51 -08:00
4fc545ac39 day 11 python cleanup 2022-12-10 22:18:04 -08:00
eefab8eabf day 11 python 2022-12-10 21:32:55 -08:00
28f7fcb605 day 10 ivy tweak 2022-12-10 11:52:08 -08:00
43118ba386 day 10 ivy solution 2022-12-10 11:46:41 -08:00
f40fdcc8c3 day 10 python rewrite
pass around an iterator of X states instead of using a callback and
global variables.
2022-12-10 11:21:49 -08:00
4ea896feeb day 10 python 2022-12-09 22:01:20 -08:00
2888e82c6b day 8 ivy part 2 i think this actually works 2022-12-09 21:22:18 -08:00
a635d3f5db day 8 ivy part 2 wip 2022-12-09 21:21:52 -08:00