Python GUI and AI to play Tic Tac Toe perfectly