Maze AI

Hello everyone! Here's a project I worked on for a Computer Science Fair at school.

The program has 2 major parts, namely:

  1. The AI itself. In fact, there are 4 AI included in the program. You get to play around with Breadth First Search, Depth First Search, Greedy Best First Search and A* Search.

  2. The map-design aspect. You can drag and click around to create walls and then place down the start and end nodes to run the AI.

Breadth First Search

This search algorithm expands nodes which are closest to the start node. It can be likened to a circle which is gradually growing and reaching new nodes on the Maze. You could also imagine it as a self-replicating robot. As the robot navigates through the maze, it will likely reach junctions. At each junction, the robot will divide into as many smaller robots as is necessary and one of these robots goes down each possible path.

Depth First Search

This algorithm expands nodes which are the furthest from the starting node. This is possibly how a human would navigate a maze if they have no idea