Download presentation

Presentation is loading. Please wait.

Published byKaylyn Schmitt Modified over 2 years ago

1
Extra notes Modified from Callan R (2003) Artificial Intelligence Palgrave ISBN pg 50-55

2
The graph

3
Psudeocode for BFS node current; queue toVisit; List alreadyVisited; put root node in toVisit; while toVisit is notEmpty current=first node in toVisit; remove first node in toVisit; if current==goal add current to alreadyVisited; return true; endif for each child node C of current add C to toVisit; endfor; add current to alreadyVisited; endwhile;

4
toVisitalreadyVisited A[] BCA CDEAB DEFGHABC EFGHIABCD FGHIJKABCDE GHIJKLMABCDEF HIJKLMABCDEFG IJKLMNABCDEFGH JKLMNOABCDEFGHI KLMNOABCDEFGHIJ LMNOABCDEFGHIJK MNOPABCDEFGHIJKL NOPQABCDEFGHIJKLM OPQABCDEFGHIJKLMN PQABCDEFGHIJKLMNO QABCDEFGHIJKLMNOP []ABCDEFGHIJKLMNOPQ

5
Psudeocode for DFS node current; stack toVisit; List alreadyVisited; put root node in toVisit; while toVisit is notEmpty current=first node in toVisit; remove first node in toVisit; if current==goal add current to alreadyVisited; return true; endif for each child node C of current add C to toVisit; endfor; add current to alreadyVisited; endwhile;

6
toVisitalreadyVisited A[] BCA DECAB IECABD OECABDI ECABDIO JKCABDIOE KCABDIOEJ CABDIOEJK FGHABDIOEJKC LMGHABDIOEJKCF PMGHABDIOEJKCFL MGHABDIOEJKCFLP QGHABDIOEJKCFLPM

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google