Here’s the source to my Tic Tac Toe PHP game. I originally wrote this in Perl before porting it to PHP. It’s quite primitive (load a new page every time you make a move). It has a computer opponent with a decent AI, implementing Minimax (see http://en.wikipedia.org/wiki/Minimax for more) algorithm. You can see it running here. […]