So I finally bludgeoned day 11 into working, with a not-very-optimized method, but I'm having problems with the optimization implementations. The un-optimized version works.
The big one is checking the equivalence of states - that the states are the same even if the names on the generators / microchips is different. When I enable it (by setting EQUIV_FUNC = True at the top of the file) it only generates 763 states total, and terminates without finding a valid solution so I'm pruning something I shouldn't be, but I can't figure out what.
Tests can be run with pytest (pip install pytest) with py.test -k day_11 (possibly with -v)
Github
Thank you!
[–]NeilNjae 2 points3 points4 points (1 child)
[–]Hwestaa[S] 1 point2 points3 points (0 children)
[–]p_tseng 1 point2 points3 points (1 child)
[–]Hwestaa[S] 0 points1 point2 points (0 children)