1. Home
  2. Explore
  3. Computer Science
  4. CS 188 Lecture 6

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

CS 188 Lecture 6

  • 28Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Game Types and Formalization

List four axes along which games can be categorized.

28 questions

  1. 1

    List four axes along which games can be categorized.

    Model answer

    Deterministic vs stochastic, number of players, zero-sum vs non-zero-sum, perfect vs imperfect information.

    Explanation

    These axes help classify games and determine appropriate solution methods.

  2. 2

    Give an example of a deterministic game and a stochastic game.

    Model answer

    Deterministic: chess. Stochastic: backgammon (dice rolls).

    Explanation

    In deterministic games, the outcome of each move is certain; in stochastic games, randomness is involved.

  3. 3

    What is a zero-sum game? How does it simplify utility representation?

    Model answer

    A zero-sum game is one where agents have opposite utilities; the sum of utilities is zero. This allows representing utility with a single number for one agent, with the other's utility being its negation.

    Explanation

    Zero-sum games model pure competition. The utility for one player directly determines the other's.

  4. 4

    Distinguish perfect information from imperfect information games, with examples.

    Model answer

    Perfect information: each player knows the full game state (e.g., chess). Imperfect information: players have hidden knowledge (e.g., poker).

    Explanation

    This distinction affects whether players must reason about unknown states.

  5. 5

    What are the components of a formal game specification?

    Model answer

    States, start state, players, actions (per player), transition function, terminal test, terminal utilities.

    Explanation

    This framework allows applying game-solving algorithms uniformly.

  6. 6

    Why is a policy needed instead of a fixed plan in adversarial games?

    Model answer

    Because the opponent's actions are unpredictable, a policy maps every state to an action, adapting to the current situation.

    Explanation

    A fixed plan fails if the opponent deviates from the assumed sequence.

  7. 7

    In a single-agent game tree, what is the value of a non-terminal state?

    Model answer

    The maximum of the values of its child states (since the agent chooses the best action).

    Explanation

    This is the optimal achievable outcome from that state.

  8. 8

    In minimax search, how are values computed at max nodes and min nodes?

    Model answer

    At a max node, the value is the maximum of the children's values; at a min node, the minimum of the children's values.

    Explanation

    Max nodes represent the player's turn (maximizing), min nodes the opponent's (minimizing).

  9. 9

    What is the minimax algorithm? Describe its recursive structure.

    Model answer

    Minimax computes the value of a state recursively: if terminal, return utility; if max, return max of children; if min, return min of children. It assumes optimal play by both sides.

    Explanation

    The algorithm explores the game tree to determine optimal move.

  10. 10

    What is the time and space complexity of minimax search?

    Model answer

    Time: O(bm)O(b^m)O(bm); space: O(bm)O(bm)O(bm), where bbb is branching factor and mmm is maximum depth.

    Explanation

    Depth-first search style gives linear space, but exponential time.

  11. 11

    What does it mean for a game to be 'solved'? Give an example.

    Model answer

    A game is solved when the outcome (win/loss/draw) is known assuming optimal play. Example: Tic-Tac-Toe is solved as a draw.

    Explanation

    Solving requires proving that the value of the initial state forces a particular outcome against optimal opponent.

  12. 12

    In the Pac-Man example with one ghost and no dots, why does minimax choose to move directly into the ghost?

    Model answer

    Because the scoring penalizes each time step (−1-1−1 per action), so being eaten quickly (one step) yields a higher score than delaying.

    Explanation

    Minimax assumes optimal ghost, which will eat Pac-Man; thus faster death minimizes penalty.

  13. 13

    What is alpha-beta pruning? Under what condition can a subtree be pruned at a min node?

    Model answer

    Alpha-beta pruning eliminates branches that cannot influence the root value. At a min node, if the current estimate falls below alphaalphaalpha (the max's best alternative on the path), prune remaining children.

    Explanation

    Because the max node will never choose this branch if it is worse than its guaranteed option.

  14. 14

    Define alphaalphaalpha and eta in alpha-beta search.

    Model answer

    alphaalphaalpha is the best value the max player can guarantee along the path to the root; eta is the best value the min player can guarantee.

    Explanation

    These bounds are updated during search and used to prune.

  15. 15

    Does alpha-beta pruning change the minimax value of the root? Why?

    Model answer

    No, because it only prunes branches that cannot affect the final decision; the root value remains the same.

    Explanation

    Pruning is safe: it avoids exploring irrelevant parts without altering the outcome.

  16. 16

    How does node ordering affect the effectiveness of alpha-beta pruning?

    Model answer

    Good ordering (exploring promising moves first) increases pruning; worst ordering yields no pruning. Perfect ordering reduces time to O(bm/2)O(b^{m/2})O(bm/2).

    Explanation

    If the best moves are seen early, more branches can be pruned later.

  17. 17

    What is meta-reasoning? How does alpha-beta pruning exemplify it?

    Model answer

    Meta-reasoning is using computation to decide what to compute. Alpha-beta uses bound information to decide not to explore certain subtrees, thus saving computation.

    Explanation

    It reasons about the value of further search and prunes when unnecessary.

  18. 18

    In the quiz tree with values 10, 8, 4, 100, 2, 20, which nodes were pruned by alpha-beta (assuming left-to-right order)?

    Model answer

    Nodes G (child of 100) and L (child of 20) were pruned. Additionally, the subtree after I was pruned.

    Explanation

    After finding 10 and 8, the max can guarantee 8; at min node with 4, then 100 is pruned because 4<8; later, after 2, the max's best is 10, so 20 subtree is pruned.

  19. 19

    Why do we need depth-limited search in game playing?

    Model answer

    Because the game tree is often too deep to explore fully; we stop at a depth limit and use an evaluation function.

    Explanation

    Limited computational resources require approximate solutions.

  20. 20

    What is an evaluation function? Give an example from chess.

    Model answer

    An evaluation function estimates the value of a non-terminal state. Example: weighted sum of piece values (queen=9, rook=5, etc.) for both sides.

    Explanation

    It is used in depth-limited search to replace the true terminal utility.

  21. 21

    How does search depth affect the behavior of ghosts using minimax?

    Model answer

    Shallow depth (e.g., 1) leads to simply chasing Pac-Man; deeper search (e.g., 10) allows flanking strategies and catching Pac-Man.

    Explanation

    Deeper search reveals longer-term consequences, enabling better tactics.

  22. 22

    What is the trade-off between evaluation function accuracy and its computational cost?

    Model answer

    A more accurate evaluation function allows shallower search, but if it is slow, it reduces the depth reachable within time limits.

    Explanation

    Similar to A*: expensive heuristic reduces searchable nodes.

  23. 23

    How can iterative deepening be used in game playing?

    Model answer

    Run depth-limited search with increasing depth limits. Use the best move from the previous depth as a fallback if time runs out during deeper search.

    Explanation

    It ensures an action is always available and allows deeper search when time permits.

  24. 24

    How can evaluation functions improve alpha-beta pruning?

    Model answer

    They can guide node ordering (expand promising moves first) and provide bounds that trigger early pruning.

    Explanation

    Better ordering increases pruning; bounds from evaluation can prune without full expansion.

  25. 25

    What problem occurred with depth-2 minimax for Pac-Man in the corridor, and how was it fixed?

    Model answer

    Pac-Man thrashed between two equally good moves because the evaluation (score after 2 steps) was symmetric. Fixed by adding a bonus for being closer to the next pellet.

    Explanation

    Poor evaluation gave no distinction; a better evaluation reflecting progress solved the issue.

  26. 26

    Why do ghosts using minimax change behavior near the end of the game?

    Model answer

    When search can reach terminal states, the evaluation function is replaced by exact terminal utilities, leading to optimal endgame play.

    Explanation

    At shallow depth, evaluation may favor proximity; at deeper depth, actual win/loss dominates.

  27. 27

    What is the significance of Deep Blue's achievement in chess?

    Model answer

    Deep Blue defeated world champion Kasparov in 1997 using specialized hardware, deep search (up to 40 ply), and a sophisticated evaluation function.

    Explanation

    It demonstrated that with enough computation and good evaluation, computers can beat humans in complex games.

  28. 28

    Why was Go considered harder for computers than chess?

    Model answer

    Go has a much larger branching factor (~300) and requires complex pattern recognition, making brute-force search infeasible.

    Explanation

    Classic search methods struggled; AlphaGo succeeded using Monte Carlo tree search and deep learning evaluation functions.

1 of 28
Question 1 of 28

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent