# 人工智能中的搜索算法

> Photo by Jack Sloop on Unsplash

> fig 1. Step 1 in BFS

> fig 2. Step 2 in BFS

> fig 3. BFS MAP (The digits on the lines represents the sequence in which she visited those shops.)

> fig 4. step 1 in DFS

> fig 5. Step 2 in DFS

> fig 6. DFS MAP (The digits on the lines represents the sequence in which she visited those shops.)

Stack和Queue

· 它不会在数据结构中创建冗余，因此不会访问已经访问过的同一节点。

· 它在计算上比BFS更轻松，更高效。

(本文翻译自Arshad Kazi的文章《Search Algorithms In Artificial Intelligence》，参考：https://towardsdatascience.com/search-algorithms-in-artificial-intelligence-5332fc560c74)

QQ