Two expert and jaded tictactoe players, after drawing for the
nth time, decided to add some randomness to their favorite game.
First, they used a coin to decide who would start. Then, that player would pick his initial move randomly. Next, the other player would also pick his answer randomly. Finally, from then on the game went on as usual, with each player playing in the best possible way.
For each player, what are the odds of winning, losing, or drawing?
(In reply to
re: Solution by Charlie)
Possibly my program is using an incorrect winning strategy algorithm.
My algorithm is:
If I'm the second player ("0"), and the center square is empty, put a "0" there...
ELSE if I can win by putting my "x" or "0" to complete an array (an array being a row, column, or diagonal), win the game...
ELSE if my opponent is about to win, block him...
ELSE if two arrays meet in an empty square, such that both arrays have one of my marks ("x" or "0") and none of my opponent's marks, put my mark in that intersection square...
ELSE if two arrays meet in an empty square, such that both arrays have one of my opponent's marks and none of mine, put my mark in that intersection square....
ELSE if there is an available corner square, put my mark there...
Else put my mark in any empty square.

Posted by Penny
on 20041005 11:45:51 