I am trying to create minimax evaluation function for the Ms Pacman game. The goal of the player is to maximize score.
I have some idea about the features that I would like to use in my evaluation function (which is weighted sum of all features):
- avg distance to the ghosts
- is pacman close to pacdots
This can work in some way if AlphaBeta search considers only non-terminal nodes. However evaluation for the terminal nodes will be substantially different from evaluation of non-terminal nodes because we are returning true evaluation which is weighted score in this case. Hence once search reaches some terminal nodes, it may discard them completely or focus too much on them (depending on how our evaluation changes).
In games with decisive result we can directly evaluate loss/draw/win with some very small/big value to overwrite the effect of evaluation function during search and properly backpropagate evaluations.
However what is the correct approach for the games with score?
I was thinking about adding another feature such as is game finished and using it in evaluation but this does not seem like an optimal solution.
I will be thankful for any tips or references.