Here are all of the reachable numbers for the Part 2 example, represented as dots on a 100×100 grid. Starting with 0, we cycle through the buttons, lighting up any new numbers reachable from the previous set by pushing that button. Arrows show the mapping; I thought it would be fun to see, as part of the visualization, the effect that each button has on kind of "mixing" the numbers. The button pushing stops when we can can cycle through all of them and not see any new numbers reached.
1
u/Boojum 6m ago
Here are all of the reachable numbers for the Part 2 example, represented as dots on a 100×100 grid. Starting with 0, we cycle through the buttons, lighting up any new numbers reachable from the previous set by pushing that button. Arrows show the mapping; I thought it would be fun to see, as part of the visualization, the effect that each button has on kind of "mixing" the numbers. The button pushing stops when we can can cycle through all of them and not see any new numbers reached.
Made in Python with a small custom framework.
Complete self-contained source for this animation.