When the game starts, a random number or a stored pattern of these lights is switched on. Pressing any of the lights will toggle it and the adjacent lights.
The goal of the puzzle is to switch all the lights off, preferably in as few button presses as possible. (It's a lot harder than it sounds)
Check out the code and Unity project on my Github Repo .