Skip to content Show Tic Tac Toe (noughts and crosses) is always such a nice example. I was thinking about strategies and decided to implement a program that plays Tic Tac Toe according to John von Neumann’s minimax. This is a kind of meta-strategy that can be used for playing any
game: Always chose the move that will minimize the maximum damage that your opponent can do to you. The algorithm works recursively by looking for the move that will let an optimally playing opponent inflict the least damage. The opponent’s strategy is calculated by way of the same algorithm, and so on. This means that on the first move, the computer investigates the entire game tree – it considers every single possible Tic Tac Toe game and then choses randomly among the best (least
dangerous) moves. Have a go at http://www.half-real.net/tictactoe/ Post navigation$\begingroup$ How many combinations are possible in the game So for example a game which looked like: (with positions 1-9)
[1][3][4][6][7] would be one combination
asked Jan 2, 2013 at 9:50
$\endgroup$ 3 $\begingroup$ This information is taken from this website. A naive estimate would be $9!=362\,880$, since there are $9$ possible first moves, $8$ for the second move, etc. This does not take into account games which finish in less than $9$ moves.
This gives a total of $255168$ possible games. This calculation doesn't take into account symmetry in the game. answered Nov 22, 2013 at 5:21
DarylDaryl 5,3933 gold badges25 silver badges39 bronze badges $\endgroup$ 3 $\begingroup$ I will say that the board combinations are 3^9, which is 19683 possibilities, and 2032 winning positions. The answer of 9! is related to how many ways we have to fell all the positions, rather than the possible combinations. I have answered this question already in another post, please see the next link: https://stackoverflow.com/a/54035004/5117217 Cheers! answered Jan 4, 2019 at 20:07
$\endgroup$ 2 Can there be a tie in ticEven after putting X in the middle square of the second level, we do not end in a tie. Based on these four cases, it is impossible to end in a tie in a 3x3x3 tic-tac-toe game. If both players play optimally, the first player will always win if they place their first move in the center of the cube.
What is a tie game of tic?cat's game (plural cats' games) (tic-tac-toe) A tie game. Comes from the concept that a cat cannot catch its own tail just like a player in tic-tac-toe cannot win a game that is already tied.
How many ways can you win 3d ticThere are 76 different possibilities for a win (16 rows in each direction, 2 diagonals per face in each direction (which makes 12 faces), and then 4 corner-to-corner diagonals), and this algorithm checks each one in sequence.
|