Podcast
Questions and Answers
In the context of search algorithms, what is a heuristic function designed to estimate?
In the context of search algorithms, what is a heuristic function designed to estimate?
How close a state is to a goal.
Explain why using the actual cost as the heuristic in A* search might not be practical, despite its accuracy.
Explain why using the actual cost as the heuristic in A* search might not be practical, despite its accuracy.
Calculating the actual cost is computationally expensive and defeats the purpose of using a heuristic, which is to provide a quick estimate.
Describe the key difference in how Uniform-Cost Search (UCS) and A* Search expand nodes, particularly in terms of direction.
Describe the key difference in how Uniform-Cost Search (UCS) and A* Search expand nodes, particularly in terms of direction.
UCS expands equally in all directions, while A* expands mainly towards the goal, adjusting for optimality.
What are relaxed problems are and how are used when creating admissible heuristics?
What are relaxed problems are and how are used when creating admissible heuristics?
Explain the intuition behind why admissibility is a desired property for heuristics in A* search.
Explain the intuition behind why admissibility is a desired property for heuristics in A* search.
In A* search, what are the backward and forward costs, and how does A* make use of them?
In A* search, what are the backward and forward costs, and how does A* make use of them?
Describe a scenario where Greedy Search might fail to find the optimal path to a goal.
Describe a scenario where Greedy Search might fail to find the optimal path to a goal.
In A* search, under what condition is it safe to terminate the search once a goal node is enqueued?
In A* search, under what condition is it safe to terminate the search once a goal node is enqueued?
What is the key difference between Tree A* and Graph A* in terms of optimality guarantees?
What is the key difference between Tree A* and Graph A* in terms of optimality guarantees?
Explain what it means for a heuristic to be 'consistent.' How does consistency relate to admissibility?
Explain what it means for a heuristic to be 'consistent.' How does consistency relate to admissibility?
In the context of search algorithms, explain what is meant by the term 'fringe'.
In the context of search algorithms, explain what is meant by the term 'fringe'.
How is the best path determined in Greedy Search, and what is the primary factor influencing path selection at each step?
How is the best path determined in Greedy Search, and what is the primary factor influencing path selection at each step?
What is the formula that A* Search uses to determine the priority of nodes in the fringe, and what does each component of the formula represent?
What is the formula that A* Search uses to determine the priority of nodes in the fringe, and what does each component of the formula represent?
Why might an admissible heuristic still result in a suboptimal search process, even though it guarantees an optimal solution?
Why might an admissible heuristic still result in a suboptimal search process, even though it guarantees an optimal solution?
In the context of search problems, what is the significance of search operating over 'models' of the world, and what are the implications of this?
In the context of search problems, what is the significance of search operating over 'models' of the world, and what are the implications of this?
How can admissible heuristics be used in situations where an optimal solution is not strictly required?
How can admissible heuristics be used in situations where an optimal solution is not strictly required?
Describe when the number of misplaced tiles in the 8-puzzle can be used for the search heuristic?
Describe when the number of misplaced tiles in the 8-puzzle can be used for the search heuristic?
Explain how you can identify an algorithm is A* Search?
Explain how you can identify an algorithm is A* Search?
Provide a brief comparison of the effectiveness of Uniform Cost Search vs. greedy algorithm in A* Search?
Provide a brief comparison of the effectiveness of Uniform Cost Search vs. greedy algorithm in A* Search?
A* uses both backward costs and (estimates of) forward costs. What is the relationship between them?
A* uses both backward costs and (estimates of) forward costs. What is the relationship between them?
Explain why A* Tree search is optimal.
Explain why A* Tree search is optimal.
What must happen to demonstrate why an A* search to be optimal?
What must happen to demonstrate why an A* search to be optimal?
When can the same proof show that UCS is optimal?
When can the same proof show that UCS is optimal?
Are all search algorithms conceptually only priority queues, collection only for nodes with attached priorities and what do they depend on?
Are all search algorithms conceptually only priority queues, collection only for nodes with attached priorities and what do they depend on?
What does A* search rely on to be good?
What does A* search rely on to be good?
How does the idea of admissible heuristic relate to the 8 puzzle?
How does the idea of admissible heuristic relate to the 8 puzzle?
Explain how admissible heuristic in 8 tiles are the solutions to relaxed problems, making the actions available??
Explain how admissible heuristic in 8 tiles are the solutions to relaxed problems, making the actions available??
Under what circumstance would an AI program use Graph Search?
Under what circumstance would an AI program use Graph Search?
Why would you save on number of expanded nodes during A* search?
Why would you save on number of expanded nodes during A* search?
True or False and explain. Tile 5 and 6 can switch to solve the 8 Puzzle program, will the heuristic be admissible.
True or False and explain. Tile 5 and 6 can switch to solve the 8 Puzzle program, will the heuristic be admissible.
Should A* stop when you find itself enqueue a goal?
Should A* stop when you find itself enqueue a goal?
Name any two examples of search programs or functions, with each example, name their respective heuristic.
Name any two examples of search programs or functions, with each example, name their respective heuristic.
What is the difference in what a heuristic is designed for with both Informed search with an Uninformed search
What is the difference in what a heuristic is designed for with both Informed search with an Uninformed search
How does A* determine optimality to guarantee the search is finished.
How does A* determine optimality to guarantee the search is finished.
When should A* stop using an enqueue?
When should A* stop using an enqueue?
The 8-puzzle tiles can be solved when all of the tiles do what to move from state to state?
The 8-puzzle tiles can be solved when all of the tiles do what to move from state to state?
What are the factors of the quality of work node?
What are the factors of the quality of work node?
When using consistency, what should happen to "f" values along the path.
When using consistency, what should happen to "f" values along the path.
In the 8-puzzle tile, how can you keep track and avoid using the 8 tile as an ADT list?
In the 8-puzzle tile, how can you keep track and avoid using the 8 tile as an ADT list?
How does DFS/BFS practically avoid overhead?
How does DFS/BFS practically avoid overhead?
When using Models to simulate algorithms, are they used to simulate in the real world or in their own enviroment?
When using Models to simulate algorithms, are they used to simulate in the real world or in their own enviroment?
Flashcards
What is a heuristic?
What is a heuristic?
A function that estimates how close a state is to a goal; designed for a particular search problem.
What is Greedy Search?
What is Greedy Search?
Expands the node that seems closest to the goal based on the heuristic.
What is Uniform-cost search?
What is Uniform-cost search?
Orders nodes by path cost, or backward cost g(n).
What does Greedy search order by?
What does Greedy search order by?
Signup and view all the flashcards
What is A* Search?
What is A* Search?
Signup and view all the flashcards
What is an admissible heuristic?
What is an admissible heuristic?
Signup and view all the flashcards
What is the main idea of estimated heuristic costs?
What is the main idea of estimated heuristic costs?
Signup and view all the flashcards
When is Graph A* optimal?
When is Graph A* optimal?
Signup and view all the flashcards
How planning works
How planning works
Signup and view all the flashcards
What does A* use?
What does A* use?
Signup and view all the flashcards
Study Notes
- A heuristic estimates how close a state is to a goal.
- Heuristics are designed for particular search problems and examples include Manhattan distance and Euclidean distance for pathing.
Informed Search
- Informed search strategies include heuristics, greedy search, A* search and graph search.
Heuristic functions
- The straight-line distance to Bucharest from various cities are:
- Arad (366), Bucharest (0), Craiova (160), Dobreta (242), Eforie (161), Fagaras (178), Giurgiu (77), Hirsova (151), Iasi (226), Lugoj (244), Mehadia (241), Neamt (234), Oradea (380), Pitesti (98), Rimnicu Vilcea (193), Sibiu (253), Timisoara (329), Urziceni (80), Vaslui (199), Zerind (374).
Greedy Search
- In greedy search, the node expanded is the one that seems closest to the goal.
- A greedy search strategy expands a node believed to be closest to the goal state, using a heuristic to estimate the distance to the nearest goal.
- Greedy search is not optimal because the resulting path to Bucharest may not be the shortest.
- It can get stuck or take a badly-guided path.
A* Search
- Uniform-cost search orders by path cost (backward cost).
- Greedy search orders by goal proximity (forward cost).
- A* Search orders by the sum of path cost and goal proximity: f(n) = g(n) + h(n).
- With A* search, termination should occur when you dequeue a goal, not when you enqueue it.
A* Optimality
- Actual bad goal cost can be less than estimated good goal cost and estimated costs need to be less than actual costs for optimality.
Admissible heuristics
- Admissible heuristics are optimistic and therefore slow down bad plans but never outweigh true costs.
- A heuristic h is admissible if 0 ≤ h(n) ≤ h*(n), where h*(n) is the true cost to the nearest goal.
- Coming up with admissible heuristics is a significant part of using A* in practice.
Optimality of A* Tree Search
- If A is an optimal goal node, B is a suboptimal goal node and h is admissible, then A will exit the fringe before B.
- In A* tree search, imagine B is on the fringe.
- Some ancestor n of A is on the fringe too (maybe A!).
- n will be expanded before B because f(n) is less or equal to f(A) and f(A) is less than f(B).
- All ancestors of A expand before B, A expands before B and A* search is optimal.
UCS vs A*
- Uniform-cost search expands equally in all directions.
- A* search expands mainly toward the goal and hedges it bets to ensure optimality.
Creating Admissible Heuristics
- Most of the work in solving hard search problems optimally is in coming up with admissible heuristics.
- Admissible heuristics are often solutions to relaxed problems, where new actions are available.
- Inadmissible heuristics can also be useful.
8 Puzzle
- An example of a problem is the 8-puzzle where:
- The states are the arrangement of tiles, and how many there are.
- The actions possible are based on the space on the board.
8 Puzzle I
- A possible heuristic for the 8 puzzle is the number of tiles misplaced.
- The minimum number of steps is h(start) =8
- 112 nodes need to be expanded to find a solution where the optimal path has four steps, 6,300 nodes when it has 8 steps and 3.6x nodes when it has 12 steps
- This type of problem is relaxed problems
8 Puzzle II
- In an easier 8-puzzle, any tile could slide any direction at any time, ignoring other tiles.
- An admissible heuristic could be the Total Manhattan distance, with an average of 13 nodes expanded for 4 steps, 39 for 8 steps, and 227 for 12 steps. The minimum number of steps is h(start) = 3 +1+2+ = 18 ...
8 Puzzle III
- Using the actual cost as a heuristic:
- It is admissible.
- It saves on nodes expanded.
- The problem is the increase in work needed.
- There is a trade-off between quality of estimate and work per node; as heuristics get closer to the true cost, you expand fewer nodes, but more work per node is done to compute the heuristic itself.
Consistency of Heuristics
- The main idea is that estimated heuristic costs are less than or equal to actual costs.
- Admissibility means heuristic cost ≤ actual cost to goal.
- Consistency means heuristic "arc" cost ≤ actual cost for each arc (h(A) – h(C) ≤ cost(A to C)).
- Consequences of consistency: The f value along a path never decreases (h(A) ≤ cost(A to C) + h(C)) and A* graph search is optimal.
Optimality of A* Search
- Tree A* is optimal with an admissible heuristic.
- Graph A* is optimal with a consistent heuristic.
- With h=0, the same proof shows that UCS is optimal.
Search and Models
- Search operates over models of the world.
- The agent doesn't actually try all the plans out in the real world.
- Planning is all in simulation.
- Your search is only as good as your models.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.