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