fn configure_lights(machine: &Machine) -> u32
Check all patterns with one set bit, then patterns with two set bits, and so on, returning early as soon as we find a match without checking all possible combinations.