Nouvelle Stratégie de Recherche pour l`Alignement Multiple de

CAP 492
Tutorial # 6
Q1:
1. Describe the Minimax algorithm for search in two-player games.
2. Consider the two-player game shown in Figure 1.
1. Draw the complete game tree, using the following conventions:
• Write each state as (SA, SB) where SA and SB denote token locations.
• Put each terminal state in square boxes and write its game value in a circle.
• Put loop states (states that already appear on the path to the root) in double square
boxes. Since it is not clear how to assign values to loop states, annotate each with a
“?” in a circle.
2. Now mark each node with its backed-up minimax value (also in a circle). Explain
how you handled the “?” values and why.
3. Explain why the standard minimax algorithm would fail on this game tree and
briefly sketch how you might fix it.
4. This 4-square game can be generalized to n squares for any n > 2. In which case,
does A win?
Figure 1: The starting position of a simple game. Player A moves first. The two
players take turns moving, and each player must move their token to an open adjacent
space in either direction. If the opponent occupies an adjacent space, then the player
may jump over the opponent to the next available space. For example, if A is on 3 and
B is on 2, then A may move back to 1. The game ends when one player reaches the
opposite end of the board. If player A reaches space 4 first, then the value of the game
to A is +1; if player B reaches space 1 first the value of the game to A is −1.
Q2: Consider the following game tree in which the static scores (in brackets at the tip
nodes) are all from the first player's point of view. Assume that the first player is the
maximising player (i.e. MAX), and that high numbers represent better scores for
MAX.
(a) Use Minimax to determine which move the first player should choose.
(b) What nodes would not need to be examined using the alpha-beta pruning
algorithm| assuming that nodes are examined in left-to-right order?
Q3: Given the following game tree, give values (all different) to terminal nodes such
that α-β pruning algorithm cuts:
•
•
At least one terminal node assuming that nodes are examined in left-toright order.
At least one terminal node assuming that nodes are examined in right-toleft order.
Q4: Trace α-β pruning algorithm in the following game tree starting with the
following values: α = 9 and β = 14
Q4: 1. Give a formulation of the SODUKU game problem applied to the following
grid.
2. Propose an algorithm to solve this problem.
3. Propose a generalization of the formulation to a n*n grid.