1. Home
  2. Explore
  3. Computer Science
  4. AI Course Announcements

Study methods

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

AI Course Announcements

  • 66Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Agents and Planning
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a reflex agent?

Tap to flipClick to flipspace

An agent that chooses an action based on its current percept, possibly with memory, without reasoning through the consequences of its actions.

Or swipe the card

66 cards

  1. What is a reflex agent?

    An agent that chooses an action based on its current percept, possibly with memory, without reasoning through the consequences of its actions.

  2. Can a reflex agent behave rationally?

    Yes. Rationality concerns whether behavior optimizes expected utility, not whether the agent plans ahead. A quick reflex can be the best action in a situation that demands an immediate response.

  3. What does the simple Pac-Man reflex agent do in the lecture example?

    It moves toward the nearest dot. This can work in a simple layout, but in another layout it repeatedly tries to move through a wall, wasting time and points.

  4. What question does a planning agent ask, and what does it do with the answer?

    It asks, “What if I take this sequence of actions?” It predicts the consequences and evaluates whether they achieve its goal.

  5. What two things does a planning agent need in order to reason about action sequences?

    A model of how the world works and a goal against which to evaluate predicted outcomes.

  6. How can a planning agent’s goal be specified?

    As a particular state to reach or as a condition that can be satisfied by many different states.

  7. What does it mean for a planning algorithm to be optimal?

    It is guaranteed to find a solution that achieves the goal at minimum cost, when such a solution exists.

  8. What does it mean for a planning algorithm to be complete?

    If a solution exists, the algorithm is guaranteed to find one.

  9. How does planning a complete Pac-Man route differ from repeatedly replanning to the nearest dot?

    A complete-route planner calculates a sequence of actions for the whole task before acting. A replanning agent finds a path to the nearest dot, executes it, then plans again for the next dot; it can act sooner but solves a sequence of smaller planning problems.

  10. What are the four components of a search problem?

    A state space, a successor function, a start state, and a goal test.

  11. What does a search problem’s state space represent?

    The set of possible abstract configurations relevant to the problem being solved.

  12. What information does a successor function provide?

    For a given state, it specifies the available actions and the states that result from those actions; it encodes how the modeled world works.

  13. What do the start state and goal test specify?

    The start state specifies where the search begins. The goal test checks whether a state satisfies the desired condition.

  14. What is a solution to a search problem?

    A sequence of actions, or plan, that transforms the start state into a state satisfying the goal condition.

  15. Why is a common search-problem interface useful?

    An algorithm that works with the interface can solve many real-world problems once each is represented using the interface’s components.

  16. Why does the quality of a search-problem model matter?

    Search algorithms operate on the model, so a poor representation of the real world can produce poor or unusable results even if the algorithm itself works correctly.

  17. How can a route-finding problem on a map be represented as a search problem?

    Use cities as states, roads to neighboring cities as successor transitions, the starting city as the start state, and the destination as the goal. A road’s distance can serve as its transition cost.

  18. How might a route-finding model account for more than distance?

    It could include other factors in transition costs, such as traffic or potholes, if those matter to the problem.

  19. What state representation is sufficient for Pac-Man pathing to a destination?

    Pac-Man’s location, because the pathing goal depends on reaching a location. The successor function must account for legal moves and walls.

  20. What additional information is needed in a Pac-Man state when the goal is to eat all dots?

    Pac-Man’s location and which dots remain. A fixed map can represent each dot location with a Boolean flag indicating whether food remains there.

  21. How does the successor function change when Pac-Man’s goal changes from pathing to eating all dots?

    It must update both Pac-Man’s location and the food representation, removing a dot when Pac-Man reaches it.

  22. What is the goal test for a Pac-Man problem whose goal is to eat all dots?

    Check whether all food-presence flags are false. Pac-Man’s final location need not be part of this goal condition.

  23. What state information may be needed to keep Pac-Man’s ghosts scared throughout a search task?

    The locations of remaining power pellets, the ghost scare timer, Pac-Man’s location, and the regular food-dot representation. Ghost locations are also needed if the model requires simulating ghosts respawning unscared.

  24. How should you decide whether a proposed search state contains enough information?

    Check whether it supports both the goal test and the successor function’s predictions. If either cannot be computed from the state, more information may be needed.

  25. Why can counting only the number of remaining food dots be insufficient for Pac-Man planning?

    The planner needs to know where the dots are to predict what happens after each action; a total count alone does not provide their locations.

  26. How do you estimate the size of a state space from its variables?

    Count the possible values for each variable and multiply those counts. For a set of independent Boolean variables, the number of combinations is a power of 222.

  27. Why can 303030 possible food locations produce 2302^{30}230 food configurations?

    Each location independently has two possibilities: food present or absent. The combinations therefore number 2302^{30}230.

  28. In the lecture’s Pac-Man example, how large is the search state space for eating all dots?

    It is approximately 120×230120 \times 2^{30}120×230, using 120120120 agent locations and 2302^{30}230 food configurations; ghost locations and facing direction are not needed for that formulation.

  29. In the same example, how large is the search state space for simple pathing?

    It has 120120120 states if the only relevant variable is Pac-Man’s location.

  30. Why are state-space size estimates often approximate rather than exact?

    Some combinations counted by the variables may be impossible, such as Pac-Man occupying a location where uneaten food remains. Excluding these can be possible, but a rough estimate is often sufficient to understand the scale.

  31. What is a state-space graph?

    A mathematical representation of a search problem in which nodes are states, arcs represent successor transitions, and goal states are the nodes that satisfy the goal test.

  32. How many times does a state appear in a state-space graph?

    Each state appears once in the graph.

  33. What does a search-tree node represent?

    A particular sequence of states reached by a sequence of actions from the start state.

  34. Why can the same state appear multiple times in a search tree?

    Different action sequences can lead to the same state, and each sequence can produce a separate tree node.

  35. Why can a search tree be larger than its state-space graph?

    The tree can contain multiple nodes for a state reached by different paths, while the graph contains each state only once.

  36. Can a small state-space graph have an infinite search tree?

    Yes. Cycles can allow paths of unbounded length. For example, a small graph with transitions that let the search alternate between states can generate infinitely many tree nodes.

  37. What is the fringe in tree search?

    The set of leaf nodes in the current search tree that are waiting to be expanded.

  38. What are the basic steps of tree search?

    Start with the initial state on the fringe; choose a fringe node by a strategy; check whether it satisfies the goal; if not, expand it using the successor function and add its successors to the fringe.

  39. Why do search algorithms typically construct the search tree on demand?

    The full tree can be enormous or infinite. Algorithms expand only the nodes needed as the search proceeds, rather than building the whole tree in advance.

  40. What is the branching factor BBB in a search tree?

    The number of successors per node, or an assumed upper bound on that number.

  41. If every node has branching factor BBB, approximately how many nodes are at depth MMM?

    Approximately BMB^MBM nodes.

  42. What is depth-first search’s node-selection strategy?

    Expand a deepest node on the fringe first. How ties are broken is a separate implementation choice.

  43. What is breadth-first search’s node-selection strategy?

    Expand a shallowest node on the fringe first, processing the search tree level by level.

  44. What is the worst-case time complexity of depth-first search when the maximum search depth is MMM?

    It may visit the entire tree, requiring approximately O(BM)O(B^M)O(BM) time.

  45. What is the space complexity of depth-first search with branching factor BBB and maximum depth MMM?

    Approximately O(BM)O(BM)O(BM), because the fringe holds unexpanded alternatives along the current path.

  46. Is depth-first search complete?

    It is complete when the search tree is finite. It can fail to find a solution in an infinite tree if it follows an infinite path.

  47. Is depth-first search optimal?

    No. It may find a goal along a deep or costly path before a better solution elsewhere.

  48. If the shallowest goal is at depth sss, what are the approximate time and space costs of breadth-first search?

    Both are approximately O(Bs)O(B^s)O(Bs), since the fringe can contain an exponentially large level of nodes.

  49. Is breadth-first search complete?

    Yes, when the branching factor is finite and a solution exists at a finite depth; it eventually reaches that depth.

  50. When is breadth-first search optimal?

    When every action has the same cost, because it finds a solution with the fewest actions. With differing action costs, it is not generally optimal.

  51. What is the main space trade-off between breadth-first and depth-first search?

    Breadth-first search may store an exponentially large fringe, while depth-first search uses much less memory, approximately proportional to branching factor times depth.

  52. How does iterative deepening search work?

    It repeatedly runs depth-limited depth-first search, increasing the depth limit after each unsuccessful run.

  53. How does iterative deepening combine advantages of depth-first and breadth-first search?

    It uses depth-first search’s low memory use while increasing limits so that shallow solutions are found before deeper ones, as in breadth-first search.

  54. Why is iterative deepening’s repeated work often acceptable?

    The deepest layer is exponentially larger than earlier layers and tends to dominate the work. Repeating the relatively small upper layers adds comparatively little overhead.

  55. How does uniform-cost search choose which fringe node to expand?

    It expands the node whose path from the start has the lowest cumulative cost.

  56. Why does uniform-cost search not stop as soon as a goal first appears on the fringe?

    A different fringe path may still reach the goal at a lower total cost. The algorithm waits until the goal is selected for expansion as the lowest-cost fringe node.

  57. Why is uniform-cost search optimal when step costs are positive?

    When it selects a goal, every remaining fringe path has at least as much cost as that goal path. Positive future costs cannot make those paths cheaper, so the selected goal has minimum cost.

  58. Under what cost assumptions is uniform-cost search complete?

    It is complete when the relevant step costs are positive and bounded away from zero, preventing endless expansion of paths whose costs stay below the cost of a solution.

  59. What is the effective-depth bound for uniform-cost search if the optimal solution costs C∗C^*C∗ and each step costs at least ϵ\epsilonϵ?

    A path costing less than C∗C^*C∗ can contain at most about C∗/ϵC^*/\epsilonC∗/ϵ steps, so this ratio serves as an effective depth bound.

  60. What are the approximate time and space costs of uniform-cost search in terms of effective depth ddd?

    Both can be exponential in effective depth, approximately O(Bd)O(B^d)O(Bd), where BBB is the branching factor.

  61. What is a limitation of uniform-cost search even though it is optimal?

    It expands paths according to cost so far without considering which direction is promising for reaching the goal, potentially exploring many irrelevant areas.

  62. How can one search implementation support depth-first, breadth-first, and uniform-cost search?

    Use a priority queue for the fringe and assign priorities according to the desired strategy: deeper paths for depth-first, shallower paths for breadth-first, or lower cumulative cost for uniform-cost search.

  63. In a terrain example with shallow and deep water, how does uniform-cost search behave?

    It expands cheaper shallow-water routes sooner and explores more expensive deep-water routes when needed to find the least-cost path.

  64. What can cause a route planner to make an apparently unreasonable detour, such as taking a boat?

    The model may be incomplete or mismatched with the real world—for example, a missing road can make a boat route appear to be the only available path.

  65. If a route planner gives an impossible turn, does that necessarily mean the search algorithm is faulty?

    No. The map or search-problem formulation may not accurately represent the real world, even when the search algorithm is working correctly.

  66. What should you do when a search result is poor because the model omits real-world details?

    Improve the problem formulation—such as the state representation, successor function, or costs—so it better captures the world being modeled.

Card 1 of 66
Card 1 of 66

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent