advent of code 2019, problem 15.2

For day 15 we are given the programme for a robot that can help us explore a maze.


So we wrote a controller that used a simple wall follower maze solving algorithm to map out the maze.

While mapping the maze the robot tells us the location of an oxygen cylinder. The answer to part one is the distance from the robot’s starting location to the oxygen cylinder.

The answer to part to is to calculate how long it would take the oxygen to fill the maze assuming that the oxygen can move one step per minute.

The following video shows a simulation of the oxygen filling the maze.

advent of code 2019, problem 13.2

Advent of Code is an advent calendar of small coding problems. Typically, solutions to later problems rely on extending tools you create to solve earlier problems.

This year we have built a virtual computer to run programmes to solve some of the problems.

In problem 13 we are given a computer programme for a game and asked to find the final score when the game ends.

Here is a sample of the start of the programme:


The programme can be run and the score read from the output.

But to make this more interesting I created a “computer screen” to show the game running.

%d bloggers like this: