I made a Tic-Tac-Toe game to see the minimax strategy in action and it works quite well, the AI still hasn't lost a game yet. There are fewer than 9! (362 880) games states in Tic-Tac-Toe so I can search trough the whole game tree for the optimal move. The
utility function check for either a win, a loss, a draw or if the outcome of the game can't be decided yet and return a value accordingly.
I rank
win >
uncertain >
draw >
loss.
|
Tic-Tac-Toe |
Inga kommentarer:
Skicka en kommentar