SlideShare a Scribd company logo
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 (20)

ODP
Hillclimbing search algorthim #introduction
Mohamed Gad
 
PPTX
All pair shortest path
Arafat Hossan
 
PPTX
Fuzzy arithmetic
Mohit Chimankar
 
PPTX
Alpha beta
sabairshad4
 
PDF
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
vikas dhakane
 
PDF
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
RahulSharma4566
 
PPTX
Uninformed Search technique
Kapil Dahal
 
PPTX
uninformed search part 1.pptx
MUZAMILALI48
 
PPTX
Informed and Uninformed search Strategies
Amey Kerkar
 
PPT
Amortized Analysis of Algorithms
sathish sak
 
PPTX
daa-unit-3-greedy method
hodcsencet
 
PPTX
Constraint satisfaction problems (csp)
Archana432045
 
PPTX
Randomized algorithm min cut problem and its solution using karger's algorithm
Gaurang Savaliya
 
PPTX
Lecture 14 Heuristic Search-A star algorithm
Hema Kashyap
 
PPTX
Propositional logic
Rushdi Shams
 
PPT
Uniformed tree searching
Ayaelshiwi
 
PPTX
(r)Evolution of Machine Learning
Pankaj Tirpude
 
PPT
Arithmetic coding
Vikas Goyal
 
PPTX
search strategies in artificial intelligence
Hanif Ullah (Gold Medalist)
 
PPTX
Association Analysis in Data Mining
Kamal Acharya
 
Hillclimbing search algorthim #introduction
Mohamed Gad
 
All pair shortest path
Arafat Hossan
 
Fuzzy arithmetic
Mohit Chimankar
 
Alpha beta
sabairshad4
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
vikas dhakane
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
RahulSharma4566
 
Uninformed Search technique
Kapil Dahal
 
uninformed search part 1.pptx
MUZAMILALI48
 
Informed and Uninformed search Strategies
Amey Kerkar
 
Amortized Analysis of Algorithms
sathish sak
 
daa-unit-3-greedy method
hodcsencet
 
Constraint satisfaction problems (csp)
Archana432045
 
Randomized algorithm min cut problem and its solution using karger's algorithm
Gaurang Savaliya
 
Lecture 14 Heuristic Search-A star algorithm
Hema Kashyap
 
Propositional logic
Rushdi Shams
 
Uniformed tree searching
Ayaelshiwi
 
(r)Evolution of Machine Learning
Pankaj Tirpude
 
Arithmetic coding
Vikas Goyal
 
search strategies in artificial intelligence
Hanif Ullah (Gold Medalist)
 
Association Analysis in Data Mining
Kamal Acharya
 

Similar to Intro to-iterative-deepening (20)

PDF
ITERATIVE DEEPNING DEPTH FIRST PPT SEARCH
VIVEKMAJUMDAR2
 
PPTX
Lecture09-AI-Artificial intelligence.pptx
kiddielearnandfun942
 
PPTX
Lecture09-AI-Artificial intelligence.pptx
kiddielearnandfun942
 
PDF
Ai unit-4
Tribhuvan University
 
PPTX
Search Algorithms in AI.pptx
Dr.Shweta
 
PPT
AI-search-metodsandeverythingelsenot.ppt
s0618614
 
PPTX
AI-05 Search Algorithms.pptx
Pankaj Debbarma
 
PPT
3-uninformed-search.ppt
ABINASHACHERJEE1
 
PPTX
Uninformed Search Strategies techni.pptx
DeepaT40
 
PPT
Iterative deepening search
Ashis Chanda
 
PPTX
Unit 2 Uninformed Search Strategies.pptx
DrYogeshDeshmukh1
 
PDF
Presentation on the artificial intelligenc
PriyadharshiniG41
 
PPTX
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
gagaco5776
 
PPTX
Uniform Cost Search, Depth Mimited Search.pptx
devhamnah
 
PPTX
4.Module_2_Chaptjvyfgcgfxfdxhgfxchtfer_3.pptx
gkavitha5225
 
PPTX
Intro to ArtificiaI Intelligence Unit No 2 Notes-1.pptx
vvshirashyad
 
PPTX
Unit-2 for AIML including type of searches
SaranshGupta923104
 
PPTX
Lecture # 02-Search Algorithms11111.pptx
TheSmartSolverAcadem
 
PPTX
AI Unit-2 (Chapter-3-4) Solving Problems by Searching.pptx
pandyaga
 
PDF
artificial intelligence MTE E06_lec 3 _250225_114726.pdf
zezo2003zo
 
ITERATIVE DEEPNING DEPTH FIRST PPT SEARCH
VIVEKMAJUMDAR2
 
Lecture09-AI-Artificial intelligence.pptx
kiddielearnandfun942
 
Lecture09-AI-Artificial intelligence.pptx
kiddielearnandfun942
 
Search Algorithms in AI.pptx
Dr.Shweta
 
AI-search-metodsandeverythingelsenot.ppt
s0618614
 
AI-05 Search Algorithms.pptx
Pankaj Debbarma
 
3-uninformed-search.ppt
ABINASHACHERJEE1
 
Uninformed Search Strategies techni.pptx
DeepaT40
 
Iterative deepening search
Ashis Chanda
 
Unit 2 Uninformed Search Strategies.pptx
DrYogeshDeshmukh1
 
Presentation on the artificial intelligenc
PriyadharshiniG41
 
6CS4_AI_Unit-1.pptx helo to leairn dsa in a eay
gagaco5776
 
Uniform Cost Search, Depth Mimited Search.pptx
devhamnah
 
4.Module_2_Chaptjvyfgcgfxfdxhgfxchtfer_3.pptx
gkavitha5225
 
Intro to ArtificiaI Intelligence Unit No 2 Notes-1.pptx
vvshirashyad
 
Unit-2 for AIML including type of searches
SaranshGupta923104
 
Lecture # 02-Search Algorithms11111.pptx
TheSmartSolverAcadem
 
AI Unit-2 (Chapter-3-4) Solving Problems by Searching.pptx
pandyaga
 
artificial intelligence MTE E06_lec 3 _250225_114726.pdf
zezo2003zo
 
Ad

Recently uploaded (20)

PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Ad

Intro to-iterative-deepening

  • 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*