tailieunhanh - Algorithms and Networking for Computer Games phần 5

Về mặt khái niệm, đây không phải là vấn đề vì các thành phần trong MVC cũng có thể được phân phối (tức là luồng dữ liệu chạy qua các tự nhiên nhà nước, những vấn đề khá là khó để giải quyết, nhưng nếu chúng ta làm suy yếu tiêu chí của chúng tôi tối ưu, | 92 GAME TREES Figure A game tree with three possible outcomes from the perspective of max win draw loss. Figure A game tree with outcomes from the range -4 4 . 4-5 In Exercise 4-4 we concretize the game tree algorithms with an iterator abstraction. In this exercise use the following state changing functions instead move v Iterates all the possible moves from node v of player label v and returns nil when they are exhausted. apply v m Returns the successor node of v for move m. cancel u m Yields the parent node of u when move m is taken back. You can assume that a move is reversible . v cancel apply v m m . GAME TREES 93 4-6 Draw a complete game tree for Division Nim with eight matches. Analyse the outcome using minimax. 4-7 In Division Nim the heap cannot be divided into equal halves. Factor Division Nim relaxes this constraint by allowing a heap of 2n matches to be divided into two heaps of n matches if n has a common prime factor with the player s turn number. The turns are numbered consecutively starting from zero. Give a complete game tree for Factor Division Nim with seven matches and assign the values win loss and draw to the nodes. 4-8 One-Two-Three Nim is another simplification of Nim. It starts with a heap of n matches and on each turn a player removes one two or three matches from the heap. The player to pick the last match wins. Draw a complete game tree and analyse the outcome using minimax for this variant of Nim when n 6 see Figure . 4-9 Extend the game tree of Exercise 4-8 for n 9. Observe how wins and losses behave in max and min nodes. Can you design an evaluation function that gives for each node a perfect estimate of the utility function If so how does this affect playing One-Two-Three Nim 4-10 In Nim proper there are initially several heaps of matches. On each turn a player selects one heap and removes at least one match from that heap. The player to pick the last match wins. Draw a complete game tree and analyse the outcome using

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.