Here's a non-perl solution, with explanation.
For larger boards, this one is much faster than my program above. (You could try (29, 30, 2) or (39, 40, 2) as large examples where there's a unique button combination this program finds very quickly but that would take ages to found with the previous program.)
In reply to Re: Lights out puzzle (non-perl solution)
by ambrus
in thread Lights out puzzle
by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |