IPA FE Subject B sample Question 15
A question IPA Japan published in 基本情報技術者試験 科目B サンプル問題 問15, translated into English. ITPEC is based on the same exams.
From the answer group below, select the correct combination of answers to be inserted into A and B in the description.
In tic-tac-toe, the move with which you have the highest possibility of winning is determined. With the following procedure, the state transitions of the game are represented as a tree structure, and the evaluation value of each node other than the root is calculated. As a result, the move with the highest evaluation value among the children of the root is regarded as the move with the highest possibility of winning. A move selected by you is represented by ○, and a move selected by the opponent is represented by ×.
When the game is in the state of the root at the top of the figure, there are three moves you can select. Of them, the evaluation value of the child pointed to by A is A, and the evaluation value of the child pointed to by B is B.
Figure State transitions of tic-tac-toe
Answer group
Explanation
A: 0, B: −10 — evaluate from the leaves up: at the opponent's turn a node takes the minimum of its children, at your turn the maximum.
Child A (○ bottom left), the opponent's turn, has two children:
- •× bottom middle: you take the last cell, bottom right, a draw: 0
- •× bottom right: you play bottom middle and complete the middle column: win, 10
The opponent's node takes the minimum, min(0, 10) = 0: the opponent blocks your column.
Child B (○ bottom right), the opponent's turn, has two children:
- •× bottom left completes the left column of ×: a leaf, lose, −10
- •× bottom middle: you take the last cell, a draw: 0
Minimum: min(−10, 0) = −10. The middle child wins at once (10), so it is the move the procedure picks.
Answer (a)
Why not others:
- •(c) and (d) — A = 10 takes the maximum at A's node, but it is the opponent's turn there, so the minimum counts
- •(b) — B = 0 overlooks the opponent's winning reply × bottom left; the minimum includes that −10
Key rule: In a minimax tree, assume the opponent always picks the reply worst for you: take the minimum at the opponent's nodes and the maximum at yours.
Graph Traversal · AI-written, may contain errors
This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.