SlideShare a Scribd company logo
Chap 4:
Searching Techniques
Artificial Intelligence
605451
Dr.Hassan Al-Tarawneh
Motivation
Attempt the end, and never stand to
doubt, nothing’s so hard, but search
will find it out
“Robert Herrick”
What we will cover ?
 Ideas in searching
 Searching tree
representation
 Uninformed and informed
search
 Game playing search
Problem as a State Space
Search
 To build as system to solve a particular problem, we
need:
 Define the problem: must include precise
specifications ~ initial solution & final solution.
 Analyze the problem: select the most important
features that can have an immense impact.
 Isolate and represent : convert these important
features into knowledge representation.
 Problem solving technique(s): choose the best
technique and apply it to particular problem.
The Quest
 Typical questions that need to be answered:
 Is the problem solver guaranteed to find a solution?
 Will the system always terminate or caught in a infinite
loop?
 If the solution is found, it is optimal?
 What is the complexity of searching process?
 How the system be able to reduce searching
complexity?
 How it can effectively utilize the representation
paradigm?
Important Terms
 Search space  possible conditions and solutions.
 Initial state  state where the searching process
started.
 Goal state  the ultimate aim of searching process.
 Problem space  “what to solve”
 Searching strategy strategy for controlling the
search.
 Search tree  tree representation of search space,
showing possible solutions from initial state.
Example: The Bridges of
Konigsberg Problem
•Classical graph
applications.
•Introduced by Leonhard
Euler.
•Problem: Can a person
walk around the city
crosses each bridge
exactly once?
Example: The Bridges of
Konigsberg Problem (cont)
B
D
C
A
b1
b2
b3
b4
b6
b5
b7
Predicates: Connect (B, C, b5)
Example: Traveling
Salesperson Problem
•Suppose a salesperson has five cities to visit and them
must return home. Goal  find the shortest path to
travel.
B
C
D
E
75
50
100
100
125
125
125
75
50
A
Searching for Solution
•Search through state space (explicitly using searching
tree).
•Node expansion :- generating new node related to previous
nodes.
•Concepts:
•State :- conditions in which the node corresponds.
•Parent node :- the superior node
•Path cost :- the cost, from initial to goal state.
•Depth:- number of steps along the path from initial state
Node expansion
Node expansion (initial)
Node expansion
(expanding Arad)
Node expansion
(expanding Sibiu)
Measuring Searching
Performance
•The output from problem-solving (searching) algorithm is
either FAILURE or SOLUTION.
•Four ways:
•Completeness : is guaranteed to find a solution?
•Optimality: does it find optimal solution ?
•Time complexity: how long?
•Space complexity: how much memory?
•Complexity : branching factor (b), depth (d), and
max. depth (m)
Searching Strategies
•Heuristic search  search
process takes place by
traversing search space with
applied rules (information).
•Techniques: Greedy Best
First Search, A* Algorithm
•There is no guarantee that
solution is found.
•Blind search  traversing
the search space until the
goal nodes is found (might be
doing exhaustive search).
•Techniques : Breadth First
Uniform Cost ,Depth first,
Interactive Deepening
search.
•Guarantees solution.
Blind Search : Breadth First
Search (BFS)
•Strategy ~ search all the nodes expanded at given depth
before any node at next level.
•Concept : First In First Out (FIFO) queue.
•Complete ?: Yes with finite b (branch).
•Complexity:
•Space : similar to complexity – keep nodes in every memory
•Optimal ? = Yes (if cost =1)
Blind Search : Breadth First
Search
1 2
43
Blind Search : Depth First
Search (DFS)
•Strategy ~ search all the nodes expanded in deepest path.
•Last In First Out concept.
•Complete ?: No
•Complexity:
•Space : O(bm) – b ; branching factor, m ; max. depth
•Optimality ? : No
Blind Search : Depth First
Search (DFS)
1 2 3
4 5
…….
N+1
Blind Search : Iterative
Deepening DFS (ID-DFS)
•Strategy ~ combines DFS with best depth limits.
•Gradually increase the limit; L=0, L=1… and so on.
•Complete ?: Yes (if b is finite)
•Complexity:
•Space :
•Optimality ? : yes (if path costs are all identical)
Blind Search : Iterative
Deepening DFS (ID-DFS)
Summary
Heuristic Search :
•Important aspect: formation of
heuristic function (h(n)).
•Heuristic function  additional
knowledge to guide searching
strategy (short cut).
•Distance: heuristic function
can be straight line distance
(SLD)
A*
B C*
D
E
h(n)=0
h(n)=34
h(n)=24
h(n)=67
h(n)=12
h(n)=9
Heuristic Search : Heuristic
Function
Heuristic Search :Greedy-
Best Search
•Tries to expand the node that is closest to the
goal.
•Evaluates using only heuristic function : f(n) = h(n)
•Possibly lead to the solution very fast.
•Problem ? ~ can end up in sub-optimal solutions
(doesn’t take notice of the distance it travels).
•Complexity and time:
•Complete & optimal ? : No (stuck in infinite loop)
Heuristic Search :Greedy-
Best Search
1
2
Heuristic Search :Greedy-
Best Search
3
Heuristic Search : A*
Algorithm
•Widely known algorithm – (pronounced as “A star”
search).
•Evaluates nodes by combining g(n) “cost to reach
the node” and h(n) “cost to get to the goal”
•f(n) = g(n) + h(n), f(n)  estimated cost of the
cheapest solution.
•Complete and optimal ~ since evaluates all paths.
•Time ? ~ a bit time consuming
•Space ? ~ lot of it!
Heuristic Search : A*
Algorithm
S
GE
DA
G’ H
:10
:8 :9
:0:4 :0 :3
2 3
2
5 13
Path cost for S-D-G
f(S) = g(S) + h(S)
= 0 + 10  10
f(D) = (0+3) + 9  12
f(G) = (0+3+3) + 0  6
Total path cost = f(S)+f(D)+f(G) 28
Path cost for S-A-G’
f(S) = 0 + 10  10
f(A) = (0+2) + 8  10
f(G’) = (0+2+2) + 0  4
Total path cost = f(S)+f(A)+f(G’) 24
* Path S-A-G is chosen
= Lowest cost
Heuristic Search : A*
Algorithm
Heuristic Search : A*
Algorithm
TIN 5013: Artificial Intelligence
Heuristic Search : A*
Algorithm
Heuristic Search : A*
Algorithm
TIN 5013: Artificial Intelligence
Heuristic Search : A*
Algorithm
Issues in Heuristic Search
•Searching using heuristic function does not solely on
directed solution  but the best algorithm to find
shortest path towards goal.
•Admissible  attempt to find possible shortest path to
a goal whenever it exists.
•Informedness  question in what sense the heuristic
function is better than another.
•Monotonicity  question if the best state is
discovered by heuristic search, is there any guarantee
that the same state won’t be found later at lowest
searching cost?
References
 Cawsey, A. (1998). The Essence of Artificial
