Advent Of Code 2015: Day 7

08 Dec 2015
CTF: Advent Of Code 2015
Link to challenge:
Date Completed: 07 December 2015



Wow this one was fun! I decided to use Z3Py, a theorem prover module for python. My solution essentially parses each command using regexp and adds the various boolean rules to a solver object. Finally, the theorem solver checks all possible values and prints out the results of every ‘wire’. Determining the answer is then very simple. To solve part 2 I simply changed the value of b in my input.txt to the answer from part a and reran the script.

No Comments

Posted in Advent Of Code 2015


Leave a Reply