Informed Search in Artificial Intelligence
Informed Search in Artificial Intelligence
Artificial Intelligence
This presentation will introduce informed search strategies in AI,
focusing on the Greedy First Search Algorithm and the A* Search
Algorithm.
Vivek Sharma - 64
Suryansh Srivastava - 56
Rachit Srivastava - 39
Informed Search in AI
Informed search algorithms utilize problem-specific information to
guide the search process. This information helps direct the search
towards promising paths, improving efficiency and reducing the
search space.
Difference Between Informed and
Uninformed Search
Uninformed Search Informed Search
Uninformed search algorithms have no knowledge Informed search algorithms leverage problem-specific
about the goal state or the problem domain. information to guide the search process.
They explore the search space blindly, considering all They use heuristics or domain knowledge to estimate
possible paths equally. the distance to the goal, prioritizing paths that are
likely to lead to a solution.
Greedy First Search Algorithm
Definition Example
Greedy First Search is a heuristic search algorithm that Imagine you're trying to find the nearest gas station.
expands the node closest to the goal, based on a Greedy Search would pick the gas station that appears
heuristic function. The heuristic function estimates the closest on the map, even if the actual distance might
distance from a given node to the goal node. be longer due to traffic or road closures.
Advantages and
Disadvantages of Greedy
First Search
Advantages Disadvantages
Greedy First Search is Greedy First Search can get
efficient and fast, especially stuck in local optima and
for problems with clear and might not find the optimal
well-defined heuristics. solution.
A* Search Algorithm
A* Search is an informed search algorithm that combines the
advantages of Greedy First Search and Dijkstra's Algorithm. It uses
a heuristic function to estimate the distance to the goal and
incorporates the cost of reaching the current node.
A* Search Algorithm
Cost
It considers both the cost of reaching a node from the start node and the
1 estimated cost of reaching the goal from that node.
Heuristic
2 A* Search combines the cost of reaching a node with the
estimated cost to reach the goal, using a heuristic function.
Optimal
A* Search aims to find the optimal path by evaluating
3
the total cost of each path. It guarantees finding the
shortest path, given a consistent heuristic function.
Advantages and
Disadvantages of A*
Search
Advantages Disadvantages
A* Search guarantees finding A* Search can be
the optimal solution, provided computationally expensive for
the heuristic function is complex problems. It requires a
admissible and consistent. It's good heuristic function, and its
often more efficient than other performance depends on the
search algorithms. accuracy of the heuristic.
Example Problem: N-Puzzle
The N-Puzzle is a classic problem where the goal is to rearrange a
set of numbered tiles in a grid to form a specific target
configuration. The missing tile can be moved around the grid to
reach the goal state.
Implementing Greedy
First and A* for N-Puzzle
Both Greedy First and A* can be implemented for the N-Puzzle. The
heuristic function can be defined based on the number of
misplaced tiles or the Manhattan distance between the tiles and
their target positions.
Comparing the
Performance of Greedy
First and A*
1 2
Greedy First A*
Greedy First Search may be A* Search guarantees finding
faster but doesn't guarantee an the optimal solution, but it can
optimal solution. be slower for complex
problems.