Lights Out: https://veerasundar.com/lights-out-online-game/
Run Here: https://ideone.com/a1Go1a
Edit beg
variable to set initial state, 1
for lights on and 0
for off.
Program outputs list of (x, y)
coordinates you need to press to solve it in optimal moves.
The Algorithm uses Breadth-First-Search by considering state of game as graph node.