Robot Warehouse Lab teaching notes

For computer science teachers in grades 6 to 12. These notes cover a first period, the levels, the misconceptions the app is built to confront, and what it leaves out.

Using this with a class? Make a free class and add your students yourself: each gets a username and password, with no email or Google account needed. Or give them one join code. Using Google Classroom? Post the link there; with a free class, the link also puts each student in your class, so you see their work. mytekDev is also available from the Google Workspace Marketplace, so your school's Google admin can install it for everyone.A first lesson: Open Level 2 on the projector and press play. Two robots run the same program that worked on Level 1, and within a few seconds they meet nose to nose in the middle aisle. A red ring goes round them: each is waiting for the other, and neither will move. Ask the class what rule would fix it, without telling either robot about the other. Then drag one arrow onto an aisle to make it one way, and run it again.

Set up a free class Share to Google Classroom
Put this on your class site

Students can use Robot Warehouse Lab right on your page, with no account. What they make stays on that page; to keep their work, they make a free account.

Google Sites: Insert, then Embed, then By URL, and paste this address.

https://mytekdev.com/try/robotwarehouselab?embed=1

Canvas, a blog, or any page that takes HTML: paste this code where you edit the page as HTML.

<iframe src="https://mytekdev.com/try/robotwarehouselab?embed=1" width="100%" height="640" style="border:0" allow="fullscreen" title="Robot Warehouse Lab demo from mytekDev"></iframe>

About these notes

Robot Warehouse Lab is a warehouse floor of 1 meter squares with shelves, chargers and a picker, and robots that fetch shelves for the picker. Students write one rule, in Blocks or Python, and every robot runs it once every tick, a second of warehouse time. Every robot is asked about the same floor, robot 1 first, and then they all move together. A referee watches for collisions, deadlocks and robots that wait too long.

There are eleven levels and Your floor, and each saves its best. Levels 1 to 4 are on a small floor with up to six robots: one robot, two robots that lock up, taking turns, reserving squares. Levels 5 to 11 are on a big floor with up to thirty robots and a stream of orders: fairness, fleet size, which order next, batteries, the planner, rush hour and a whole hour. Each level's card says what to do and its hint says how. How it works, in the Help menu, explains each idea.

Every run is exact: the same program on the same level ends the same way on every computer, in Blocks or Python. A student who says "it worked for me" can be checked by running their program again. Help, Same on every computer shows a fingerprint of a standard run.

A first period

Levels 1 to 3 fit in a period, with time to talk about why two robots that each follow the rule perfectly still lock up.

  1. One robot (5 minutes) Open Level 1 and press the round play button or the space bar. The robot drives to the blue shelf, lifts it, carries it to the picker, waits 6 ticks, and takes it back: 50 ticks. Open the Rules tab and read the rule in plain words.
  2. Two robots (15 minutes) Level 2: press play. The two robots meet head on in the middle aisle and the red ring goes round them. Ask what went wrong, when neither robot broke the rule. Then drag arrows from under the floor onto the middle aisles to make them one way: both orders go out in 57 ticks.
  3. Six robots (20 minutes) Level 3: with the starter, two robots look at the same free square on the same tick and both drive in. Add "it is my turn" to the move, so the lower number goes first, and keep arrows that make a loop. Twelve orders go out in 152 ticks.
  4. Talk (5 minutes) Ask: which rules stop crashes, and which stop robots waiting for each other forever? They are different rules.

The levels

Each level opens with one idea. The end card says what happened, rings the robot or shelf it is about in orange, and names the idea: deadlock, starvation, a slow order, a flat battery.

LevelThe jobWhat it is built to show
1. One robotBring the blue shelf to the pickerOne rule, one robot: 50 ticks, 6 of them at the picker
2. Two robots, one programGet both orders outThe same rule on two robots deadlocks in the middle aisle; one-way arrows fix it, 57 ticks
3. Six robotsTwelve orders, one programTwo robots see the same free square and both drive in; taking turns by number and a loop of arrows get twelve out
4. Reserve firstDrive only into a square you have reservedReserving stops collisions completely; robots can still wait for each other forever without the arrows
5. Who goes firstTwenty robots, nobody waits over 40 ticksLower number first starves robot 20 (41 ticks in a row); longest wait first passes, 69 orders, no wait over 30
6. More robots100 orders in 15 minutes with as few robots as you canThe Fleet sweep's curve: 10 robots get 100, 15 to 25 about 108, 30 jam and lock
7. Which order next66 orders, no order waits over 4 minutesNearest first leaves a far order waiting; oldest first falls behind; nearest unless one has waited 100 ticks gets 69
8. Charge up70 orders, no robot runs flatNever charging runs a robot flat; charging below 30 percent gets 72; below 60, only 67
9. The plannerThirty robots, 110 ordersLongest wait first gets 105; lower number first deadlocks; follow the plan gets 116 with no collision
10. Rush hour70 orders, no order waits over 3 minutes in the rushEight robots fall behind in the rush; oldest first passes with 10 on local rules or 12 on the planner; nearest first fails at any size
11. The shiftAn hour: 440 orders, no wait over 5 minutes, no robot flatEverything together: 15 robots on the planner, charging and choosing, get 449; 10 fall behind
Your floorPaint a warehouse and run any program on itTesting a rule on a new layout, and how many robots a floor can take

Python starts from warehouse import Floor, then floor = Floor(). Write def step(robot): that returns one action and end with floor.every_tick(step). Actions: robot.move() (toward the target), robot.move("north"), robot.wait(), robot.lift(), robot.set_down(); from Level 4 robot.reserve(); from Level 7 robot.take_order("nearest") or robot.take_order("oldest"); from Level 8 robot.charge(); from Level 9 robot.follow_plan(). Reading: robot.job(), robot.at_target(), robot.ahead(), floor.free(square), robot.my_turn() or robot.my_turn("longest wait"), robot.waited(), robot.claimed(), floor.orders_waiting(), floor.oldest_wait(), robot.battery(). The Blocks say the same things, and the Python tab shows the Python the blocks make.

What students get wrong, and where the app answers it

What students thinkWhere the app answers it
If the program works for one robot, it works for manyLevel 2: the Level 1 rule, unchanged, locks two robots up in the middle aisle within seconds.
A robot that looks before it moves can't crashLevel 3: two robots both see the same square free on the same tick, and both drive in. Each looked; neither knew about the other.
If robots can't collide, they can't get stuckLevel 4: reserving makes collisions impossible, and robots can still each wait for a square another holds, in a ring.
A fair rule is one that treats every robot the same wayLevel 5: lower number first is the same rule for everyone, and robot 20 waits 41 ticks in a row. Fairness needs the wait itself to count.
More robots always means more ordersLevel 6: the Fleet sweep's curve rises, flattens from 15 to 25 robots, and falls at 30 when the floor jams.
The fastest choice is always the best oneLevel 7: nearest first gets the most out until one far order waits over 4 minutes and the level fails.
Planning ahead is just looking furtherLevel 9: each robot plans around the plans already made, in a set order. Without the order and the shared table, looking further does not stop two robots wanting the same square.

What the app simplifies, on purpose

Setting it up for a class

No setup is needed. With free accounts, each student's levels, program, arrows and painted floor save as one project, with a picture of the warehouse. Typed words in a shared project, its name and the program, pass the platform's filter.

Slower and Faster change how fast the floor runs, from 1 tick a second to 30; the ticks themselves do not change, so the results are the same at any speed. V switches between the corner view and the view from above, which is best for laying arrows and painting Your floor. File, The shift report prints the last run with its charts and the program.

Standards

Levels 1 to 4 need conditionals and fit grade 6 in Blocks. Levels 5 to 7 fit grades 7 to 10, and batteries, the planner and the hour-long shift suit high school, where deadlock and scheduling are taught by name.

More help

Is something on this page wrong or not clear? Write to us.

Page last reviewed December 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.