Micromouse maze-solving algorithm(floodfill) in C++
This project implements a Micromouse floodfill maze-solving algorithm in C++, designed to run with the mms Micromouse Simulator.
It supports search runs, Backtracking, and shortest path discovery, making it ideal for robotics competitions and micromouse algorithm research.
This code was originally developed for an actual micromouse, so some parts may be redundant for the simulation.
This repository contains multiple versions of the main control loop for different micromouse run strategies:
Floodfill_SearchRun.cpp- performs a single Search Run from Start to Goal(center of the maze)
Floodfill_Backtracking.cpp- performs a return run where it do a Search Run and a Backtracking. This also shows the shortest path it had discovered.
Floodfill_DoubleSearch.cpp- performs two* Search Runs to refine the map and then shows the final shortest possible path through the discovered cells.
Testing.cppis the file I use to test new algorithms.
You can find all the instructions for the simulator in C++ from here
- Clone this repository
- Download the Micromouse simulator
- Run the simulator and click the "+" button to configure a new algorithm
- Enter the config for your algorithm (name, directory, build command, and run command)
- Click the "Run" button
You can find mazefiles from here . This includes mazes from international level competitions
There is a very useful project from Bulebots that can create maze files using images of them.
- If you're using Windows, you may need to download and install MinGW
- Communication with the simulator is done via stdin/stdout, use stderr to print output
- Descriptions of all available API methods can be found at mackorone/mms#mouse-api
