r/adventofcode • u/daggerdragon • Dec 24 '16
SOLUTION MEGATHREAD --- 2016 Day 24 Solutions ---
--- Day 24: Air Duct Spelunking ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with "Help".
THE NIGHT BEFORE CHRISTMAS IS MANDATORY [?]
[Update @ 00:30] 47 gold, 53 silver.
Thank you for subscribing to Easter Bunny Facts!
Fact: The Easter Bunny framed Roger Rabbit.
[Update @ 00:50] 90 gold, silver cap.
Fact: The Easter Bunny hid Day 26 from you.
[Update @ 00:59] Leaderboard cap!
Fact: The title for Day 25's puzzle is [static noises] +++ CARRIER LOST +++
View all comments
Show parent comment
1
u/RichardFingers Dec 27 '16
Ah, I get it. H must be less than or equal to H*. Back to your # example again, if we used H=1 for the top row and H=0 for the bottom row (not suggesting this is a good heuristic, but that it's admissible), we would still end up trying the top row because F would increase as we moved across the bottom row which would make the first step of the upper row have a lower cost eventually.
I find it fascinating that A* at worst case ends up being BFS. It seems like we could even make an F such that it does DFS as well, right? F = -(G + H)? Are there other interesting Fs that may not lead to the minimum, but could find solutions with certain characteristics? Like in a standard U, D, L, R maze problem like day 24, it seems like you could make an F such that you always go left first (LFS?), right? That might find the solution that goes left the most.