Pathfinding algorithm comparison with ML-based selector. Author: Ali Alperen Civil
autonomous_navigation/
├── environment.py # 2D grid environment
├── algorithms.py # BFS, DFS, A* implementations
├── agent.py # Autonomous agent class
├── visualizer.py # Matplotlib animations and charts
├── ml_selector.py # ML-based algorithm selector
├── experiments.py # Multi-map experiments and stress test
└── main.py # Entry point
Python 3.8+ and the following packages:
pip install -r requirements.txt
# Single map demo with visualizations
python main.py single
# Multi-map experiment
python main.py all
# 20-trial stress test
python main.py stress
# ML selector experiment
python main.py ml
# Agent demo
python main.py agentPre-generated search animations on the Maze map are included:
BFS_maze.gif— BFS search (329 frames)DFS_maze.gif— DFS search (175 frames)Astar_maze.gif— A* search (322 frames)
To regenerate:
from environment import Environment
from algorithms import run_all
from visualizer import save_animation_gif
env = Environment.make_maze()
results = run_all(env)
for algo, r in results.items():
save_animation_gif(env, r, f"{algo.replace('*','star')}_maze.gif", fps=30)