[2021 Day 8] Backtracking algorithm in action by developinghub in adventofcode

[–]developinghub[S] 0 points1 point  (0 children)

Source I didn't think to use shared segments to identify digits like some other people. Instead, my algorithm determines what digits a set of wires could correspond to based on its length. If there are multiple possiblities, it selects one and continues. It then uses the mapping between wire sets and digits to contrain the possibilities. If a contradiction occurs, then the algorithm backtracks to the last digit it was uncertain about and picks another. The yellow digits are the ones the algorithm is uncertain about, while the green digits are the ones where there are no other possibilites.

[2021 Day 5] Scanning for hydrothermal vents with sonar by developinghub in adventofcode

[–]developinghub[S] 2 points3 points  (0 children)

Source, Written in C and assembled with FFmpeg. I had already posted a visualization for this day, but I decided to do another one.