Informed Search
- 77Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What elements define a search problem?
77 questions
- 1
What elements define a search problem?
Model answer
A search problem defines states, available actions, a successor function with action costs, a start state, and a goal test.
Explanation
Together, these elements describe an abstract model of the world and how an agent can move through it toward a goal.
- 2
Why are states described as abstractions of the world?
Model answer
A state captures the aspects of a world configuration that matter for the agent’s decisions, rather than every detail of the real world.
Explanation
The abstraction is chosen to suit the problem being solved.
- 3
What does a successor function specify?
Model answer
For each state and available action, it specifies the resulting state and the action’s cost.
Explanation
It models how the world changes when the agent takes an action.
- 4
What does a node in a search tree represent?
Model answer
A search-tree node represents a path to a state, including the actions taken to reach it.
Explanation
The same state can therefore appear in multiple search-tree nodes if reached by different paths.
- 5
How is the cost of a path or plan calculated?
Model answer
It is the sum of the costs of all actions taken along that path.
Explanation
Search algorithms can use this accumulated cost to compare candidate paths.
- 6
What is the fringe in a search algorithm?
Model answer
The fringe is the collection of nodes that are available to be expanded next.
Explanation
A search strategy determines which fringe node is selected for expansion.
- 7
What makes a search algorithm optimal?
Model answer
An optimal search algorithm finds a least-cost plan to a goal.
Explanation
Finding any goal-reaching plan is not sufficient for optimality if a cheaper plan exists.
- 8
What does it mean for a search algorithm to be complete?
Model answer
It is complete if it finds a solution whenever one exists.
Explanation
Completeness concerns whether a solution is eventually found, not whether it has the lowest cost.
- 9
How can a priority queue support different search strategies?
Model answer
Store fringe nodes in a priority queue and assign priorities according to the strategy; the node with the best priority is selected next.
Explanation
Depth-first search can instead use a stack, and breadth-first search can use a regular queue, though a priority queue gives a more unified implementation.
- 10
What information does Uniform Cost Search use to select a node?
Model answer
It selects the fringe node with the lowest accumulated path cost.
Explanation
It uses the cost so far, but does not use information about how close a state appears to the goal.
- 11
Why can Uniform Cost Search expand many states that are not toward the goal?
Model answer
It has no estimate of which direction leads to the goal, so it explores states according to path cost rather than goal proximity.
Explanation
In a grid, it can expand broadly in every direction before reaching the goal’s cost level.
- 12
How can one predict which states Uniform Cost Search will expand in an unweighted maze?
Model answer
It expands states whose distance from the start is less than the cost of the shortest path to the goal.
Explanation
In the example discussed, this meant that nearly every reachable state was expanded before the goal.
- 13
How does Tree Search generally proceed?
Model answer
It puts the start node on the fringe, repeatedly selects a fringe node, checks whether it is a goal, and expands non-goal nodes by adding their successors.
Explanation
The process continues until a goal is selected or the fringe is empty.
- 14
In the pancake-flipping problem, what is the goal arrangement?
Model answer
The pancakes are stacked in size order, with the largest at the bottom and the smallest at the top.
Explanation
Each pancake has a different size, so the goal specifies one ordered arrangement.
- 15
What action can be taken in the pancake-flipping problem?
Model answer
Place a spatula between pancakes or beneath the bottom pancake, then flip the entire portion above the spatula.
Explanation
A flip reverses the order of the pancakes in the flipped portion.
- 16
Why are there three useful actions for a stack of four pancakes?
Model answer
The spatula can be placed between the second and third pancakes, between the third and fourth, or beneath the fourth; placing it between the top two does not change the stack usefully.
Explanation
The action that flips only the top pancake leaves it on top and does not create a different arrangement.
- 17
How many possible pancake-stack states are there for four distinct pancakes?
Model answer
There are 4!=24 possible states.
Explanation
There are four choices for the bottom pancake, then three, two, and one choices for the remaining positions.
- 18
In the pancake example, what determines the cost of an action?
Model answer
The action cost is the number of pancakes flipped.
Explanation
This models the idea that flipping more pancakes requires more energy.
- 19
Why might the number of pancakes out of position be a useful heuristic?
Model answer
Every pancake that is out of position must be flipped at least once, so the count gives a lower-bound estimate of remaining cost.
Explanation
The estimate relates to the goal, though it may be less precise than another heuristic for a particular stack.
- 20
How can the largest out-of-place pancake define a pancake-flipping heuristic?
Model answer
Use the size identifier of the largest pancake still out of place as the heuristic value.
Explanation
That pancake must be reached by a flip extending at least as far into the stack as its position requires, so the value estimates unavoidable work.
- 21
Why should a pancake heuristic be zero at the goal?
Model answer
A heuristic is intended to estimate the remaining cost to the goal, and no cost remains once the goal has been reached.
Explanation
For example, a count of correctly ordered pancakes would need to be transformed, such as by subtracting it from the total, to represent remaining distance.
- 22
What is a heuristic function in informed search?
Model answer
A heuristic estimates how much cost remains from a state to a goal.
Explanation
It provides guidance about goal proximity that ordinary uninformed search does not use.
- 23
Why must a heuristic be designed for a particular search problem?
Model answer
The heuristic must estimate goal distance using information and structure relevant to the specific problem.
Explanation
Different problems have different states, actions, costs, and goals, so a useful estimate for one may not fit another.
- 24
Why is Manhattan distance a reasonable heuristic for grid movement restricted to north, east, south, and west?
Model answer
It reflects the number of horizontal and vertical moves needed while ignoring obstacles, making it quick to compute and tied to the allowed movement directions.
Explanation
Walls can make the true route longer, so Manhattan distance is an estimate rather than necessarily the actual route cost.
- 25
Why may Euclidean distance be less suitable than Manhattan distance for a grid where diagonal movement is forbidden?
Model answer
Euclidean distance reflects straight-line travel, including diagonal displacement, while the agent can move only along grid directions.
Explanation
It may therefore fit the movement structure less closely than Manhattan distance.
- 26
What heuristic can be used for finding a route to Bucharest in the Romania map example?
Model answer
Use the straight-line distance from each city to Bucharest.
Explanation
The estimate can be computed from the cities’ geographic coordinates and gives a measure of their proximity to the destination.
- 27
Why is a heuristic normally expressed in units comparable to path cost?
Model answer
It estimates the remaining cost, so its values should represent the same kind of quantity as the costs accumulated along a path.
Explanation
This makes the estimate meaningful when combined with the cost already incurred.
- 28
What does it mean for one heuristic to dominate another?
Model answer
A heuristic h1 dominates h2 if h1(n)≥h2(n) for every node n.
Explanation
This comparison applies when the first heuristic is at least as large at every node; some heuristics cannot be compared this way.
- 29
What trade-off arises when choosing a more informative heuristic?
Model answer
A more informative heuristic can reduce the number of nodes expanded, but it may require more computation to calculate.
Explanation
Heuristic design balances the cost of computing estimates against the search work they save.
- 30
What does the heuristic h=0 imply when used by A Star?
Model answer
A Star becomes equivalent to Uniform Cost Search.
Explanation
With no estimated remaining cost, nodes are ordered only by their accumulated path cost.
- 31
What is Greedy Search’s rule for choosing a fringe node?
Model answer
It selects the node with the lowest heuristic estimate of remaining cost.
Explanation
It focuses on which node appears closest to a goal and ignores the path cost already incurred.
- 32
Why did Greedy Search choose Fagaras over Ramnicu Valcea in the Romania example?
Model answer
Fagaras had the smaller straight-line-distance heuristic to Bucharest.
Explanation
Greedy Search ranked those options by estimated remaining distance, not by the cost already spent reaching them.
- 33
Why can Greedy Search return a more expensive route than another available route?
Model answer
It ignores accumulated cost and may favor an expensive action because that action makes the current state appear closer to the goal.
Explanation
It can follow a promising-looking path while overlooking a cheaper route that is less attractive according to the heuristic alone.
- 34
What does it mean for Greedy Search to go down a rabbit hole?
Model answer
It keeps following a path that appears promising according to the heuristic, potentially neglecting other fringe paths that could lead to a better solution.
Explanation
A poor heuristic can direct Greedy Search away from the useful part of the state space.
- 35
How can Greedy Search behave when its heuristic is poor?
Model answer
It can behave like badly guided depth-first search, exploring many unhelpful states before finding a solution.
Explanation
Its efficiency depends strongly on whether the heuristic points toward a goal.
- 36
Why might Greedy Search expand fewer states than Uniform Cost Search in a maze yet still be inferior?
Model answer
It may use little search effort by following heuristic guidance, but the route it finds can be suboptimal because it ignores accumulated cost.
Explanation
In the Pac-Man example, it expanded relatively few states but took a longer route than the optimal one.
- 37
How does Greedy Search differ from the everyday use of the word “greedy” in this lecture’s terminology?
Model answer
Technically, Greedy Search specifically orders nodes by heuristic value alone.
Explanation
It does not combine the heuristic with the path cost already accumulated.
- 38
What score does A Star Search use to order fringe nodes?
Model answer
It uses f(n)=g(n)+h(n), where g(n) is the cost so far and h(n) estimates the remaining cost.
Explanation
The combined score accounts for both the path already taken and the estimated cost still to come.
- 39
How does A Star balance the strengths of Uniform Cost Search and Greedy Search?
Model answer
It considers both accumulated path cost and estimated distance to the goal, combining cost sensitivity with heuristic guidance.
Explanation
Uniform Cost Search uses the cost so far, while Greedy Search uses only the heuristic estimate.
- 40
In the illustrated Romania search, why did A Star expand the node with total score six before nodes with larger scores?
Model answer
That node had the lowest value of accumulated cost plus heuristic estimate on the fringe.
Explanation
A Star selects the node with the smallest g+h score.
- 41
When should A Star declare success: when a goal is added to the fringe or when it is removed from the fringe?
Model answer
It should declare success when the goal is removed from the fringe.
Explanation
A cheaper path may still be discovered while a goal node is waiting on the fringe.
- 42
Why is stopping when a goal is enqueued a bug in A Star?
Model answer
The first goal added to the fringe may be reached by a more expensive path than a goal path that has not yet been discovered.
Explanation
In the example, stopping at the first enqueued goal gave cost five, while continuing the search found a path of cost four.
- 43
What is a counterexample used for when evaluating a search algorithm?
Model answer
It is an example showing that the algorithm fails to satisfy a claimed property, such as returning a suboptimal solution.
Explanation
A single valid failure case is enough to disprove a guarantee that is supposed to hold in all cases.
- 44
Is A Star guaranteed to be optimal with every possible heuristic?
Model answer
No. Its optimality guarantee requires additional conditions on the heuristic.
Explanation
An inadmissible heuristic can cause A Star to select a suboptimal goal first.
- 45
How can an overly pessimistic heuristic cause A Star to return a suboptimal solution?
Model answer
It can assign an excessively high estimated remaining cost to a promising path, leaving that path on the fringe while a worse goal is selected first.
Explanation
The suboptimal example misled the search into delaying the path that actually had the lower total cost.
- 46
What does a heuristic estimate represent in relation to the start and goal?
Model answer
It estimates the cost still needed to reach a goal from the current state, not the cost already incurred from the start.
Explanation
In A Star, this remaining-cost estimate is added to the accumulated cost so far.
- 47
What is an admissible heuristic?
Model answer
A heuristic is admissible if, at every node, it never estimates more than the optimal remaining cost to a goal.
Explanation
It is optimistic because its estimate is a lower bound on the true cheapest remaining cost.
- 48
Does an admissible heuristic have to be accurate?
Model answer
No. It only has to avoid overestimating the optimal remaining cost.
Explanation
An admissible heuristic can be weak and uninformative while still supporting A Star’s optimality guarantee for Tree Search.
- 49
What optimality guarantee does A Star Tree Search have with an admissible heuristic?
Model answer
It finds a least-cost path to a goal.
Explanation
The guarantee depends on the heuristic being admissible and on Tree Search being used.
- 50
Why is straight-line distance admissible for route finding when route costs are at least as large as straight-line distances?
Model answer
The straight-line distance cannot exceed the actual cheapest route distance, so it provides a lower-bound estimate.
Explanation
The route may need to bend or take detours, making its cost larger than or equal to the direct distance.
- 51
Why is the largest out-of-place pancake identifier an admissible heuristic in the example?
Model answer
A flip must reach at least as far into the stack as that pancake to put it in place, so the heuristic does not exceed the required work.
Explanation
It estimates unavoidable flipping depth without claiming that this alone completes the sorting.
- 52
How can the optimality proof for A Star Tree Search be organized?
Model answer
Let a be an optimal goal node and b a suboptimal goal node, then show that a is removed from the fringe before b.
Explanation
If every optimal goal is selected before any suboptimal goal, the first goal selected must be optimal.
- 53
Why must some ancestor of an optimal goal node remain on the fringe while a suboptimal goal is on the fringe?
Model answer
If neither the goal nor any of its ancestors remained on the fringe, the optimal goal node would already have been expanded.
Explanation
An unexpanded goal path must still have a frontier node along it.
- 54
How does admissibility help prove that an ancestor of an optimal goal is selected before a suboptimal goal?
Model answer
It ensures that the ancestor’s f score is no greater than the optimal goal’s path cost, which is less than the suboptimal goal’s cost.
Explanation
Since A Star removes nodes in increasing f order, the ancestor is selected first; this reasoning can be repeated along the path to the optimal goal.
- 55
Why must an admissible heuristic be zero at a goal in the setting discussed?
Model answer
A goal has zero remaining cost, and a nonnegative admissible estimate cannot exceed that zero cost.
Explanation
Thus the heuristic contributes nothing to a goal node’s A Star score.
- 56
What is a relaxed-problem heuristic?
Model answer
It is the optimal solution cost of a simplified problem created by allowing additional actions or removing constraints.
Explanation
Because the relaxed problem is easier than the original, its optimal cost can provide a lower bound on the original problem’s cost.
- 57
Why does solving a relaxed problem produce an admissible heuristic?
Model answer
The relaxed problem allows at least the original options, so its optimal cost cannot be greater than the original problem’s optimal cost.
Explanation
Its solution cost therefore underestimates or equals the actual cheapest cost.
- 58
How can the misplaced-tile count serve as a heuristic for the eight-puzzle?
Model answer
Count the tiles that are not in their goal positions; each such tile must undergo at least one move.
Explanation
The count is a lower bound on the number of moves when each tile move costs one.
- 59
What relaxed problem corresponds to the misplaced-tile heuristic?
Model answer
Allow an action to pick up any tile and place it directly in its destination, without requiring it to slide into the empty space.
Explanation
In this relaxed problem, each misplaced tile can be corrected in one action, so the solution cost equals the number of misplaced tiles.
- 60
How is total Manhattan distance calculated for the eight-puzzle?
Model answer
For each tile, calculate its Manhattan distance from its current position to its goal position, then sum these distances.
Explanation
This estimates the minimum number of individual grid steps the tiles must make.
- 61
What constraints are relaxed by the total-Manhattan-distance heuristic for the eight-puzzle?
Model answer
It treats tiles as if they can move toward their destinations without being constrained by the positions of other tiles.
Explanation
Removing those interactions creates an easier problem whose optimal cost is a lower bound for the real puzzle.
- 62
How did the two eight-puzzle heuristics compare in the examples discussed?
Model answer
The total-Manhattan-distance heuristic led to fewer expansions than the misplaced-tile heuristic: 73 rather than 227 in the example.
Explanation
It provided a more informative estimate while remaining admissible.
- 63
Why is the exact remaining cost a poor practical heuristic even though it is admissible?
Model answer
Computing it would require solving the problem, so the effort to obtain the heuristic could defeat the purpose of using search.
Explanation
A useful heuristic must balance informativeness against the computation required to calculate it.
- 64
What is the effect of taking the maximum of two admissible heuristics?
Model answer
The maximum is also admissible and is at least as informative as either heuristic individually.
Explanation
At every node, the maximum of two lower bounds is still no greater than the true optimal remaining cost.
- 65
What problem does Graph Search address compared with Tree Search?
Model answer
It avoids repeatedly expanding the same state when that state appears along multiple paths in the search tree.
Explanation
Repeated appearances can cause unnecessary or even exponential growth in the search tree.
- 66
What is the closed set in Graph Search?
Model answer
It is the set of states whose successor functions have already been called.
Explanation
Before expanding a state, Graph Search checks whether it is already in the closed set.
- 67
What does Graph Search do when a candidate state is already in the closed set?
Model answer
It skips expanding that state again.
Explanation
The purpose is to prevent repeated work on states that have already been expanded.
- 68
Why should the closed collection be implemented as a set rather than a list?
Model answer
A set supports checking membership more efficiently than searching through a list.
Explanation
Slow membership checks can make the search algorithm substantially less efficient.
- 69
Why can Graph Search remain complete when it skips already-expanded states?
Model answer
It skips repeated occurrences of states that have already been reached and expanded, rather than removing access to entirely new states.
Explanation
The search can still follow the state-space connections from the expansions it has already performed.
- 70
Why can Graph Search fail to be optimal with an inadmissible or otherwise unsuitable heuristic?
Model answer
It may expand a state first along an expensive path and then refuse to re-expand it when a cheaper path to that state is later found.
Explanation
Skipping the later occurrence can prevent the search from discovering the optimal route onward from that state.
- 71
Why was it safe in the breadth-first example to skip a later occurrence of a state?
Model answer
The state had already been reached in fewer steps, so any continuation from the later occurrence would be no better.
Explanation
The later path reached the same state at greater depth, and the available continuations from that state were the same.
- 72
What does it mean for a heuristic to be consistent?
Model answer
For every transition from a state to a successor, the heuristic estimate at the first state is no greater than the transition cost plus the estimate at the successor.
Explanation
Consistency imposes a local relationship between heuristic estimates and action costs, not just a bound on cost to the goal.
- 73
How does consistency differ from admissibility?
Model answer
Admissibility bounds the heuristic by the optimal remaining cost to a goal, while consistency checks the heuristic relationship across each individual transition.
Explanation
Consistency is a stronger condition and supports optimality for A Star Graph Search.
- 74
What happens to A Star’s f value along a path when the heuristic is consistent?
Model answer
It never decreases as the path is extended.
Explanation
Consistency ensures that the next state’s added path cost and heuristic estimate together produce an f value at least as large as the previous one.
- 75
What optimality guarantee does A Star Graph Search have with a consistent heuristic?
Model answer
It finds a least-cost path to a goal.
Explanation
Consistency ensures that states do not need to be revisited along a cheaper path after expansion.
- 76
Why can A Star Graph Search stop when it removes a goal from the fringe if the heuristic is consistent?
Model answer
The goal has the lowest f score at that point, and consistency ensures that later expansions cannot produce a path with a lower f score.
Explanation
Thus no unexpanded alternative can lead to a cheaper goal path.
- 77
Why does consistency imply admissibility in the setting discussed?
Model answer
Applying the consistency condition along a path to a goal bounds the heuristic by the cost of that path, and therefore by the optimal goal cost.
Explanation
This is why the consistency-based guarantee for Graph Search is stronger than the admissibility-based guarantee for Tree Search.

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