An unbeatable AI for a tic tac toe game