2019, take 2 #2

Open
aey wants to merge 19 commits from 2019-rerun into main

19 commits

Author SHA1 Message Date
Anders Englöf Ytterström
86121d7799 Partly solve 2019:18 2024-10-30 13:37:41 +01:00
b9d32629c8 Solve 2019:13 pt1 2024-01-21 13:48:34 +01:00
Anders Englöf Ytterström
107ca5ab7c Solve 2019:16 "Flawed Frequency Transmission"
Solution takes several hours to run, commented out and cached.
2023-12-29 11:54:21 +01:00
Anders Englöf Ytterström
40274ea044 Solve 2019:14 "Space Stoichiometry"
Got stuck completely at part 1. Last 2 examples
did not add up, off by 100 ore.

I did know that I had to count by overflows somehow,
but I could not manage it. After countless hours
writing a verbose debugger, I wiped the whole thing
and looked at this code for inspiration:

https://github.com/sophiebits/adventofcode/blob/master/2019/day14.py

It works by using modulus and removing all keys
in a dict except ORE.
2023-12-29 00:36:55 +01:00
Anders Englöf Ytterström
d01b4aa0f8 Solve 2019:12 "The N-Body Problem"
Also, fix bug in ints() helper.
2023-12-27 13:39:10 +01:00
051c3f3ebd Lint and Refactor day 1-11 2023-12-19 18:34:03 +01:00
5cb2dccf62 Deprecate nouns and verbs arguments for intcode 2023-12-19 14:51:11 +01:00
f98545ae5a Solve 2019:11 "Space Police"
Bugs discovered in intcode:

- Relative base was reset on await input suspend.
- No handling for incorrect intcodes.
- State was sometimes corrupted when resumed after
  suspend.

Fixed and Patched in 0.3.2
2023-12-19 14:51:11 +01:00
262ad34c51 Solve 2019:10 "Monitoring Station". 2023-12-19 14:51:11 +01:00
d9142068ea Solve 2019:09 "Sensor Boost"
This was a hard one. I would not have made it
without r/adventofcode where all assertions
in __main__ were fetched. For values it was
straight forward enough, but for some reason
it did not work for positioning.

I still do not understand how one is supposed to
chew the WALL OF TEXT each day of 2019 and figure
out these stuffs on your own.

It took 10-12 hours to solve part 1. AoC day 9
is no joke.

Links that helped me:

- https://www.reddit.com/r/adventofcode/comments/e8aw9j/2019_day_9_part_1_how_to_fix_203_error/
- https://www.reddit.com/r/adventofcode/comments/jr9xrn/comment/gbwr85k/
2023-12-19 14:51:11 +01:00
c51638fac1 Solve 2019:07 "Amplication Circuit"
Breaking change for intcode 0.3.0, revisited
earlier use of the computer to update code.
2023-12-19 14:51:11 +01:00
4623fdac95 Solve 2019:08 "Space Image Format" 2023-12-19 14:51:11 +01:00
5be719dcf9 Solve 2019:06 "Universal Orbit Map"
Tried to solve part 2 using BFS, but did not
figure out a way to find shortest path. Fell
back to a less elegant but more simple
approach.
2023-12-19 14:51:11 +01:00
9eccd731b4 Solve 2019:05 "Sunny with a Chance of Asteroids"
Refactored the intcode computer to live in a separate
file, since it will come back more times.

As a nice touch, output of aoc.py will print the version
used of the intcode.

As another nice touch, the int code has a CHANGELOG.
2023-12-19 14:51:11 +01:00
298b97b66d Solve 2019:04 "Secure Container" 2023-12-19 14:51:11 +01:00
799216623e Solve 2019:03 "Crossed Wires" 2023-12-19 14:51:11 +01:00
e1d4741cfc Solve 2019:02 "1202 Program Alarm" 2023-12-19 14:51:11 +01:00
85a67d26fa Solve 2019:01 "The Tyranny of the Rocket Equation" 2023-12-19 14:51:11 +01:00
133c76a02a Initiate AoC 2019 in python 2023-12-19 14:51:11 +01:00