File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -184,11 +184,11 @@ puzzle without code: they did it using pen and paper, and/or by inspecting a vis
184
184
general shape of the graph and the places where it seemed off, but beyond that, it gave me a headache to try to
185
185
identify what the configuration of the full adder should look like for each z wire.
186
186
187
- I ended up implementing [ a solution by someone ] ( https://www.reddit.com/r/adventofcode/comments/1hneuf0/comment/m41ms44/ )
188
- who used a brute force approach I thought was pretty clever: set up a bunch of test devices with randomized x and y
189
- values, find a swap that results in the most improvement for all of them, and repeat until you find the set of 4 swaps
190
- that works for every test device. After adding caching to the evaluation of wire values, my solution ran in only 30s
191
- (the author reported it taking 2.5 mins on their machine). More details are in the code.
187
+ I ended up implementing a brute force [ solution ] ( https://www.reddit.com/r/adventofcode/comments/1hneuf0/comment/m41ms44/ )
188
+ I thought was pretty clever: set up a bunch of test devices with randomized x and y values, find a swap that results
189
+ in the most improvement for all of them, and repeat until you find the set of 4 swaps that works for every test device.
190
+ After adding caching to the evaluation of wire values, my solution ran in only 30s (the author reported it taking
191
+ 2.5 mins on their machine). More details are in the code.
192
192
193
193
I suppose slogging through it was worth the insight into how mathematical addition works at the level of logical gates
194
194
(you need a carry bit!), even if I didn't use that knowledge for the actual solution.
You can’t perform that action at this time.
0 commit comments