Algorithms For AI - Merged
Algorithms For AI - Merged
In the above tree structure, we have shown the traversing of the tree using BFS
algorithm from the root node S (start state) to goal node K (goal state). BFS search
algorithm traverse in levels, so it will follow the path which is shown by the dotted
arrow, and the traversed path will be:
S---> A--->B---->C--->D---->G--->H--->E---->F---->I---->K
In BFS, we explore each and every state until we get goal state.
Solution:
Time complexity = O(bd) = 320 = exponential time
Depth = 20 in worst case and here we obtained goal state in depth = 3.
8-puzzle problem with heuristics: Informed Search Technique
State with minimum heuristic value is considered to be the best state to explore
further (Best first heuristic search). So, we explore state with h = 2.
Now, we stop exploring as we reached the goal state.
We do not explore each node like in uninformed search. We explore node based
on heuristic value. Heuristics helps to get quick solution.