Commit Graph

107 Commits

Author SHA1 Message Date
539666d508 Add 2017 puzzle 1 2022-01-12 14:28:19 +00:00
1fab8c9161 Completed puzzles for 2021 day 23 2022-01-12 14:26:21 +00:00
3ba00ad3eb Separate out Dijkstra implementation
This separates the Dijkstra implementation into its own generic function.

Whilst doing this we can simplify the code and also save yet more memory!

Still don't get correct results for part 2.
2022-01-12 11:31:09 +00:00
a1a7d11583 Separate out Dijkstra implementation
This separates the Dijkstra implementation into its own generic function.

Whilst doing this we can simplify the code and also save yet more memory!

Still don't get correct results for part 2.
2022-01-12 09:30:21 +00:00
29005ed7ba Improved version of 2021 puzzle 23-02
Building on changes to part 1 see if this performs better and produces correct results.
2021-12-25 08:58:21 +00:00
a5fc32ed07 Imrpove Puzzle 23-01 by modelling top row correctly.
Previously we modelled the top row as a connected series of nodes and allowed them to connect to each other directly.  This ignored the rule that you have to move directly to the place you want on the top row and then back out of it.

However, that was fine as the lowest cost would imply that.  But it does slow down and give more states to consider.

Instead, model the nodes on the top row as being directly connected to the nodes in the second row.  Add some rules about when you can move from one to the other and use those.

This reduces the number of states we have to consider in total.  And hopefully speeds up the process.
2021-12-24 12:34:00 +00:00
cca3a22a43 Proposed solutions for 2021 day 23
Improve speed by using two sets for State management:

states: Contains all the states we need to visit indexed by state - Cost is ignored.
costs:  Contains all the states we need to visit indexed by cost then state.

This then means the lookup for the minimum cost is fast.
2021-12-24 11:53:57 +00:00
b53002d48a Proposed solutions for 2021 day 23 2021-12-23 19:49:33 +00:00
fcfdcddd33 Add 2017 Day 25 puzzles 2021-12-22 16:36:30 +00:00
e06e78ce3c Add 2017 Day 24 puzzles 2021-12-22 15:57:06 +00:00
d1e6f5b086 Fix macOS builds 2021-12-22 15:19:53 +00:00
997dad69b4 Add 2017 Day 23 puzzles 2021-12-22 15:17:21 +00:00
3ae7eb86ac Add 2021 Day 22 puzzles 2021-12-22 09:46:52 +00:00
0953533066 Add 2017 Day 22 puzzles 2021-12-21 15:28:12 +00:00
7d0fb91103 Add 2017 Day 21 puzzles 2021-12-21 14:04:46 +00:00
3e718e2aa0 Add 2017 Day 20 puzzle 2 2021-12-21 13:23:49 +00:00
77811aa473 Add 2021 day 21 puzzles 2021-12-21 10:58:48 +00:00
495222c63c Add 2021 day 20 puzzles 2021-12-20 07:46:43 +00:00
f74dd3b60d Add 2021 day 19 puzzles 2021-12-19 14:15:04 +00:00
9e23269d53 Add 2021 day 18 puzzles 2021-12-18 16:29:46 +00:00
da983a9321 Add 2017 day 19 puzzles 2021-12-17 11:41:53 +00:00
a6092d777e Add 2021 day 17 puzzles 2021-12-17 07:55:08 +00:00
06909578ea Add 2017 day 18 puzzles. 2021-12-16 16:35:43 +00:00
ed471c3bd2 Add 2017 day 17 puzzles. 2021-12-16 14:42:44 +00:00
2566a75466 Add 2017 day 16 puzzles. 2021-12-16 13:59:58 +00:00
02087088f9 Add 2017 day 15 puzzles. 2021-12-16 11:50:49 +00:00
3631a4bb18 Add 2017 day 14 puzzles. 2021-12-16 11:21:52 +00:00
11c9119dc5 Fix 2021-16-01 build for Linux 2021-12-16 10:39:51 +00:00
c885252279 Add 2017 day 13 puzzles 2021-12-16 10:34:35 +00:00
81e191a6e2 Add 2021 day 16 puzzles 2021-12-16 09:21:41 +00:00
04b0dd52c6 Add 2017 day 12 puzzles 2021-12-15 14:43:11 +00:00
628fec2f5e Add 2017 day 11 puzzles 2021-12-15 13:57:20 +00:00
7ed598b786 Add 2017 day 10 puzzles 2021-12-15 11:56:13 +00:00
cea324cad9 Add 2017 day 9 puzzles 2021-12-15 11:18:48 +00:00
0a041cd398 Add 2021 day 15 puzzles 2021-12-15 10:20:08 +00:00
f237a6c3fd Add 2017 day 8 puzzles 2021-12-14 19:26:09 +00:00
3f09bc29a0 Add 2017 day 7 puzzles 2021-12-14 15:24:05 +00:00
d84673a779 Add 2021 day 14 puzzles 2021-12-14 08:13:01 +00:00
01be969b51 Fix macOS build 2021-12-14 07:23:49 +00:00
32598f64a9 Add 2017 day 6 puzzles 2021-12-13 17:25:46 +00:00
204f9fc02a Add 2017 day 5 puzzles 2021-12-13 16:17:05 +00:00
3e77d0aacc Add 2017 day 4 puzzles 2021-12-13 14:51:53 +00:00
9619bb1f35 Add 2017 day 3 puzzles 2021-12-13 14:04:37 +00:00
920bbb283f Add 2017 day 2 puzzles 2021-12-13 12:11:20 +00:00
020549d323 Add 2017 day 1 puzzles 2021-12-13 11:49:38 +00:00
e43fca9377 Add 2016 day 25 puzzle 2021-12-13 11:36:48 +00:00
20d7bc600c Add 2016 day 24 puzzles 2021-12-13 11:04:07 +00:00
b5ef1aa7f0 Fix build on Linux 2021-12-13 10:03:59 +00:00
5b64f9670f Add 2021 day 13 puzzles 2021-12-13 07:27:34 +00:00
d14bd5a9c6 Tidy 2016 day 23 puzzles 2021-12-12 16:24:14 +00:00