Module 2
Module 2
Search Algorithms
Contents
Informed search Algorithms: Best First Search, A*,
AO*, Hill Climbing, Generate & Test, Alpha-Beta pruning,
Min-max search.
Introduction
The aim of AI rational agent is to solve a problem without
intervention of the human.
To solve the problem:
1. There is a need to represent a problem. This representation
is called formalization.
2. Agent uses some strategies to solve the problem.
This strategy is searching technique.
Problem formulation
This step defines the problem which will help to understand and
decide the course of action that needs to be considered to
achieve the goal.
Hill climbing
Generate &
Test
Alpha – beta Min-max
pruning search
Uninformed search
‘Uninformed Search’ means the machine blindly follows the algorithm
regardless of whether right or wrong, efficient or inefficient.
These algorithms are brute force operations, and they don’t have extra
information about the search space; the only information they have is
on how to traverse or visit the nodes in the tree.
expanded and
In the OPEN list, it places nodes which have yet not been
expanded.
Best-first Search Algorithm (Greedy
Search)
Greedy best-first search algorithm always selects the path which
appears best at that moment.
It is the combination of depth-first search and breadth-first search
algorithms.
It uses the heuristic function and search. Best-first search allows us
to take the advantages of both algorithms.
With the help of best-first search, at each step, we can choose the
most promising node. In the best first search algorithm, we expand
the node which is closest to the goal node and the closest cost is
estimated by heuristic function.
3)
• It is the sum of two variables’ values that determines the node it picks
at any point in time.
• At each step, it picks the node with the smallest value of ‘f’ (the sum
of ‘g’ and ‘h’) and processes that node/cell.
• ‘g’ is the distance it takes to get to a certain square on the grid
from the starting point, following the path we generated to get
there.
• Steps:
1.Add start node to list.
2.For all the neighbouring nodes, find the least cost F node.
3.Switch to the closed list. For nodes adjacent to the current node. If the node is not
reachable, ignore it. Else. ...
4.Stop working when you find the destination. It is not possible to find the destination going
through all possible points.
9)
AO* Search Algorithm
• AO* algorithm is a best first search algorithm.