Winter sale 50% off - get more info support@coursehigh.com

(Solved) : Consider Subtraction Game Two Players B Take Turns Removing Items Heap One Heap Player Ma Q39736475 . . .

$9.00

Consider the subtraction game: two players (A and B) take turnsremoving items from a heap (just one heap). Each player may removeeither one, two, or three items from the heap. The heap starts offwith 12 items, and player A moves first. The objective of the gameis to be the last player to remove items from the heap. That is, ifit is your turn to move, and the heap is empty, you’ve lost thegame1 . The Initial state for the game is (A, 12) indicating thatit is A’s turn to move and there are 12 items on the heap. Ingeneral then, a state is represented as (P, n) where P ∈ {A, B},and 0 ≤ n ≤ 12. The evaluation function for non-terminal nodes is asimple threshold function defined as:

eval(S) = {−1 if S.n mod (k + 1) = 0, 1 otherwise ( can’ t use alarge curly brace here ….we have { −1 if S.n mod (k + 1) = 0, and{ 1 otherwise

S.n refers to the number of items left in the heap in state S,and mod is the integer modulo function.

Draw the entire game tree, starting from the initial state, downto depth two (the initial state is at depth 0), and provide theevaluation for each state at depth 2. Using the minimax algorithm,provide the backed-up values for states at depth 1 and 0. ((Hint:Since you don’t have the entire game tree, and thus no terminalstates, you cannot use a utility value to calculate the backed upvalues. However, you do have an evaluation function.)

Which node(s) would not have been evaluated at depth 2 ifalpha/beta pruning was employed?

 

Expert Answer


Answer to Consider the subtraction game: two players (A and B) take turns removing items from a heap (just one heap). Each player …

Category:

Description

Consider the subtraction game: two players (A and B) take turnsremoving items from a heap (just one heap). Each player may removeeither one, two, or three items from the heap. The heap starts offwith 12 items, and player A moves first. The objective of the gameis to be the last player to remove items from the heap. That is, ifit is your turn to move, and the heap is empty, you’ve lost thegame1 . The Initial state for the game is (A, 12) indicating thatit is A’s turn to move and there are 12 items on the heap. Ingeneral then, a ... View full description