Iterative Deepening Search- Artificial intelligence:
So, breadth first search is guaranteed to find a solution (if one exists), but it grape whole memory. However, Depth first search is much less memory hungry, but not guaranteed to search a solution. Is there any other approach to search the space which combines the good parts of both?
Well, yes there is a way exit but it sounds stupid Iterative Deepening Search (IDS) is just a series of depth initial searches where the depth limit is increased by one each time. That is, an
Iterative Deepening Search will do a depth first search (DFS) to depth one , followed by a DFS to depth two, and furthermore , every time beginning fully from scratch. This has the advantage of complete, as it take all depths of the search tree. Also, it just requires the same memory as depth first search.
However, you will have note that this means that it fully re-searches the entire space searched in the earlier iteration. This kind of redundancy will definitely make the search strategy too slow to contemplate using in practice? In fact, it isn't as bad as you might think. In a depth first search, this is because most of the effort is spent expanding the last row of the tree, so the replication over the top part of the tree is not a major factor. Actually, the effect of the repetition reduces as the branching rate increases. In a search with branching rate ten and depth five, the number of states searched is 111,111 with a single depth first search. This number reached up to 123,456 with an iterative deepening search. So, there is only a repetition of around 11%.