Skip to content

An intelligent AI system for Super Mario Bros game that uses A* and Theta* pathfinding algorithms to autonomously navigate levels, detect hazards, plan jumps, and avoid death pits in real-time.

Notifications You must be signed in to change notification settings

GQuestTeam/super-mario-pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credit to https://github.com/CapsCollective/super-mario-bros for base code

Mario Bros AI Pathfinding

An AI system that makes Mario automatically navigate platformer levels using A* and Theta* pathfinding algorithms.

What it does

  • Smart Navigation: Mario finds the best path to his destination, avoiding obstacles and death pits
  • Jump Planning: Automatically jumps over gaps and onto platforms
  • Real-time Mapping: Scans the screen to understand the level layout
  • Visual Debugging: Shows the planned path in the Unity console

How it works

The AI converts the game world into a grid and uses pathfinding algorithms to navigate:

  • Walls/Obstacles
  • Mario's position
  • ! Target destination
  • * Planned path
  • Safe walkable areas

Setup

  1. Add Coordinates.cs to an empty GameObject
  2. Drag Mario and obstacles into the script's fields
  3. Make sure Mario has the "Player" tag
  4. Press play and watch Mario navigate automatically

Files

  • Coordinates.cs - Main AI controller
  • AStar.cs - Pathfinding algorithm
  • Node.cs - Grid system
  • PriorityQueue.cs - Pathfinding helper

Tech Stack

C#, Unity, A*/Theta* algorithms

About

An intelligent AI system for Super Mario Bros game that uses A* and Theta* pathfinding algorithms to autonomously navigate levels, detect hazards, plan jumps, and avoid death pits in real-time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages