First time in the antechamber was on Day 9 but didn't know what to do next and it then took me until Day 26 to get back and continue to room 46.
First time in the antechamber was on Day 9 but didn't know what to do next and it then took me until Day 26 to get back and continue to room 46.
Unfortunately I didn't get all of it as I forgot to use an external battery pack and timelapse mode really drains the battery hard. Still I'm happy with what I got.
#dwarflab #dwarf2 #dwarfii
youtu.be/0teaVh8cscc
Unfortunately I didn't get all of it as I forgot to use an external battery pack and timelapse mode really drains the battery hard. Still I'm happy with what I got.
#dwarflab #dwarf2 #dwarfii
youtu.be/0teaVh8cscc
Merry Christmas everyone!
Merry Christmas everyone!
Part 2 solution below is a mess. I generate the expected expressions and when one fails try to fix it by switching wires. Works for my data but not really general.
pastebin.com/EVPesZji
Part 2 solution below is a mess. I generate the expected expressions and when one fails try to fix it by switching wires. Works for my data but not really general.
pastebin.com/EVPesZji
Brute-force work for this (even though a fast algorithm exists). First attempt took about 45 seconds but some minor changes brings that down to 7 seconds.
pastebin.com/bDrLDVJW
Brute-force work for this (even though a fast algorithm exists). First attempt took about 45 seconds but some minor changes brings that down to 7 seconds.
pastebin.com/bDrLDVJW
I don't think there were ny fancy optimisations, just emulated all the steps. collections.Counter made the last part nice and clean.
pastebin.com/U6Cf3cB3
I don't think there were ny fancy optimisations, just emulated all the steps. collections.Counter made the last part nice and clean.
pastebin.com/U6Cf3cB3
I don't know why I found this one so hard but I did. Given I was asleep for the first 3 hours rank is ok 4931/2962; yesterday woke earlier and was 4711/2966.
pastebin.com/75RTGdZF
I don't know why I found this one so hard but I did. Given I was asleep for the first 3 hours rank is ok 4931/2962; yesterday woke earlier and was 4711/2966.
pastebin.com/75RTGdZF
What sounded at first reading like a scary problem actually pretty straightfoward.
pastebin.com/7bfP4cVw
What sounded at first reading like a scary problem actually pretty straightfoward.
pastebin.com/7bfP4cVw
Python's cache decorator almost makes this feel like cheating. Almost.
pastebin.com/1M8NTsCC
Python's cache decorator almost makes this feel like cheating. Almost.
pastebin.com/1M8NTsCC
Another 2d path-finder today. This time with a binary chop search for part 2.
pastebin.com/4yKzhT2a
Another 2d path-finder today. This time with a binary chop search for part 2.
pastebin.com/4yKzhT2a
Part 2 needed a little bit of thought but surprisingly simple once I figured out how to approach it.
pastebin.com/zGsRBHcV
Part 2 needed a little bit of thought but surprisingly simple once I figured out how to approach it.
pastebin.com/zGsRBHcV
Not too bad today. Complex coords make moving in a direction and turning left/right trivial. Forward BFS to find costs. Run backwards to find the paths.
pastebin.com/39PSksZb
Not too bad today. Complex coords make moving in a direction and turning left/right trivial. Forward BFS to find costs. Run backwards to find the paths.
pastebin.com/39PSksZb
Part 2 was hard but I found a solution that gets the most likely answer from 10403 possibilities in under 6 seconds.
pastebin.com/sXP1KmT2
Part 2 was hard but I found a solution that gets the most likely answer from 10403 possibilities in under 6 seconds.
pastebin.com/sXP1KmT2
Day 13 gave me a headache. Solved it with integer division then checking if it was a valid solution. Python EAFP wins every time!
github.com/kupuguy/aoc2...
Day 13 gave me a headache. Solved it with integer division then checking if it was a valid solution. Python EAFP wins every time!
github.com/kupuguy/aoc2...
Had to think a bit about part 2 until I realised number of sides is same as number of corners.
github.com/kupuguy/aoc2...
Had to think a bit about part 2 until I realised number of sides is same as number of corners.
github.com/kupuguy/aoc2...
Very rare day when the part1 solution just worked for part2 as well. Darn that's a big number.
pastebin.com/WvkR73MZ
Very rare day when the part1 solution just worked for part2 as well. Darn that's a big number.
pastebin.com/WvkR73MZ
Pleasantly straightforward today. dict[complex,int] for the map then just breadth first search of reachable points at each level.
[Paste](pastebin.com/ZkarxUxn)
Pleasantly straightforward today. dict[complex,int] for the map then just breadth first search of reachable points at each level.
[Paste](pastebin.com/ZkarxUxn)
My solution and thought process are at www.reddit.com/r/adventofco...
I'm fairly happy with how it went today, ended up with a reasonably efficient solution.
My solution and thought process are at www.reddit.com/r/adventofco...
I'm fairly happy with how it went today, ended up with a reasonably efficient solution.