Lab 21: Minimax Search
- Traditional game playing, like chess, makes use of
a range of search techniques.
- One of those techniques is minimax.
- The idea is that Player X maximizes, and Player O Minimizes.
- The search is based on this heuristic.
- The task for today is to build a minimax search for
noughts and crosses (tic-tac-toe).
- Make a function to print out a game board. (2 points)
- In chess, you can't evaluate the end of the game, but
in noughts and crosses you can. The evaluation function
is 1 for x-wins, 0 for a draw, and -1 for O wins.
Make this function. (2 points)
- Now fold out the minimax strategy, and play the game. X starts. (3 points)
- Your system can play both Xs and Os.
- Make a GUI, and let a person play. (3 points)