part1 (2158B)
1--- Day 25: Cryostasis --- 2 3As you approach Santa's ship, your sensors report two important details: 4 5First, that you might be too late: the internal temperature is -40 degrees. 6 7Second, that one faint life signature is somewhere on the ship. 8 9The airlock door is locked with a code; your best option is to send in a small droid to investigate 10the situation. You attach your ship to Santa's, break a small hole in the hull, and let the droid 11run in before you seal it up again. Before your ship starts freezing, you detach your ship and set 12it to automatically stay within range of Santa's ship. 13 14This droid can follow basic instructions and report on its surroundings; you can communicate with it 15through an Intcode program (your puzzle input) running on an ASCII-capable computer. 16 17As the droid moves through its environment, it will describe what it encounters. When it says 18Command?, you can give it a single instruction terminated with a newline (ASCII code 10). Possible 19instructions are: 20 21 22 - [1m[97mMovement[0m via north, south, east, or west. 23 24 - To [1m[97mtake[0m an item the droid sees in the environment, use the command take <name of item>. For 25example, if the droid reports seeing a red ball, you can pick it up with take red ball. 26 27 - To [1m[97mdrop[0m an item the droid is carrying, use the command drop <name of item>. For example, if the 28droid is carrying a green ball, you can drop it with drop green ball. 29 30 - To get a [1m[97mlist of all of the items[0m the droid is currently carrying, use the command inv (for 31"inventory"). 32 33 34Extra spaces or other characters aren't allowed - instructions must be provided precisely. 35 36Santa's ship is a [1m[97mReindeer-class starship[0m; these ships use pressure-sensitive floors to determine 37the identity of droids and crew members. The standard configuration for these starships is for all 38droids to weigh exactly the same amount to make them easier to detect. If you need to get past such 39a sensor, you might be able to reach the correct weight by carrying items from the environment. 40 41Look around the ship and see if you can find the [1m[97mpassword for the main airlock[0m. 42 43