Intelligence, Prentice Hall.
 Russell, S. and Norvig, P. (2003). Artificial
Intelligence: A Modern Approach, Prentice-
Hall 2nd Edition.

More Related Content

What's hot

A Star Search
A Star SearchA Star Search
A Star Search
Computing Cage
 
Jarrar: Informed Search
Jarrar: Informed Search  Jarrar: Informed Search
Jarrar: Informed Search
Mustafa Jarrar
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
Amey Kerkar
 
AI Greedy and A-STAR Search
AI Greedy and A-STAR SearchAI Greedy and A-STAR Search
AI Greedy and A-STAR Search
Andrew Ferlitsch
 
Searchadditional2
Searchadditional2Searchadditional2
Searchadditional2chandsek666
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
Bablu Shofi
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
Hema Kashyap
 
Jarrar: Un-informed Search
Jarrar: Un-informed SearchJarrar: Un-informed Search
Jarrar: Un-informed Search
Mustafa Jarrar
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
Hema Kashyap
 
Static-talk
Static-talkStatic-talk
Static-talkgiunti
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniques
Hema Kashyap
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
Hema Kashyap
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
Shuqing Zhang
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
Amit Kumar Rathi
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchPalGov
 

What's hot (17)

A Star Search
A Star SearchA Star Search
A Star Search
 
Jarrar: Informed Search
Jarrar: Informed Search  Jarrar: Informed Search
Jarrar: Informed Search
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
AI Greedy and A-STAR Search
AI Greedy and A-STAR SearchAI Greedy and A-STAR Search
AI Greedy and A-STAR Search
 
Searchadditional2
Searchadditional2Searchadditional2
Searchadditional2
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
 
Jarrar: Un-informed Search
Jarrar: Un-informed SearchJarrar: Un-informed Search
Jarrar: Un-informed Search
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
Static-talk
Static-talkStatic-talk
Static-talk
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniques
 
M4 heuristics
M4 heuristicsM4 heuristics
M4 heuristics
 
AI Lesson 05
AI Lesson 05AI Lesson 05
AI Lesson 05
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 

Similar to Searching

Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
ashetuterefa
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
RaviKiranVarma4
 
