Eric
Eric
1. Breadth-First Search (BFS): strategy, the shallowest unexpanded node is expanded first.
- Example: Consider a simple map where each node represents a city, and edges represent roads
connecting them. BFS can be applied to find the shortest path between two cities.
B C D
- Example: Solving a maze where each cell is a state, and actions are moving in different directions. DFS
can be used to explore paths until the exit is found.
B C D
E F G
3. Uniform-Cost Search (UCS): increases the node with the least expensive path
H I J
- Example: Pathfinding in a transportation network where the cost of traveling between locations
varies. UCS would find the path with the lowest total cost.
4. A* Search: Uses a heuristic function to estimate the cost from the current state to the goal, combining
it with the cost-so-far.
- Example: Pathfinding in a grid where each cell has a different terrain cost. A* uses a heuristic function
to estimate the cost to reach the goal efficiently.
● A B E I J
● A B F J
● A c F J
5. Greedy Best-First Search: Chooses the node with the lowest heuristic value, focusing solely on the
estimated cost to the goal.
- Example: Traveling salesman problem, where the goal is to visit a set of cities once and return to the
starting city. Greedy best-first search can prioritize cities based on their proximity.
6. Iterative Deepening Depth-First Search (IDDFS): Repeatedly applies DFS with increasing
depth limits until the goal is found.
- Example: Solving a puzzle, such as the eight-puzzle or fifteen-puzzle, by incrementally increasing the
depth limit until a solution is found.
7. Bidirectional Search: Simultaneously performs BFS from the start state and the goal
state until they meet in the middle.
- Example: Finding the shortest path between two locations in a graph. Bidirectional search explores
the graph simultaneously from the start and goal nodes until they meet.
8. Depth-Limited Search: Similar to DFS but with a depth limit, preventing the algorithm
from going too deep.
- Example: Navigating a tree structure where the goal is to find a specific leaf node within a limited
depth.