SlideShare a Scribd company logo
1 of 12
Memory Bounded Search
Recursive Best First Search(Extensions of
BFS)
Lecture-16
Hema Kashyap
1
Memory Bounded Search
• RBFS(Recursive Best First Search)
• IDA* (Iterative Deepening A* Search)
– Is a logical extension of ITERATIVE –DEEPENING
SEARCH to use heuristic information
• SMA*(Simplified Memory Bound A*) Search
2
RBFS-Properties
• Similar to A* algorithm developed for heuristic
search
– Both are recursive in the same sense
• Difference between A* and RBFS
– A* keeps in memory all of the already generated
nodes
– RBFS only keeps the current search path and the
sibling nodes along the path
3
• When does RBFS suspend the search of a
subtree?
– When it no longer looks the best
• What does it do when a subtree is
suspended?
– It forgets the subtree to save space
• What is the space complexity?
– Linear the depth of the search
– Same as IDA*
4
F value Inheritance
• F-values can be inherited from a nodeʼs parents
• Let N be a node about to be expanded
– If F(N) > f(N) then N had already been expanded
– F(N) was determined from Nʼs children
– Children have been removed from memory
• Suppose a child Nk of N is generated again
– Compute f(Nk)
– F(Nk) = max ( F(N) , f(Nk) )
• Nk ʼs F-value can be inherited from N
– Nk was generated earlier
– F(Nk) was ≥ F(N), otherwise F(N) would be smaller
5
• RBFS uses only linear space.
• It mimics best first search.
• It keeps track of the f-value of the best
alternative path available from any ancestor of
the current node.
• If the current node exceeds this limit, the
alternative path is explored.
• RBFS remembers the f-value of the best leaf in
the forgotten sub-tree.
6
RBFS-Algorithm
function RECURSIVE-BEST-FIRST-SEARCH(problem) returns a solution, or failure
return RBFS(problem,MAKE-NODE(problem.INITIAL-STATE),∞)
function RBFS(problem, node, f limit ) returns a solution, or failure and a new f-cost limit
if problem.GOAL-TEST(node.STATE) then return SOLUTION(node)
successors ←[ ]
for each action in problem.ACTIONS(node.STATE) do
add CHILD-NODE(problem, node, action) intosuccessors
if successors is empty then return failure,∞
for each s in successors do /* update f with value from previous search, if any */
s.f ←max(s.g + s.h, node.f ))
loop do
best ←the lowest f-value node in successors
if best .f > f limit then return failure, best .f
alternative ←the second-lowest f-value among successors
result , best .f ←RBFS(problem, best , min( f limit, alternative))
if result = failure then return result
7
Example
8
H-values
9
Example
10
Example
11
Example
12

More Related Content

What's hot

What's hot (20)

5 csp
5 csp5 csp
5 csp
 
Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligence
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
 

More from Hema Kashyap

More from Hema Kashyap (20)

Lecture 30 introduction to logic
Lecture 30 introduction to logicLecture 30 introduction to logic
Lecture 30 introduction to logic
 
Lecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleLecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-example
 
Lecture 28 genetic algorithm
Lecture 28 genetic algorithmLecture 28 genetic algorithm
Lecture 28 genetic algorithm
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealing
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam search
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbing
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithm
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruning
 
Lecture 22 adversarial search
Lecture 22 adversarial searchLecture 22 adversarial search
Lecture 22 adversarial search
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
 
Lecture 20 problem reduction search
Lecture 20 problem reduction searchLecture 20 problem reduction search
Lecture 20 problem reduction search
 
Lecture 19 sma star algorithm
Lecture 19 sma star algorithmLecture 19 sma star algorithm
Lecture 19 sma star algorithm
 
Lecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmLecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithm
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
 
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
 
Lecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problemLecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problem
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
 

Recently uploaded

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 

Recently uploaded (20)

fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 

Lecture 16 memory bounded search

  • 1. Memory Bounded Search Recursive Best First Search(Extensions of BFS) Lecture-16 Hema Kashyap 1
  • 2. Memory Bounded Search • RBFS(Recursive Best First Search) • IDA* (Iterative Deepening A* Search) – Is a logical extension of ITERATIVE –DEEPENING SEARCH to use heuristic information • SMA*(Simplified Memory Bound A*) Search 2
  • 3. RBFS-Properties • Similar to A* algorithm developed for heuristic search – Both are recursive in the same sense • Difference between A* and RBFS – A* keeps in memory all of the already generated nodes – RBFS only keeps the current search path and the sibling nodes along the path 3
  • 4. • When does RBFS suspend the search of a subtree? – When it no longer looks the best • What does it do when a subtree is suspended? – It forgets the subtree to save space • What is the space complexity? – Linear the depth of the search – Same as IDA* 4
  • 5. F value Inheritance • F-values can be inherited from a nodeʼs parents • Let N be a node about to be expanded – If F(N) > f(N) then N had already been expanded – F(N) was determined from Nʼs children – Children have been removed from memory • Suppose a child Nk of N is generated again – Compute f(Nk) – F(Nk) = max ( F(N) , f(Nk) ) • Nk ʼs F-value can be inherited from N – Nk was generated earlier – F(Nk) was ≥ F(N), otherwise F(N) would be smaller 5
  • 6. • RBFS uses only linear space. • It mimics best first search. • It keeps track of the f-value of the best alternative path available from any ancestor of the current node. • If the current node exceeds this limit, the alternative path is explored. • RBFS remembers the f-value of the best leaf in the forgotten sub-tree. 6
  • 7. RBFS-Algorithm function RECURSIVE-BEST-FIRST-SEARCH(problem) returns a solution, or failure return RBFS(problem,MAKE-NODE(problem.INITIAL-STATE),∞) function RBFS(problem, node, f limit ) returns a solution, or failure and a new f-cost limit if problem.GOAL-TEST(node.STATE) then return SOLUTION(node) successors ←[ ] for each action in problem.ACTIONS(node.STATE) do add CHILD-NODE(problem, node, action) intosuccessors if successors is empty then return failure,∞ for each s in successors do /* update f with value from previous search, if any */ s.f ←max(s.g + s.h, node.f )) loop do best ←the lowest f-value node in successors if best .f > f limit then return failure, best .f alternative ←the second-lowest f-value among successors result , best .f ←RBFS(problem, best , min( f limit, alternative)) if result = failure then return result 7