Question about breadth-first completeness vs depth-first incompleteness

前端 未结 3 1495
灰色年华
灰色年华 2020-12-17 16:15

According to Norvig in AIMA (Artificial Intelligence: A modern approach), the Depth-first algorithm is not complete (will not always produce a solution) because there are ca

3条回答
  •  一整个雨季
    2020-12-17 16:47

    The properties of depth-first search depend strongly on whether the graph-search or tree-search version is used. The graph-search version, which avoids repeated states and redundant paths, is complete in finite state spaces because it will eventually expand every node. The tree-search version, on the other hand, is not complete—for example, in Figure 3.6 the algorithm will follow the Arad–Sibiu–Arad–Sibiu loop forever

    Source: AI: a modern approach

提交回复
热议问题