How to determine the utility function for each playback?
Carefully ;-) This article shows how a slightly spoiled evaluation function (for example, which either does not go βdeepβ enough to look forward in the tree of possible layers, or one that could not fix the relative strength of some positions of the board) leads to a general weak algorithm (which loses more often).
he cannot recognize them by himself, can he?
No, it is not. However, there are ways to get the computer to study the relative strength of the positions on the board. For example, looking at Donald Mitchie and his MENACE program , you will see how the stochastic process can be used to learn advice without any a priori knowledge, but the rules of the game. The funny thing is that, although this can be implemented on computers, it requires several hundred colored beads and matches, due to the relatively small size of the playing space, as well as due to various symmetries.
Having learned such a cool way to teach a computer how to play, it may not be so interesting for us to return to MinMax for Tic-Tac-Toe. In the end, MinMax is a relatively simple way to prune a decision tree , which is hardly necessary for a small tic-tac-toe game space. But, if we must ;-) [back to MinMax] ...
We can look into the βmatch boxβ associated with the next game (that is, without going deep at all), and use the percentage of balls associated with each square as an additional factor. Then we can evaluate the traditional tree, but only go, say, 2 or 3 steps forward (a dull perspective depth, which usually ends usually in losses or draws) and evaluate each next move based on a simple -1 (loss), 0 (draw / unknown), +1 (win). By that time, combining the percentage of beads and a simple rating (for example, adding, of course, not by multiplication), we can effectively use MinMax in a way that is more akin to how it is used in cases where it is impossible to evaluate the game tree to the end.
Bottom line: in the case of Tic-Tac-Toe, MinMax becomes more interesting (for example, helping us examine the effectiveness of a particular utility function) when we remove the deterministic nature of the game associated with the easy estimation of a complete tree. Another way to make the game [mathematically] interesting is to play with an adversary who makes mistakes ...