Search 1
Search 1Search 1
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)
ssuser2a76b5
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
mmpnair0
 
informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
SankarTerli
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
Nazir Ahmed
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
Nazir Ahmed
 
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttktshamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
PEACENYAMA1
 
Dfs presentation
Dfs presentationDfs presentation
Dfs presentationAlizay Khan
 
Lecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdfLecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdf
iftakhar8
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
Swagat Praharaj
 
problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
SlimAmiri
 
c4.pptx
c4.pptxc4.pptx
Informed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data scienceInformed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data science
devvpillpersonal
 
Combinatorial optimization CO-1
Combinatorial optimization CO-1Combinatorial optimization CO-1
Combinatorial optimization CO-1
man003
 
Search 2
Search 2Search 2
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
AndrewKuziwakwasheMu
 
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptxSP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
AnimeGuru1
 
l2.pptx
l2.pptxl2.pptx

Similar to Searching (20)

Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
 
Search 1
Search 1Search 1
Search 1
 
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
 
informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttktshamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
 
Dfs presentation
Dfs presentationDfs presentation
Dfs presentation
 
Lecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdfLecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdf
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
 
problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
 
c4.pptx
c4.pptxc4.pptx
c4.pptx
 
Informed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data scienceInformed-search TECHNIQUES IN ai ml data science
Informed-search TECHNIQUES IN ai ml data science
 
Combinatorial optimization CO-1
Combinatorial optimization CO-1Combinatorial optimization CO-1
Combinatorial optimization CO-1
 
Search 2
Search 2Search 2
Search 2
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptxSP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 

More from Prof.Dharmishtha R. Chaudhari

Php tutorial
Php tutorialPhp tutorial
Srs
SrsSrs
Requirementengg
RequirementenggRequirementengg
Requirement analysis
Requirement analysisRequirement analysis
Requirement analysis
Prof.Dharmishtha R. Chaudhari
 

More from Prof.Dharmishtha R. Chaudhari (7)

Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Cdma
CdmaCdma
Cdma
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
Srs
SrsSrs
Srs
 
Requirementengg
RequirementenggRequirementengg
Requirementengg
 
Requirement analysis
Requirement analysisRequirement analysis
Requirement analysis
 
RESUME_2015
RESUME_2015RESUME_2015
RESUME_2015
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 

