今日作ったのは、迷路自動解決プログラム。 BFS、DFS、A*。 3つの探索アルゴリズムを、同時に比較できるツール。 そして今日、気づきました。 「見比べると、違いがわかる」 昨日、BFSでパックマンを動かした。 アルゴリズムが動くのを見て、感動した。
自分の理解のため Python でグラフ構造を探索する手法の DFS(深さ優先探索)、BFS(幅優先探索)を実装してみた。 上図のような構造のグラフを探索する。 DFS(深さ優先探索) DFS では根(ここではノード1)から探索を開始して、次の枝(ここではノード5 ...
Abstract: Graph theory is a critical field in computer science and mathematics, particularly in solving shortest path problems. In this paper, a comparative analysis of Breadth-First Search (BFS) and ...
Maze Generation (DFS): The project uses Depth First Search to explore the grid. When the generator reaches a cell with no unvisited neighbors, it uses a Stack to backtrack to the previous node, ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する