Imagine sending robots into an unknown building after a disaster—how do they efficiently search every room without bumping into each other? This project tackles exactly that: multi-robot exploration of unknown environments. Instead of one robot slowly mapping everything, multiple robots work together, each exploring different areas simultaneously. The challenge is coordinating them without a central 'brain'—each robot makes its own decisions based on what it knows.

Multiple robots exploring a grid environment
Each robot can only 'see' a small area around itself (like a flashlight in the dark). The goal: explore the entire environment as quickly as possible, without robots colliding or wasting time exploring the same areas twice.
The core idea is frontier-based exploration: robots seek out 'frontiers'—the boundaries between explored space and the unknown. It's like always walking toward the edge of your flashlight's beam. Each robot independently finds the nearest frontier and plans a path there using a modified A-Star algorithm. To avoid crowding, robots make areas near other robots' targets more 'expensive' to visit—naturally spreading them across the environment.
Each robot repeats a simple loop: look around and update its map, pick the best frontier to explore, move toward it, and repeat. The magic is in how robots avoid getting in each other's way.
Standard A-Star pathfinding finds the shortest path to one destination. But we have many possible frontiers! Multi-Goal A-Star terminates as soon as it reaches any frontier—whichever is easiest to get to. The clever part: when comparing paths, we add 'penalty costs' for areas near where other robots are heading:
1def __lt__(self, other):
2 my_val = self.f
3 other_val = other.f
4 # Add costs from other robots' targets
5 for drone_id, costs in temp_costs.items():
6 if drone_id != self.drone_id:
7 my_val += costs.get((self.x, self.y), 0)
8 return my_val < other_valWhen a robot claims a frontier, it inflates costs in a radius around that cell—discouraging other robots from targeting the same area.
Why does this work? Several design choices work together:
The Python implementation has three main pieces: tracking search progress (Node), managing individual robots (Robot), and coordinating the overall exploration (Planner).
Node — A-Star search state with position, costs, and drone IDRobot — individual robot state and movementPlanner — map updates, frontier detection, pathfindingHere's the key coordination trick: when a robot picks a frontier target, it 'claims' that area by inflating costs in a square neighborhood around it. Other robots see these costs and naturally steer toward different frontiers:
1# When path found to frontier
2for dx in range(-COST_RANGE, COST_RANGE + 1):
3 for dy in range(-COST_RANGE, COST_RANGE + 1):
4 temp_costs[drone_id][(goal.x + dx, goal.y + dy)] = COST_INCREASEOther robots incorporate these costs during planning, naturally spreading out across the environment.
Does adding more robots actually help? I tested on maps of different sizes with varying robot counts to find out.

Test environments of varying sizes
The results show a sweet spot: adding robots helps up to a point, then they start getting in each other's way.

Exploration time vs. number of robots
Several directions for extending this work:
This project shows that multiple robots can efficiently explore unknown spaces without needing a central coordinator—just local information and clever cost-sharing. The big takeaways: