Solving a riddle with group theory In a videogame called "Heroes of Hammerwatch", there is an area in which players can try to solve a riddle to obtain loot. The riddle works like this:
The area contains a 3 by 3 field of squares, some of them glowing and some of them not. Stepping on any square "flips" that square and its neighbors (meaning a glowing square changes to not-glowing and a not-glowing square changes to glowing) except for diagonal neighbors.
Example:
1 2 3
4 5 6
7 8 9
Stepping on square 1 would flip the squares 2, 4 and 1 itself. Stepping on square 5 would flip 2, 6, 8, 4 and 5 itself.
You start with an arbitrary pattern (I think) and have to step on the squares in such a way as to make all of them glow.
I felt like this problem lends itself to group theory. This is what I got so far:
-stepping on each square is an element of the group
-the group operation is composition, so just stepping on one square after the other
-the neutral element is the act of not stepping on any square
-the inverse of every element is the element itself, because you just flip all the same squares again
-the group is abelian, because the only thing that matters is the amount of times a square gets "flipped", not the order
From here, I figured that, starting from an "empty" board (no glowing squares), every state of the board is the product of either pressing a square or not. Example:
1 0 0
0 0 0
0 0 1
(1 = glowing, 0 = not glowing)
This board is given by pressing square 1 and square 9, then pressing square 5 (the middle one), and not touching any other square.
From here, I have been stuck though. I tried to find the combination of squares to press to obtain the board
1 1 1
1 1 1
1 1 1
when starting from the empty board, but didnt really progress. Only found the subgroup generated by {1, 3, 5, 7, 9}. I also had the idea of using linear algebra for this riddle instead, but I really want to solve it with group theory for practice instead.
Do you guys have an idea?
 A: This is more of a comment but is too long for the comments. The mathematics of the solution seems to be very well discussed in the references made in the comments above, but I want to address your desire to model this problem with group theory.
One issue is that for this particular group the border between group theory and vector space theory is extremely thin: the group in question is literally the additive group of the $9$-dimensional vector space $(\mathbb{Z}/2\mathbb{Z})^9$ over the $2$-element field $\mathbb{Z}/2\mathbb{Z}$; and the problem can easily be translated between group theory language and vector space language.
From a purely group theoretic perspective, you wrote stepping on each square is a group element, and this gives $9$ particular elements of $(\mathbb{Z}/2\mathbb{Z})^9$.
In group theory language, your particular question comes down to asking about the subgroup of the group $(\mathbb{Z}/2\mathbb{Z})^9$ that is generated by those 9 elements: Does that subgroup contain the particular element with all $1$'s?
Crossing over the border and speaking vector space language, your question comes down to asking about the subspace of the vector space $(\mathbb{Z}/2\mathbb{Z})^9$ that is spanned by those $9$ elements: Does that subspace contain the particular element with all $1$'s?
The reason that this border is so thin is that in any vector space over the field $\mathbb Z / 2 \mathbb Z$, its additive subgroup is a direct sum of order $2$ cyclic groups, and the subgroup generated by a subset is identical to the subspace spanned by that subset.
