0% found this document useful (0 votes)
3 views

02_Search

The lecture discusses various search strategies in artificial intelligence, including uninformed searches like Breadth First Search (BFS) and Depth First Search (DFS), as well as informed searches such as A* Search. It highlights the complexities of real-world search problems, the structure of search spaces, and methods to optimize search processes. Additionally, it introduces concepts like Limited Depth-First Search and Bidirectional Search to improve efficiency in finding solutions.

Uploaded by

SUPREET MAURYA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

02_Search

The lecture discusses various search strategies in artificial intelligence, including uninformed searches like Breadth First Search (BFS) and Depth First Search (DFS), as well as informed searches such as A* Search. It highlights the complexities of real-world search problems, the structure of search spaces, and methods to optimize search processes. Additionally, it introduces concepts like Limited Depth-First Search and Bidirectional Search to improve efficiency in finding solutions.

Uploaded by

SUPREET MAURYA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Artificial Intelligence

Lecture 02 - Search

Dr. Rajiv Misra, Professor


Dept. of Computer Science & Engg.
Indian Institute of Technology, Patna
[email protected]
Searching – Problems and Solutions
Searching – Problems and Solutions
• Initial State
• Possible Actions
• Transition Model

This forms the state


space which is a graph.
Searching – Romania Map
Searching – Romania Map
• Initial State: in(A)

• Possible Actions: in(A) has


actions {go(S), go(T), go(Z)}

• Transition Model: Result


(in(A), go(Z)) = in(Z)
Searching – States/Graph

• States: Consider Agent and Dirt Locations. 𝑛2𝑛 states.


Searching – States/Graph
• Is this a goal state?
Searching – Problems in Real World

• States are much more complex

• Search Spaces can be huge

• NP-Hard (TSP)

• 2D/3D navigation
Searching – Finding a solution (Tree-Search)
Searching – Expanding Trees
Searching – Expand but ignore loops
Searching – Expanding Trees
Searching – Expanding Trees

A A B A B

C
Uninformed Search – Breadth First Search (BFS)
Breadth First Search

• If 𝒃 is the branching factor


• 𝒅 is the number of levels (depth) of the tree
• Time Complexity 𝑶(𝒃𝒅 )
Searching – Uniform Cost Search (UCS)
Searching – Romania Map
Depth First Search (DFS)
• DFS explores one branch completely
before backtracking to the next
branch.

• It lacks BFS's guarantees of finding


the shortest path.
Depth First Search (DFS)

• To address DFS limitations:

• Limited Depth-First Search: Stops expansion beyond a predefined depth,


reducing risk of infinite loops.

• Iterative Deepening DFS: Gradually increases the search depth, combining the
thoroughness of DFS with BFS's optimality.

• Bidirectional Search: Runs two simultaneous searches (one from the start and
one from the goal) until they meet. This reduces the effective depth to half, with
time complexity 𝑶(𝒃𝒅/𝟐 )
Informed Search

• Best First Search: node is selected for expansion based on an


evaluation function, f(n)
• Greedy Best First Search: Solely based on heuristic function denoted
h(n) = estimated cost of the cheapest path from the state at node n to a goal state.
• e.g., h(n) = straight line distance to the goal state
A* Search – Minimizing Cost

• Combines both cost to reach the node 𝑔(𝑛) and the cost to get from the
node to the goal ℎ 𝑛
𝑓 𝑛 =𝑔 𝑛 +ℎ 𝑛

• Algorithm is identical to uniform cost search but path cost is now f(𝑛)
A* Search – Example
Thank You

Dr. Rajiv Misra, Professor


Dept. of Computer Science & Engg.
Indian Institute of Technology, Patna
[email protected]

You might also like