Skip to content

Warehouse Bots

Static Badge Static Badge


In this project, you will build a multi-robot coordination system for a warehouse represented as an A by B grid of shelves separated by single-tile. There are N bots, each given a list of pickup-and-deliver tasks. Only one bot may occupy a tile at any time. Each shelf contains 2 by 8 addressable slots identified by hexadecimal indices 0-f. A task instructs a bot to grab an item from one shelf slot and deliver it to another shelf slot, using the format:

The program reads configuration and tasks from instructions.txt with template:

num_of_bots 
A B 
what-bot(from) shelfX-shelfY-shelfSlot (to) shelfX-shelfY-shelfSlot 
what-bot(from) shelfX-shelfY-shelfSlot (to) shelfX-shelfY-shelfSlot 

Example

10 
3 3 
B1 2-1-3 1-1-2 
B1 1-2-a 2-4-3 
B2 3-2-4 1-2-f 

Implementation Guidelines

  1. Running the Program:
    • Parse instructions.txt: number of bots, grid size A X B, then one task per line. Validate formats and ranges. Reject malformed hex slot IDs or out-of-bounds shelf coordinates.
    • Construct the warehouse map. Shelves occupy grid cells on an A by B lattice. There is a single passable tile between adjacent shelves in both axes.
    • Represent each shelf's internal slots as a 2 by 8 array indexed by hex 0-f. For a pickup or drop, the bot must reach an adjacent tile to the target shelf and perform the action for that slot.
    • Time should be implemented in ticks where each tick/turn all bots decide if/where to move and then all moves are resolved.
    • Collisions should be prevented, only one bot is allowed per tile.
    • Execute each task: navigate to pickup shelf interaction tile, perform pickup for slot id, navigate to drop shelf interaction tile, perform drop (pickups and drops are just standing still for one tick on a valid tile).
    • Render the grid, shelves, aisles, and bots per timestep. Bots carrying the packages should be drawn differently then bots that have not performed a pick-up.

Testing

  • Vary number of bots N such as 2, 5, 10, 20, 50, etc. and measure time until the last task completes (ms and ticks).
  • Vary grid sizes A by B such as 3 by 3, 5 by 5, 10 by 10. Keep task count proportional to shelf count to maintain workload density. Observe congestion.
  • Vary number of tasks in given size and measure time until the last task completes (ms and ticks). Observe congestion.