|Ken Shirriff -> Java -> Turnablock|
Play: Click on a black piece then drag to specify your rectangle to flip. Note: the square that you click will be the lower right corner of your rectangle. You can change the size of the board from 3x3 to 8x8. You can also select an easy or hard opponent. Click restart to start the game over.
This game was invented by J. H. Conway, and was described in the Mathematical Games column of Scientific American. The winning strategy is described there, and is related to the winning strategy for Nim. The hard setting implements the winning strategy, while the easy setting just tries to avoid making boneheaded moves. You can look at the Java console to see how you're doing.
A couple interesting points about the game. The player who goes first (i.e. you) can force a win by playing properly except for boards of size 3x4, 3x8, 4x7, and 7x8, for which the second player can force a win. Also, note that the game is guaranteed to eventually end; you can't flip forever.
The source is here.
You can find web pages with descriptions of more Conway games here and a collection of mathematical games links by Prof. Eppstein and Jeff Erickson.
You may also be interested in Conway's (surprisingly expensive) book Winning Ways: For Your Mathematical Plays.