Advent of Code 2019 - Day 25

Note: This topic is to talk about Day 25 of the Advent of Code 2019.

There is a private leaderboard for elixirforum members. You can join it by following this linkand entering the following code:


1 Like

I did this by hand, so nothing great to share. But I did it decently fast and got 26 for pt2.


My solution today is an Elixir script that allows you to play the adventure game interactively.

I added some translation of the input commands, so that you can type “n” instead of “north” and “get” instead of take, and so on.

I also unintentionally added a cheat mode. If you pick up a lethal item (such as an infinite loop), the dying message will be printed, but you can continue to play.

I solved the problem by playing the adventure game manually. If I’ll get really bored during the rest of my Christmas vacations, I might implement an automatic solver.

Comparing this year’s Advent of Code to last year’s, this year had one puzzle that was much harder than anything last year. Overall I liked this year’s puzzle better than last year’s. There was less of finicky parsing and complex rules.

Merry Christmas! :christmas_tree::santa:


For part 25 I made a simple interactive runner, and then solved the game manually. I’m not particularly interested in building the autosolver.

In general, I enjoyed the first half of this edition, but didn’t like most of the more demanding challenges in the second half. I found they were challenging me in a way I was less interested in (like “spot the special input” solution on day 16, manual boolean reduction on day 21, or math problem on day 22). I also didn’t really enjoy solving puzzles which were not particularly challenging but were finicky (e.g. day 20, or day 24).

I quite enjoyed comparing solutions with y’all, and I think this was for me the best thing about AoC this year. Thanks everyone, and have a happy holidays!


I gave up on the autorunner when I realized that if could go past the first gate I may have to explore again, get new items, and new gates.

So maybe I will give it a change with an interactive runner :slight_smile: Was it long to complete ?

edit: I was really bored because I first used my A* algorithm for pathfinding. But I forgot that rooms may not have doors to all adjacent doors. And I don’t know how to do pathfinding with nodes and edges. That may be interesting, and I could create a new command which would be goto 2 3 that would create an input sequence to move along a path instead of typing directions one by one.

I wondered the same thing but was happy to see that there’s a single door. I spent about 20 minutes getting the interactive runner to work.

A* is great when you have a large search space that can be pruned by a heuristic and searched. In this case, bfs would be enough since the map is small. I would break it into 2 segments if I automated—collection and then weight enumeration.

I gave it another try and I think my pathfinding is ok.

But now I have a different kind of problem:

“Alert! Droids on this ship are heavier than the detected value!”

There are two types of items, thoses that make you too heavy (“droids are lighter than the detected value”), and the light ones.

My problem is that any single heavy item makes me too heavy (“droids are lighter bla bla bla”), but the combination of all the light items aren’t enough (“droids are heavier bla bla bla”). So I’m stuck.

Solved it by trying all combinations. It just makes not sense, as any elvish tech I guess.

Are you sure that you have found and picked up all objects?

Yes I finished part 1 yesterday (last line edited in my previous post, I should have make it more clear I edited).

I am kind of disappointed that there is no logic in the item weights.