SlideShare a Scribd company logo
1 of 12
Iterative Deepening
G51IAI – Introduction to AI
Andrew Parkes
http://www.cs.nott.ac.uk/~ajp/
Motivations
• BFS & A*
– good for optimality
– bad on memory, O(bd
)
• DFS
– solutions not guaranteed optimal: dives and
misses good nodes
– good for memory O(bd)
• “Iterative Deepening” refers to a method that
tries to combine the best of the above
Depth-Limited Search
• Simply put an upper limit on the depth (cost)
of paths allowed
• Motivation:
– e.g. inherent limit on range of a vehicle
• tell me all the places I can reach on 10 litres of petrol
– prevents search diving into deep solutions
– might already have a solution of known depth
(cost), but are looking for a shallower (cheaper)
one
Depth-Limited Search
• Impose an upper limit on the depth (cost) of
paths allowed
– Only add nodes to the queue if their depth does
not exceed the bound
• DepthLimitedDFS ( k ) :
DFS but only consider nodes with depth d ≤ k
Trees: Depth-Limited
• Depth limit of 2
would mean that
children of E are
ignored
JB C
D
E
F
G
A
H
I
d=0
d=1
d=2
d=3
d=4
Iterative Deepening Search
• Follow the BFS pattern of
“search all nodes of depth d before depth d+1”
• But do the search at depth d using Depth-Limited-DFS
• Schematically:
• IDS:
k=0;
while ( not success && k < depth of tree ) {
Depth-Limited-DFS ( k );
k++
}
Properties of IDS
• Memory Usage
– Same as DFS O(bd)
• Time Usage:
– Worse than BFS because nodes at each level will
be expanded again at each later level
– BUT often is not much worse because almost all
the effort is at the last level anyway, because trees
are “leaf –heavy”
– Typically might be at most a factor two worse
Memory Usage of A*
• We store the tree in order to
– to return the route
– avoid repeated states
• Takes a lot of memory
• But scanning a tree is better with DFS
IDA*
• Combine A* and iterative deepening
• f is the estimate of total path cost for start to
goal
• IDA*:
– Impose a limit on f
– Use DFS to search within the f limit
– Iteratively relax the limit
• Greatly reduces memory usage
• Can repeat far too much work, and so be
slow
Summary
• Algorithm IDS:
– IDS : BFS plus DFS for tree search
• Algorithm IDA*:
– the basis of “state of the art” “complete &
optimal” algorithms
Summary
• BFS & A*: good for optimality, but not memory
• DFS: good for memory O(bd), but not optimality
• “Iterative Deepening” refers to
– IDS “Iterative Deeepening Search”
• mix of DFS and BFS on trees
– a broad approach used for general search, with general aim
to combine optimality with low memory usage of DFS
• Self-Study: carefully work through “ids.ppt”
• Expectations:
– know about the motivations and ideas and the search
pattern
– do not need details of how to code IDA*
Questions?

More Related Content

What's hot

I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMvikas dhakane
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...vikas dhakane
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmHema Kashyap
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Falak Chaudry
 
Example of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional searchExample of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional searchAbhijeet Agarwal
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AIvikas dhakane
 
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; KamberChapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kambererror007
 
lazy learners and other classication methods
lazy learners and other classication methodslazy learners and other classication methods
lazy learners and other classication methodsrajshreemuthiah
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clusteringKrish_ver2
 
Bruteforce algorithm
Bruteforce algorithmBruteforce algorithm
Bruteforce algorithmRezwan Siam
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithmPradip Kumar
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Bharat Bhushan
 
AI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by ExamplesAI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by ExamplesAhmed Gad
 
2.4 rule based classification
2.4 rule based classification2.4 rule based classification
2.4 rule based classificationKrish_ver2
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesHema Kashyap
 
4 informed-search
4 informed-search4 informed-search
4 informed-searchMhd Sb
 
Induction and Decision Tree Learning (Part 1)
Induction and Decision Tree Learning (Part 1)Induction and Decision Tree Learning (Part 1)
Induction and Decision Tree Learning (Part 1)butest
 

What's hot (20)

I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)
 
Example of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional searchExample of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional search
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; KamberChapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 6 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
 
lazy learners and other classication methods
lazy learners and other classication methodslazy learners and other classication methods
lazy learners and other classication methods
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clustering
 
Iterative deepening search
Iterative deepening searchIterative deepening search
Iterative deepening search
 
Bruteforce algorithm
Bruteforce algorithmBruteforce algorithm
Bruteforce algorithm
 
