The twenty-third problem was about running NICs (in Intcode) and simulate a network. Part 1 was quick, just create 50 Intcode processes and then take care of routing messages. Finally, abort once a packet is sent to the NAT controller (address 255).
For part 2 we should also detect idleness in the network, I didn’t do anything fancy just once a full cycle without a packet occurs, decide the network is idle. Keep track of NAT messages and halt once it cycles.
7> aefa_sophia_test:run_file("/Users/hans/Personal/Repos/AoC2019/23/sol_23.aes", "solve_1", []).
0 steps / 32864407 gas / 0 reductions / 1562.02ms
{revert,<<"Addr 255 is not routeable: (47969,17283)">>}
8> aefa_sophia_test:run_file("/Users/hans/Personal/Repos/AoC2019/23/sol_23.aes", "solve_2", []).
0 steps / 8909324928 gas / 0 reductions / 29257.81ms
11319
The twenty-fourth problem was about a variant of game of life. I solved part 1 using Bit-arrays (bits) since we had to score the first repeated game board and that score was exactly the bit array The twist for part 2 was to make the board infinitely recursive - though we only had to make 200 iterations so the size was manageable. Since it is Christmas I didn’t have time to optimize it, one could limit the computation quite a bit rather easily. But it runs in about 5 minutes.