If you like, you can change the "goal". Click on the "Set" button, then click on the squares to toggle the background colors. When you have the goal you want, click the "Play" button.

So what's this game doing on a math department site, I hear you cry. Well, if you know some linear algebra, you should be able to prove that it's possible to produce any pattern of red and blue squares from any starting configuration. This is pretty straightforward once you see how to translate the problem into a linear algebra problem.

While the linear algebra solution gives you an algorithm for solving the puzzle, it's pretty cumbersome. If you're clever, you can devise a simple algorithm based on parity ideas; this algorithm is easy to do on the fly. (If you want to cheat, you can extract the algorithm from the source code for the hint feature.)

Thanks to Art Benjamin for telling me about this puzzle.

Truth be told, this was mostly a good excuse to learn a little about Java. You can check out the Java Source.