今日作ったのは、迷路自動解決プログラム。 BFS、DFS、A*。 3つの探索アルゴリズムを、同時に比較できるツール。 そして今日、気づきました。 「見比べると、違いがわかる」 昨日、BFSでパックマンを動かした。 アルゴリズムが動くのを見て、感動した。
自分の理解のため Python でグラフ構造を探索する手法の DFS(深さ優先探索)、BFS(幅優先探索)を実装してみた。 上図のような構造のグラフを探索する。 DFS(深さ優先探索) DFS では根(ここではノード1)から探索を開始して、次の枝(ここではノード5 ...
This educational tool helps computer science students and enthusiasts visualize how different pathfinding algorithms explore a graph space. Watch as algorithms traverse a grid in real-time, revealing ...
A-Maze-ing is a Python maze generator that builds colorful ASCII mazes in the terminal using multiple algorithms, including DFS, BFS, and Prim’s algorithm. It reads a configuration file, generates a ...