The game was originally called "Gale" and was invented by Dr. David Gale in 1958. He outlined a strategy for an automaton to play it. I programmed up the game about 5 years ago in C, using the strategy that Gale outlined. It plays a very good but not perfect game - you have to play "obscurely" to beat it.
The automaton's strategy was this. Imagine a rectangular lattice of resistors all of the same value of resistance. This lattice represents all the possible moves by one of the players, in this case the computer. Every time the opponent makes a move you break the resistor that the move intersects (resistance = infinity). Every time the computer makes a move you short-circuit the equivalent resistor (resistance = 0). You find the computer's "best" move at any time by applying a potential across the two sides that the computer is trying to join. The resistor with the greatest potential across it is the move it should play.
It's quite easy to "simulate the simulation" in a C program (though C++ might have been easier). Every pass through the simulated lattice adjusts each node's potential. You just iterate until the potentials settle down. Like I say, you can fool it, but you have to know how.