This is a variant of the "Lights Out" puzzle which has interesting mathematical properties related to linear algebra over GF(2) and can be solved systematically using Gaussian elimination.
As you say, Gaussian elimination can be used for a more systematic approach.