發表文章

目前顯示的是 12月, 2021的文章

Tree Search: BFS, DFS, Best-First, and A* Search

圖片
This example is from MIT OCW   Artificial Intelligence . Consider the tree shown below. The numbers on the arcs are the arc lengths; the numbers near states B, C, and D are the heuristic estimates; all other states have a heuristic estimate of 0. Assume that the children of a node are expanded in alphabetical order when no other order is specified by the search, and that the goal is state J . No visited or expanded lists are used. What order would the states be expanded by each type of search. Write only the sequence of states expanded by each search. Breadth First Setep 1: Visited: A Queue: B, C, D Step 2: Visited: A, B Queue: C, D, E, F G Step 3: Visited: A, B, C Queue: D, E, F G, H Step 4: Visited: A, B, C, D Queue: E, F, G, H, I, J Step 5: Visited: A, B, C, D, E Queue: F, G, H, I, J Step 6: Visited: A, B, C, D, E, F Queue: G, H, I, J Step 7: Visited: A, B, C, D, E, F, G Queue: H, I, J Step 8: Visited: A, B, C, D, E, F, G,...