A simulation of autonomous waste-collection agents that collaborate to collect and deliver waste efficiently using reinforcement learning (Q-Learning) and auction-based task allocation strategies.
This project was developed as part of a multi-agent systems course at Tecnológico de Monterrey.
It combines AgentPy for agent modeling and Unity for 2D/3D visualization.
The goal of this system is to model and evaluate coordination strategies for smart-city waste collection.
Agents (trucks) operate on a grid, communicate, and decide which bins to service using two main methods:
-
Auction-Based Allocation:
Agents bid for tasks (bins) based on distance, capacity, and energy.
A central dispatcher or distributed consensus assigns tasks to maximize efficiency. -
Q-Learning:
Each agent learns from experience to optimize its route and collection decisions over time.
The Q-table stores states such as location, load, and bin fill levels to balance exploration and exploitation.
| Agent | Description |
|---|---|
| TruckAgent | Collects waste from bins, returns to depots when full. Learns or bids for optimal paths. |
| BinAgent | Represents waste bins with variable fill levels and coordinates. |
| DispatcherAgent | Manages global coordination and allocation through auction or monitoring policies. |
- Environment: 2D grid world defined in AgentPy (
Environmentclass). - Communication: Message passing between Truck–Bin–Dispatcher agents.
- Decision Logic: Switchable between Q-Learning and Auction modes.
- Visualization: Export of agent positions and states to JSON → rendered in Unity for animation.
Main Output Files:
bins.json→ positions and fill levels of binstrucks.json→ trajectories and states of truck agents- Optional:
simulation_log.csv→ performance metrics per step
| Category | Tools / Libraries |
|---|---|
| Simulation | AgentPy, NumPy |
| Visualization | Unity (C#), JSON interface |
| Data Analysis | Pandas, Matplotlib |
| Communication | JSON export/import |
| Learning | Q-Learning, Auction Protocols |