Sasin MiM · Reinforcement learning

Reward Lab

Train a warehouse robot by trial and error. You never tell it where to go: you only choose what is rewarded and what is penalised. Then watch what it learned, and see what the company earns.

1 · The task

A company uses a robot to carry parcels from the dock to two customers. Nobody programs the route. The robot must learn it.

The warehouse

Everything is on one floor: the dock, the shelves, the scanner and both customers. The stairs are an opening in the floor that leads down to the basement. The robot never needs them. If it rolls onto them, it falls and breaks.

The same warehouse as a map

This is the view you will see in the next steps. One square is one move.

Dock: the robot starts hereShop: the customer next doorBig: the big customer, further awayStairs: they go down to the basementScan: a scanner on the floorGrey blocks: shelves, no way through

What the company earns

A parcel delivered to the shop next door+10 A parcel delivered to the big customer+25 A robot that falls down the stairs (repair)−15 A scan at the scanner0

A working shift is 200 moves. After a delivery the robot goes back to the dock for the next parcel. A broken robot is repaired at the dock, which costs 10 moves. The floor is slippery: about 1 move in 10 slides sideways.

What the robot knows

  • The square it is on, and four actions: up, right, down, left.
  • After each action, the reward or penalty that you defined.
  • Nothing else. It does not know the map, the customers, the stairs, or what the company earns.

It learns by trial and error: it tries actions, sees the reward, and over many rounds prefers the actions that bring the most reward.

Method: tabular Q-learning, a basic reinforcement learning method. Everything runs in this browser; nothing is sent anywhere. The warehouse and its numbers are invented for teaching.