ALGORITHM : DEPTH - FIRST SEARCH
1. place the starting node in the queue.
2. If the queue is empty, return failure and stop.
3. If the first element on the queue is a goal node g , return succed and stop otherwise.
4. Remove and expand the first element and place the children at the front of the queue.
5. Go back to step 2.
IN DFS WE USE STACK!!! why are you using Queue i dont understand? plz explain?
ReplyDeleteThis is nice blog. For more about this, visit here.. Depth First Search (DFS) and Breadth First Search (BFS)
ReplyDeleteNice post.Keep updating Artificial Intelligence Online Training
ReplyDelete