006 Searching Methods in AI
006 Searching Methods in AI
SEARCH METHODS IN AI
• Most often, these agents run some sort of search algorithm in the background to
accomplish their tasks.
• Uninformed search algorithms or blind search algorithms are the search algorithms
used to find solutions to a problem that does not involve domain knowledge.
• They are used in artificial intelligence to find relevant solutions by exploring all
possibilities of the problem space.
• have no prior information about the states or actions associated with the
problem domain.
• systematically explore the problem space until they find a solution or exhaust
all possibilities.
• rely solely on the definition of the problem and some predefined rules.
• guarantee a solution if a possible solution for this problem exists.
• easy to implement as they do not require any additional expertise.
Use the BFS algorithm to find all vertices of the following graph.
Use the BFS algorithm to find all vertices of the following graph.
Use the DFS algorithm to find all vertices of the following graph.
Use the DFS algorithm to find all vertices of the following graph.
• Informed search algorithms use domain-specific heuristics to guide the search process
efficiently.
• They prioritize exploring paths or states that are most likely to lead to a solution.
• A heuristic function helps the search algorithm to select a branch from the available
branches.
• The best first search algorithm is a version of the first depth-first search using
heuristics.
• Each node is evaluated according to its distance to the target.
• The node closest to the final state is explored first.
• If the path does not reach the goal, the algorithm goes back and chooses another node
that did not previously appear to be the best.
A* Search
• The previous algorithm we discussed only considers the distance of the nodes from the
target.
• A* uses the path from the start node to the current node and the path from the current
node to the destination.
• The heuristic function is therefore:
A* Search
Algorithm
1. Create a Priority Queue.
2. Insert the starting node.
A* Search
Algorithm
1. Create a Priority Queue.
2. Insert the starting node.
3. Remove a node from the priority queue.
A* Search
Algorithm
1. Create a Priority Queue.
2. Insert the starting node.
3. Remove a node from the priority queue.
3.1. Check if it is the goal node. If yes, then exit.
A* Search
Algorithm
1. Create a Priority Queue.
2. Insert the starting node.
3. Remove a node from the priority queue.
4. 3.1. Check if it is the goal node. If yes, then exit.
5. 3.2. Otherwise, mark the node as visited and insert its neighbors into the priority
queue. The priority of each node will be the sum of its cost from the start and the goal.
Name two types of algorithms that are used to explore a search space and
find the target state from an initial state.
• An overview of the key features, benefits and limitations of informed and uninformed
search algorithms, which are fundamental concepts in artificial intelligence and
problem solving.
• The choice between these two types of algorithms depends on the problem at hand
and the available expertise.