Searching

  • 1. Chap 4: Searching Techniques Artificial Intelligence 605451 Dr.Hassan Al-Tarawneh
  • 2. Motivation Attempt the end, and never stand to doubt, nothing’s so hard, but search will find it out “Robert Herrick”
  • 3. What we will cover ?  Ideas in searching  Searching tree representation  Uninformed and informed search  Game playing search
  • 4. Problem as a State Space Search  To build as system to solve a particular problem, we need:  Define the problem: must include precise specifications ~ initial solution & final solution.  Analyze the problem: select the most important features that can have an immense impact.  Isolate and represent : convert these important features into knowledge representation.  Problem solving technique(s): choose the best technique and apply it to particular problem.
  • 5. The Quest  Typical questions that need to be answered:  Is the problem solver guaranteed to find a solution?  Will the system always terminate or caught in a infinite loop?  If the solution is found, it is optimal?  What is the complexity of searching process?  How the system be able to reduce searching complexity?  How it can effectively utilize the representation paradigm?
  • 6. Important Terms  Search space  possible conditions and solutions.  Initial state  state where the searching process started.  Goal state  the ultimate aim of searching process.  Problem space  “what to solve”  Searching strategy strategy for controlling the search.  Search tree  tree representation of search space, showing possible solutions from initial state.
  • 7. Example: The Bridges of Konigsberg Problem •Classical graph applications. •Introduced by Leonhard Euler. •Problem: Can a person walk around the city crosses each bridge exactly once?
  • 8. Example: The Bridges of Konigsberg Problem (cont) B D C A b1 b2 b3 b4 b6 b5 b7 Predicates: Connect (B, C, b5)
  • 9. Example: Traveling Salesperson Problem •Suppose a salesperson has five cities to visit and them must return home. Goal  find the shortest path to travel. B C D E 75 50 100 100 125 125 125 75 50 A
  • 10. Searching for Solution •Search through state space (explicitly using searching tree). •Node expansion :- generating new node related to previous nodes. •Concepts: •State :- conditions in which the node corresponds. •Parent node :- the superior node •Path cost :- the cost, from initial to goal state. •Depth:- number of steps along the path from initial state
  • 15. Measuring Searching Performance •The output from problem-solving (searching) algorithm is either FAILURE or SOLUTION. •Four ways: •Completeness : is guaranteed to find a solution? •Optimality: does it find optimal solution ? •Time complexity: how long? •Space complexity: how much memory? •Complexity : branching factor (b), depth (d), and max. depth (m)
  • 16. Searching Strategies •Heuristic search  search process takes place by traversing search space with applied rules (information). •Techniques: Greedy Best First Search, A* Algorithm •There is no guarantee that solution is found. •Blind search  traversing the search space until the goal nodes is found (might be doing exhaustive search). •Techniques : Breadth First Uniform Cost ,Depth first, Interactive Deepening search. •Guarantees solution.
  • 17. Blind Search : Breadth First Search (BFS) •Strategy ~ search all the nodes expanded at given depth before any node at next level. •Concept : First In First Out (FIFO) queue. •Complete ?: Yes with finite b (branch). •Complexity: •Space : similar to complexity – keep nodes in every memory •Optimal ? = Yes (if cost =1)
  • 18. Blind Search : Breadth First Search 1 2 43
  • 19. Blind Search : Depth First Search (DFS) •Strategy ~ search all the nodes expanded in deepest path. •Last In First Out concept. •Complete ?: No •Complexity: •Space : O(bm) – b ; branching factor, m ; max. depth •Optimality ? : No
  • 20. Blind Search : Depth First Search (DFS) 1 2 3 4 5 ……. N+1
  • 21. Blind Search : Iterative Deepening DFS (ID-DFS) •Strategy ~ combines DFS with best depth limits. •Gradually increase the limit; L=0, L=1… and so on. •Complete ?: Yes (if b is finite) •Complexity: •Space : •Optimality ? : yes (if path costs are all identical)
  • 22. Blind Search : Iterative Deepening DFS (ID-DFS)
  • 24. Heuristic Search : •Important aspect: formation of heuristic function (h(n)). •Heuristic function  additional knowledge to guide searching strategy (short cut). •Distance: heuristic function can be straight line distance (SLD) A* B C* D E h(n)=0 h(n)=34 h(n)=24 h(n)=67 h(n)=12 h(n)=9
  • 25. Heuristic Search : Heuristic Function
  • 26. Heuristic Search :Greedy- Best Search •Tries to expand the node that is closest to the goal. •Evaluates using only heuristic function : f(n) = h(n) •Possibly lead to the solution very fast. •Problem ? ~ can end up in sub-optimal solutions (doesn’t take notice of the distance it travels). •Complexity and time: •Complete & optimal ? : No (stuck in infinite loop)
  • 29. Heuristic Search : A* Algorithm •Widely known algorithm – (pronounced as “A star” search). •Evaluates nodes by combining g(n) “cost to reach the node” and h(n) “cost to get to the goal” •f(n) = g(n) + h(n), f(n)  estimated cost of the cheapest solution. •Complete and optimal ~ since evaluates all paths. •Time ? ~ a bit time consuming •Space ? ~ lot of it!
  • 30. Heuristic Search : A* Algorithm S GE DA G’ H :10 :8 :9 :0:4 :0 :3 2 3 2 5 13 Path cost for S-D-G f(S) = g(S) + h(S) = 0 + 10  10 f(D) = (0+3) + 9  12 f(G) = (0+3+3) + 0  6 Total path cost = f(S)+f(D)+f(G) 28 Path cost for S-A-G’ f(S) = 0 + 10  10 f(A) = (0+2) + 8  10 f(G’) = (0+2+2) + 0  4 Total path cost = f(S)+f(A)+f(G’) 24 * Path S-A-G is chosen = Lowest cost
  • 31. Heuristic Search : A* Algorithm
  • 32. Heuristic Search : A* Algorithm
  • 33. TIN 5013: Artificial Intelligence Heuristic Search : A* Algorithm
  • 34. Heuristic Search : A* Algorithm
  • 35. TIN 5013: Artificial Intelligence Heuristic Search : A* Algorithm
  • 36. Issues in Heuristic Search •Searching using heuristic function does not solely on directed solution  but the best algorithm to find shortest path towards goal. •Admissible  attempt to find possible shortest path to a goal whenever it exists. •Informedness  question in what sense the heuristic function is better than another. •Monotonicity  question if the best state is discovered by heuristic search, is there any guarantee that the same state won’t be found later at lowest searching cost?
  • 37. References  Cawsey, A. (1998). The Essence of Artificial Intelligence, Prentice Hall.  Russell, S. and Norvig, P. (2003). Artificial Intelligence: A Modern Approach, Prentice- Hall 2nd Edition.