Commit Graph

78 Commits (71958605b6ae870c935119ce92d0982b59ce69ca)

Author SHA1 Message Date
magical 71958605b6 day 18 python solution 2022-12-17 21:41:26 -08:00
magical 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
magical e9ada04aa9 lib/astar: report final queue length 2022-12-17 19:29:26 -08:00
magical 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
magical 5a7c8ef732 day 15 svg visualization 2022-12-17 16:36:01 -08:00
magical 032c1df356 day 16 reshuffle files 2022-12-17 15:29:48 -08:00
magical 64a09bb238 day 16 hide my shame 2022-12-17 15:29:32 -08:00
magical 6b0bf5d29b day 16 sample input 2022-12-17 15:26:04 -08:00
magical 2e18e87a95 lib/astar: fix return value for failed search 2022-12-17 15:22:18 -08:00
magical 043a57608d day 16 python part 2 solve with A*, and cleanup 2022-12-17 15:10:28 -08:00
magical bbc4075137 day 17 python tweaks 2022-12-17 13:31:57 -08:00
magical 8c1696fa32 day 16 speed up search by shrinking the graph 2022-12-17 13:20:30 -08:00
magical de987b60db day 17 python cleanup 2022-12-17 13:20:30 -08:00
magical 799fefa59a day 17 python part 2 solve 2022-12-17 13:20:30 -08:00
magical db649d4a56 day 17 python refactor 2022-12-17 13:20:20 -08:00
magical 40b9f86f4c day 17 part 1 python 2022-12-17 13:20:20 -08:00
magical a54304686d day 16 python alternate solution (astar) 2022-12-17 13:20:20 -08:00
magical 014b7daf09 day 16 part 2 python, finally
ugh
2022-12-17 13:20:20 -08:00
magical 03710f579a day 16 python part 1 solve
this shouldn't work
2022-12-17 13:19:18 -08:00
magical 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
magical 7b40516b66 day 15 part 2 alternate solution 2022-12-15 12:55:42 -08:00
magical 2b0ef33a08 day 15 python wip optimizations 2022-12-14 22:50:07 -08:00
magical 5f76b4e69d day 15 python part 2 2022-12-14 22:47:37 -08:00
magical af21ad12cc day 15 python part 1 2022-12-14 21:26:18 -08:00
magical 37e5ab92e0 day 14 python more cleanup 2022-12-14 01:02:53 -08:00
magical 80cf54d600 day 14 python optimize 2022-12-13 22:18:59 -08:00
magical 99fa431441 day 14 python cleanup 2022-12-13 22:13:50 -08:00
magical 96a5961ed4 day 13 python solution 2022-12-13 21:45:47 -08:00
magical 85e623a9db day 13 python cleanup
convert our less function into a real cmp function
2022-12-13 10:39:36 -08:00
magical 6c175f2d8e day 13 python use json instead of eval
hat tip to benharri
2022-12-13 10:35:29 -08:00
magical 10293ec22d day 13 python solution 2022-12-12 21:23:29 -08:00
magical f2fc82c55f add astar module and alternate solution for day 12 2022-12-12 12:55:37 -08:00
magical 6421ecf7fa day 12 python simplify 2022-12-12 11:22:01 -08:00
magical e378777cd3 day 12 python tweaks 2022-12-12 11:06:05 -08:00
magical 6c62ff8a9d day 12 python solution 2022-12-11 21:57:13 -08:00
magical 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
magical aeaf4f524c day 11 python slight optimization 2022-12-10 23:48:39 -08:00
magical 648ce83517 day 11 python tweaks 2022-12-10 23:38:51 -08:00
magical 4fc545ac39 day 11 python cleanup 2022-12-10 22:18:04 -08:00
magical eefab8eabf day 11 python 2022-12-10 21:32:55 -08:00
magical 28f7fcb605 day 10 ivy tweak 2022-12-10 11:52:08 -08:00
magical 43118ba386 day 10 ivy solution 2022-12-10 11:46:41 -08:00
magical 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
magical 4ea896feeb day 10 python 2022-12-09 22:01:20 -08:00
magical 2888e82c6b day 8 ivy part 2 i think this actually works 2022-12-09 21:22:18 -08:00
magical a635d3f5db day 8 ivy part 2 wip 2022-12-09 21:21:52 -08:00
magical bfcffc614c day 8 part 2 alternate python solution
although it's shorter, i'm not sure if i like the way the count function
was factored out
2022-12-08 22:34:03 -08:00
magical a3e4290ccd day 8 python slight cleanup 2022-12-08 22:08:51 -08:00
magical 117d3d58d5 day 9 python simplify 2022-12-08 21:44:02 -08:00
magical 8cb5086749 day 9 python part 2 2022-12-08 21:24:52 -08:00