Evaluation Function
- Another important approximation is an evaluation function.
- This is used in old fashioned games AI a lot, but is also
used in all kinds of current AI.
- The idea is that you evaluated the value of possible moves.
- You then choose the move with the best value.
- This is the way deep blue works to beat Kasparov in chess.
- The evaluation function looks at the board and says how good it
is. For chess you probably give positive weight to boards where you
have more pieces, and negative weight to boards where your opponent
does. You also look at things like control of areas of the
board.
- Importantly, you have to search ahead a few moves (deep blue
does 17-18 in hardware).
- The evaluation function is also critical for genetic algorithms.
- In games an agent will have to make trade offs. For example, it
has to accept some damage to hurt the opponent. Different
evaluation functions will lead to different behaviour.
- Note that the evaluation function is just an approximation of the
real state of the game.
- We'll revisit the evaluation function in the search lectures.