A Unity project demonstrating advanced pathfinding algorithms for game AI, including A*, Breadth-First Search (BFS), Depth-First Search (DFS), and Dijkstra's algorithm.
- A Algorithm*: Efficient pathfinding with heuristic optimization.
- BFS: Explores nodes level by level for shortest path in unweighted graphs.
- DFS: Depth-first exploration, useful for maze solving.
- Dijkstra's Algorithm: Finds shortest paths in weighted graphs.
- Grid-based visualization for algorithm comparison.
- Performance timing for each algorithm.
- Unity 2022 (recommended version: 2022.3 or later)
- Git (for cloning the repository)
-
Clone the repository:
git clone <repository-url> cd "Complex System Analysis"
-
Open Unity Hub and add the project:
- Click "Add" and select the cloned folder.
-
Open the project in Unity 2022.
-
Load the main scene:
- Navigate to
Assets/Scenes/Main.unityand open it.
- Navigate to
-
Run the scene:
- Press the Play button in Unity to see the algorithms in action.
- The scene includes a grid where you can set start and end positions.
- Run different algorithms to visualize paths and compare performance.
- Check the console for execution times and node counts.
Assets/Scripts/: Contains algorithm implementations (AStar.cs, BFS.cs, DFS.cs, Dijkstra.cs) and supporting scripts.Assets/Scenes/: Main Unity scene.Assets/Prefabs/: Reusable game objects for visualization.
Feel free to contribute improvements or additional algorithms.
This project is for educational purposes.