If player X chose move A, then player Y could (and, presumably, would) chose the middle move, which forces X to lose.
The difference between a multi-player game and a one-player game, such as the 8-puzzle described below, is that when choosing a step in the multi-player game, the player must anticipate the move of another player, who seeks to reduce the player's chances of winning. In the example above, for example, move A would lead to a win, if it weren't for that pesky player Y, and we must consider player Y's possible moves before choosing our own.
With each state, we compute all states available from it, then choose, from the set of all states ever computed, the one with the lowest "heuristic value." The heuristic value of a given state is a rough measure of how far away it is from the solution.
For this problem, we use the heuristic outlined in section 10.3: the heuristic of a puzzle state is the total, over all the out-of-place tiles, of their distances from their rightful places. For instance, in the starting state, tiles 5, 7, 4 and 8 are out of place. Their distances:
total heuristic value = 5 |
Anyway: an example search is illustrated below. We start with the initial state, from which we can reach 3 nearby states of heuristic value 6, 4, and 4. Choosing one of the states with value 4, we find that it leads to three new states of heuristic value 5, 3, and 5. The state of value 3 is the lowest we've seen so far; we stick with that one, which produces two new states of values 4 and 2, and the state of value 2 leads us to a state of value 1, then to the solution. Here's the picture:
These essay questions have no unique right answer. We wanted you to articulate your thoughts about the issues.