qball, perhaps if you explained your "ttt player, NEVER lose, win OR tie" line because I sure don't get it.
It all depends on how "smart" you want this AI to be. The computers first turn should probably always be random, or perhaps always be center if it's not taken.
O|2|3 O|2|X O|2|X
4|X|6 4|X|6 X|X|O X went first, and it will be a tie, unless someone plays dumb
7|8|9 O|8|9 O|8|9
Likely hood is a tie. Ah, well... enough win/lose/tie debate, how have you decided to implelemt this, or do you want more ideas?