Skip to content

Advanced AI Algorithm Complexity Analysis (Time, Space, Resource) in Unity: Pathfinding Algorithms Showcase

Notifications You must be signed in to change notification settings

hasithdd/AI-for-Games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complex System Analysis

A Unity project demonstrating advanced pathfinding algorithms for game AI, including A*, Breadth-First Search (BFS), Depth-First Search (DFS), and Dijkstra's algorithm.

Features

  • 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.

Setup Instructions

Prerequisites

  • Unity 2022 (recommended version: 2022.3 or later)
  • Git (for cloning the repository)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd "Complex System Analysis"
  2. Open Unity Hub and add the project:

    • Click "Add" and select the cloned folder.
  3. Open the project in Unity 2022.

  4. Load the main scene:

    • Navigate to Assets/Scenes/Main.unity and open it.
  5. Run the scene:

    • Press the Play button in Unity to see the algorithms in action.

Usage

  • 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.

Project Structure

  • 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.

Contributing

Feel free to contribute improvements or additional algorithms.

License

This project is for educational purposes.

About

Advanced AI Algorithm Complexity Analysis (Time, Space, Resource) in Unity: Pathfinding Algorithms Showcase

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages