mgrettondann
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
mgrettondann
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
mgrettondann
b53002d48a
Proposed solutions for 2021 day 23
2021-12-23 19:49:33 +00:00
mgrettondann
3ae7eb86ac
Add 2021 Day 22 puzzles
2021-12-22 09:46:52 +00:00
mgrettondann
77811aa473
Add 2021 day 21 puzzles
2021-12-21 10:58:48 +00:00
mgrettondann
495222c63c
Add 2021 day 20 puzzles
2021-12-20 07:46:43 +00:00
mgrettondann
f74dd3b60d
Add 2021 day 19 puzzles
2021-12-19 14:15:04 +00:00
mgrettondann
9e23269d53
Add 2021 day 18 puzzles
2021-12-18 16:29:46 +00:00
mgrettondann
a6092d777e
Add 2021 day 17 puzzles
2021-12-17 07:55:08 +00:00
mgrettondann
11c9119dc5
Fix 2021-16-01 build for Linux
2021-12-16 10:39:51 +00:00
mgrettondann
81e191a6e2
Add 2021 day 16 puzzles
2021-12-16 09:21:41 +00:00
mgrettondann
0a041cd398
Add 2021 day 15 puzzles
2021-12-15 10:20:08 +00:00
mgrettondann
d84673a779
Add 2021 day 14 puzzles
2021-12-14 08:13:01 +00:00
mgrettondann
b5ef1aa7f0
Fix build on Linux
2021-12-13 10:03:59 +00:00
mgrettondann
5b64f9670f
Add 2021 day 13 puzzles
2021-12-13 07:27:34 +00:00
mgrettondann
624b285d3d
Tidyup 2021 day 12 puzzles
2021-12-12 08:06:02 +00:00
mgrettondann
9e9321541a
Tidyup 2021 day 12 puzzles
2021-12-12 08:05:13 +00:00
mgrettondann
fcaf7595db
Add 2021 day 12 puzzles
2021-12-12 08:02:35 +00:00
mgrettondann
300456b9b2
Add 2021 day 11 puzzles
2021-12-11 07:36:13 +00:00
mgrettondann
318243ccea
Add 2021 day 10 puzzles
2021-12-10 10:16:46 +00:00
mgrettondann
13fc28398f
Add 2021 day 9 puzzles.
2021-12-09 14:29:22 +00:00
mgrettondann
3578b298aa
Add <cassert> header include
...
This fixes some Linux build failures.
2021-12-09 13:53:52 +00:00
mgrettondann
290126fd00
Cleanup 2021 day 8 puzzles
2021-12-08 10:33:53 +00:00
mgrettondann
ceb89e10b7
Add 2021 day 8 puzzles
...
Part two needs a tidy-up which will come in a bit.
But this is how I got the correct answer.
2021-12-08 09:42:51 +00:00
mgrettondann
9c515351b5
Add 2021 day 7 puzzles
2021-12-07 10:35:28 +00:00
mgrettondann
8be9c6d37d
Add 2021 day 6 puzzles
2021-12-06 07:52:06 +00:00
mgrettondann
71453e98ce
Add 2021 day 5 puzzles
2021-12-05 09:11:05 +00:00
mgrettondann
176d655e3c
Add 2021 Day 4 puzzles
2021-12-04 08:04:02 +00:00
mgrettondann
b6213c6593
Tidy up 2021 day 3 puzzle 2 code.
...
This adds some comments and removes code duplication.
2021-12-03 12:32:15 +00:00
mgrettondann
b43c4a617e
Add 2021 day 3 puzzles
2021-12-03 12:22:03 +00:00
mgrettondann
7ab7ecb00a
Update 2021 sources to pass clang-tidy
2021-12-02 07:31:53 +00:00
mgrettondann
cd5e2538df
Add .clang-format and apply it
2021-12-02 07:18:16 +00:00
mgrettondann
d9e1d2cf89
Add day 2 of 2021's puzzles.
2021-12-02 06:57:48 +00:00
mgrettondann
51cec3ea26
Add day 1 of 2021's puzzles.
2021-12-01 20:56:22 +00:00