Fp growth algorithm
Fp growth algorithmFp growth algorithm
Fp growth algorithm
 
Heuristics Search Techniques in AI
Heuristics Search Techniques in AI Heuristics Search Techniques in AI
Heuristics Search Techniques in AI
 
AI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by ExamplesAI Uninformed Search Strategies by Examples
AI Uninformed Search Strategies by Examples
 
2.4 rule based classification
2.4 rule based classification2.4 rule based classification
2.4 rule based classification
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniques
 
4 informed-search
4 informed-search4 informed-search
4 informed-search
 
Induction and Decision Tree Learning (Part 1)
Induction and Decision Tree Learning (Part 1)Induction and Decision Tree Learning (Part 1)
Induction and Decision Tree Learning (Part 1)
 
A Star Search
A Star SearchA Star Search
A Star Search
 

Similar to Iterative Deepening Search (IDS) combines DFS and BFS for optimal tree search

Similar to Iterative Deepening Search (IDS) combines DFS and BFS for optimal tree search (8)

ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)
 
NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
uninformed search part 1.pptx
uninformed search part 1.pptxuninformed search part 1.pptx
uninformed search part 1.pptx
 
Search strategies BFS, DFS
Search strategies BFS, DFSSearch strategies BFS, DFS
Search strategies BFS, DFS
 
Ai unit-4
Ai unit-4Ai unit-4
Ai unit-4
 
c4.pptx
c4.pptxc4.pptx
c4.pptx
 
RediSearch (SV Meetup)
RediSearch (SV Meetup)RediSearch (SV Meetup)
RediSearch (SV Meetup)
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Iterative Deepening Search (IDS) combines DFS and BFS for optimal tree search

  • 1. Iterative Deepening G51IAI – Introduction to AI Andrew Parkes http://www.cs.nott.ac.uk/~ajp/
  • 2. Motivations • BFS & A* – good for optimality – bad on memory, O(bd ) • DFS – solutions not guaranteed optimal: dives and misses good nodes – good for memory O(bd) • “Iterative Deepening” refers to a method that tries to combine the best of the above
  • 3. Depth-Limited Search • Simply put an upper limit on the depth (cost) of paths allowed • Motivation: – e.g. inherent limit on range of a vehicle • tell me all the places I can reach on 10 litres of petrol – prevents search diving into deep solutions – might already have a solution of known depth (cost), but are looking for a shallower (cheaper) one
  • 4. Depth-Limited Search • Impose an upper limit on the depth (cost) of paths allowed – Only add nodes to the queue if their depth does not exceed the bound • DepthLimitedDFS ( k ) : DFS but only consider nodes with depth d ≤ k
  • 5. Trees: Depth-Limited • Depth limit of 2 would mean that children of E are ignored JB C D E F G A H I d=0 d=1 d=2 d=3 d=4
  • 6. Iterative Deepening Search • Follow the BFS pattern of “search all nodes of depth d before depth d+1” • But do the search at depth d using Depth-Limited-DFS • Schematically: • IDS: k=0; while ( not success && k < depth of tree ) { Depth-Limited-DFS ( k ); k++ }
  • 7. Properties of IDS • Memory Usage – Same as DFS O(bd) • Time Usage: – Worse than BFS because nodes at each level will be expanded again at each later level – BUT often is not much worse because almost all the effort is at the last level anyway, because trees are “leaf –heavy” – Typically might be at most a factor two worse
  • 8. Memory Usage of A* • We store the tree in order to – to return the route – avoid repeated states • Takes a lot of memory • But scanning a tree is better with DFS
  • 9. IDA* • Combine A* and iterative deepening • f is the estimate of total path cost for start to goal • IDA*: – Impose a limit on f – Use DFS to search within the f limit – Iteratively relax the limit • Greatly reduces memory usage • Can repeat far too much work, and so be slow
  • 10. Summary • Algorithm IDS: – IDS : BFS plus DFS for tree search • Algorithm IDA*: – the basis of “state of the art” “complete & optimal” algorithms
  • 11. Summary • BFS & A*: good for optimality, but not memory • DFS: good for memory O(bd), but not optimality • “Iterative Deepening” refers to – IDS “Iterative Deeepening Search” • mix of DFS and BFS on trees – a broad approach used for general search, with general aim to combine optimality with low memory usage of DFS • Self-Study: carefully work through “ids.ppt” • Expectations: – know about the motivations and ideas and the search pattern – do not need details of how to code IDA*