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

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

Which of the following is an axis along which games can be categorized?

23 questions

  1. 1

    Which of the following is an axis along which games can be categorized?

    1. A

      Online vs. offline

    2. B

      Explicit vs. implicit

    3. C

      Deterministic vs. stochastic

    4. D

      Continuous vs. discrete

    Correct answer
    C

    Deterministic vs. stochastic

    Explanation

    Games can be categorized as deterministic (e.g., chess) or stochastic (e.g., backgammon). Other axes include number of players, zero-sum vs. non-zero-sum, and perfect vs. imperfect information.

  2. 2

    In a zero-sum game, utilities for the agents are:

    1. A

      Opposite (one agent's gain is another's loss)

    2. B

      Always positive for both

    3. C

      Independent of each other

    4. D

      Determined by chance

    Correct answer
    A

    Opposite (one agent's gain is another's loss)

    Explanation

    In zero-sum games, agents have opposite utilities; the sum of their utilities is zero. This allows representing the game with a single number for one agent.

  3. 3

    Which of the following is NOT a component of the formal definition of a game in adversarial search?

    1. A

      A transition function

    2. B

      A reward function for each step

    3. C

      A set of states and a start state

    4. D

      Terminal utilities

    Correct answer
    B

    A reward function for each step

    Explanation

    The formalization includes states, players, actions, transition function, terminal test, and terminal utilities. A per-step reward function is not part of the basic game definition; utilities are only at terminal states.

  4. 4

    In a perfect information game, players:

    1. A

      Do not know the actions of other players

    2. B

      Have hidden information about their own cards

    3. C

      Rely on probabilistic outcomes

    4. D

      Know the entire state of the game at all times

    Correct answer
    D

    Know the entire state of the game at all times

    Explanation

    Perfect information means each player knows everything about the current state of the game, as in chess or checkers. Imperfect information games like poker involve hidden cards.

  5. 5

    What is the solution to a game formalized in adversarial search?

    1. A

      A sequence of actions from start to goal

    2. B

      A policy that maps states to actions

    3. C

      A set of all possible strategies

    4. D

      A fixed path regardless of opponent moves

    Correct answer
    B

    A policy that maps states to actions

    Explanation

    Because opponents may have multiple possible moves, the solution is a policy (strategy) that tells the agent what action to take in every state, unlike a fixed plan.

  6. 6

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

    1. A

      The sum of its children's values

    2. B

      The minimum of its children's values

    3. C

      The average of its children's values

    4. D

      The maximum of its children's values

    Correct answer
    D

    The maximum of its children's values

    Explanation

    Since the agent controls its own actions, it will choose the action leading to the highest value, so the value is the maximum of its children's values.

  7. 7

    In a two-player zero-sum game with alternating moves, the minimax value of a state is:

    1. A

      The utility of the first move only

    2. B

      The utility when both players play optimally

    3. C

      The utility when the opponent plays randomly

    4. D

      The maximum possible utility regardless of opponent

    Correct answer
    B

    The utility when both players play optimally

    Explanation

    Minimax assumes both players play optimally: one maximizes, the other minimizes. The result is the utility that the maximizing player can guarantee.

  8. 8

    In the minimax algorithm, the initial value of a max node before examining any children is:

    1. A

      −∞-\infty−∞

    2. B

      111

    3. C

      000

    4. D

      ∞\infty∞

    Correct answer
    A

    −∞-\infty−∞

    Explanation

    Max initializes to −∞-\infty−∞ so that any finite value from a child will be greater and become the new estimate.

  9. 9

    What is the time complexity of the minimax algorithm for a game tree with branching factor bbb and depth mmm?

    1. A

      O(mb)O(m^b)O(mb)

    2. B

      O(bm)O(bm)O(bm)

    3. C

      O(b+m)O(b + m)O(b+m)

    4. D

      O(bm)O(b^m)O(bm)

    Correct answer
    D

    O(bm)O(b^m)O(bm)

    Explanation

    Minimax explores the entire tree, so time complexity is O(bm)O(b^m)O(bm), exponential in depth.

  10. 10

    What is the space complexity of the minimax algorithm when implemented as depth-first search?

    1. A

      O(b)O(b)O(b)

    2. B

      O(bm)O(b^m)O(bm)

    3. C

      O(m)O(m)O(m)

    4. D

      O(bm)O(bm)O(bm)

    Correct answer
    D

    O(bm)O(bm)O(bm)

    Explanation

    Depth-first search requires storing the path and the children of each node, leading to O(bm)O(bm)O(bm) space.

  11. 11

    The game of Tic-Tac-Toe is considered 'solved' because:

    1. A

      The game tree has fewer than 100 nodes

    2. B

      Computers always win against humans

    3. C

      There is a known algorithm that wins every time

    4. D

      The minimax value of the start state is known to be 0 (draw)

    Correct answer
    D

    The minimax value of the start state is known to be 0 (draw)

    Explanation

    A game is solved if the outcome (win, lose, or draw) is known under optimal play. For Tic-Tac-Toe, minimax shows that optimal play leads to a draw.

  12. 12

    In alpha-beta pruning, what does the alpha value represent?

    1. A

      The average value of all explored nodes

    2. B

      The best value that the minimizer can guarantee along the current path

    3. C

      The best value that the maximizer can guarantee along the current path

    4. D

      The worst value that the maximizer can achieve

    Correct answer
    C

    The best value that the maximizer can guarantee along the current path

    Explanation

    Alpha is the maximizer's best option (maximum value) found so far on the path to the root. It is used to prune branches that cannot improve the maximizer's outcome.

  13. 13

    In alpha-beta pruning, when computing the value of a min node, pruning occurs if the current value estimate is:

    1. A

      Greater than or equal to beta

    2. B

      Greater than or equal to alpha

    3. C

      Less than or equal to beta

    4. D

      Less than or equal to alpha

    Correct answer
    D

    Less than or equal to alpha

    Explanation

    For a min node, if its value becomes <= alpha, the maximizer already has a better option elsewhere, so the remaining children can be pruned.

  14. 14

    What is the effect of alpha-beta pruning on the minimax value at the root?

    1. A

      It always returns a higher value than minimax

    2. B

      It has no effect; the value is identical to minimax

    3. C

      It returns a value between the true max and min

    4. D

      It may change the value if pruning is too aggressive

    Correct answer
    B

    It has no effect; the value is identical to minimax

    Explanation

    Alpha-beta pruning is guaranteed to compute the same minimax value at the root as the full minimax algorithm, as it only prunes branches that cannot affect the decision.

  15. 15

    Why does good child ordering improve the effectiveness of alpha-beta pruning?

    1. A

      It reduces the branching factor

    2. B

      It reduces the depth of the tree

    3. C

      It increases the likelihood of finding a good move early, causing more pruning

    4. D

      It makes the evaluation function more accurate

    Correct answer
    C

    It increases the likelihood of finding a good move early, causing more pruning

    Explanation

    If the algorithm explores promising moves first, it quickly establishes good alpha/beta bounds, allowing more pruning of later branches.

  16. 16

    With perfect ordering, alpha-beta pruning reduces the time complexity from O(bm)O(b^m)O(bm) to:

    1. A

      O(mb)O(m^b)O(mb)

    2. B

      O(bm/2)O(b^{m/2})O(bm/2)

    3. C

      O(blog⁡m)O(b \log m)O(blogm)

    4. D

      O(bm/m)O(b^m / m)O(bm/m)

    Correct answer
    B

    O(bm/2)O(b^{m/2})O(bm/2)

    Explanation

    Perfect ordering allows alpha-beta to prune about half the branches, reducing the effective branching factor to roughly b\sqrt{b}b​, leading to O(bm/2)O(b^{m/2})O(bm/2) time.

  17. 17

    In alpha-beta pruning, intermediate node values (other than the root) may be:

    1. A

      Incorrect (either too high or too low) due to pruning

    2. B

      Always exact

    3. C

      Always the minimum of children

    4. D

      Always the maximum of children

    Correct answer
    A

    Incorrect (either too high or too low) due to pruning

    Explanation

    Because pruning skips parts of the tree, the values propagated up from pruned nodes are only bounds, not exact values.

  18. 18

    What is the primary reason for using depth-limited search in adversarial games?

    1. A

      To reduce memory usage by limiting tree depth

    2. B

      To guarantee optimal play

    3. C

      Because the game tree is too deep to search exhaustively

    4. D

      To improve the accuracy of evaluation functions

    Correct answer
    C

    Because the game tree is too deep to search exhaustively

    Explanation

    Game trees are often too deep (e.g., chess with 3510035^{100}35100 states) to search to terminal states, so depth-limited search stops early and uses an evaluation function.

  19. 19

    An evaluation function in adversarial search is used to:

    1. A

      Estimate the utility of a non-terminal state

    2. B

      Prune branches during search

    3. C

      Determine the winner of the game

    4. D

      Generate all possible actions

    Correct answer
    A

    Estimate the utility of a non-terminal state

    Explanation

    Evaluation functions approximate the true utility of a state, allowing early termination in depth-limited search.

  20. 20

    In the game of chess, a common evaluation function is:

    1. A

      A weighted sum of material values (e.g., queen = 9, rook = 5)

    2. B

      The number of pieces on the board

    3. C

      The depth of the search tree

    4. D

      The total number of possible moves

    Correct answer
    A

    A weighted sum of material values (e.g., queen = 9, rook = 5)

    Explanation

    Chess evaluation often uses material counting with piece values plus positional factors, as mentioned in the lecture.

  21. 21

    In depth-limited minimax, if the evaluation function is inaccurate, the agent may:

    1. A

      Exhibit strange behavior like thrashing back and forth

    2. B

      Always win against a random opponent

    3. C

      Never make mistakes

    4. D

      Still play optimally due to search depth

    Correct answer
    A

    Exhibit strange behavior like thrashing back and forth

    Explanation

    The lecture demonstrated that with a poor evaluation function and shallow depth, Pac-Man thrashed between two equally good moves. Inaccurate evaluation can lead to suboptimal behavior.

  22. 22

    How can an evaluation function be used to improve alpha-beta pruning beyond just ordering children?

    1. A

      By replacing the utility of terminal states

    2. B

      By using the evaluation as a bound to prune even before exploring a node's children

    3. C

      By increasing the branching factor

    4. D

      By reducing the depth of the search

    Correct answer
    B

    By using the evaluation as a bound to prune even before exploring a node's children

    Explanation

    If the evaluation function provides a guaranteed bound (e.g., an upper bound for a max node), it can be used to decide whether to prune without expanding children, as mentioned in the lecture.

  23. 23

    In the Pac-Man mini contest, what additional challenge is introduced compared to the regular project?

    1. A

      Multiple agents must work together under time constraints

    2. B

      The maze is smaller but more complex

    3. C

      Ghosts are controlled by human players

    4. D

      Pac-Man must eat all ghosts before food

    Correct answer
    A

    Multiple agents must work together under time constraints

    Explanation

    The mini contest involves controlling multiple agents on large boards with a time penalty, making it more challenging than single-agent Pac-Man.

Question 1 of 23
Question 1 of 23

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent