A-maze-d
Multi-Robot Pathfinding Engine
A multi-robot pathfinding solver in C. It computes optimal distances with a reverse BFS from the exit in O(R+T), extracts non-overlapping shortest paths, distributes the robots by traversal cost, and resolves collisions turn by turn.
robots, one way in
Twelve robots wake up in ##start. They must all reach ##end, in as few turns as possible.
rooms from the exit
First, a wave leaves the exit and gives every room its distance to it, dead ends included.
separate routes
Walking down the numbers from the start, it opens three routes that never share a room.
turn
Each turn, every robot moves one room ahead, if that room is free: never two robots in the same room.
turns, all twelve out
Each robot took the route that got it out soonest: five on the shortest one, four and three on the others.
Animation: twelve robots cross a maze from one start room to one exit along three separate routes, one robot per room, in 11 turns.