Skip to content

Commit d9c1328

Browse files
committed
tighten up a past journal entry
1 parent edcce40 commit d9c1328

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ puzzle without code: they did it using pen and paper, and/or by inspecting a vis
184184
general shape of the graph and the places where it seemed off, but beyond that, it gave me a headache to try to
185185
identify what the configuration of the full adder should look like for each z wire.
186186

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.
192192

193193
I suppose slogging through it was worth the insight into how mathematical addition works at the level of logical gates
194194
(you need a carry bit!), even if I didn't use that knowledge for the actual solution.

0 commit comments

Comments
 (0)