well its really quite simple but will require loads of coding thing to be done. kind of a starter concept of AI where the computer decides the move.....
Well the informal algo goes as follows... computer will calculate probability of winning and loosing for each possible move at each step in the game... if will then have to take a weighted average of those probability and calculate total winning probability... the move which gives him the highest total winning probability will be his move....... sounds simple isnt it but the coding of the same will ummmmm not complicated but will definately be lengthy.........
Keywords: algorithm to make tic tac toe, play tic tac toe with computer, tic tac toe