Specify state, action, reward and transition

Keep each reward, discount and value next to its number. · 182 words

Consider a museum robot in a corridor with positions A, B, and C. Its state is (position, has_brochure), where the second value is 0 or 1. Actions are pick up, move right, and deliver. A reward scores an outcome: pick up or move gives 0, successful delivery gives +2, and delivery without a brochure gives -1. A transition gives the next state. From (A,0), pick up leads to (A,1) with reward 0. From (C,1), deliver leads to (C,0) with reward +2. These transitions are deterministic: the same state and action always give the same result.

A policy says which action to select in each state. Suppose the robot picks up at A when empty, moves right from A or B, and delivers at C. Starting at (A,0), pick up gives 0 and state (A,1). Moving right gives 0 and state (B,1). Moving right again gives 0 and state (C,1). Delivering gives +2 and state (C,0). The brochure flag matters even when the robot stays at A, because it changes the useful next action. State must include every detail needed for that decision.

Check your recall

In the museum robot example, what are the state, action, reward, and transition?

Check your answer

The state is (position, has_brochure). The actions are pick up, move right, and deliver. Rewards are 0 for picking up or moving, +2 for successful delivery, and -1 for delivery without a brochure. A transition determines the next state. For example, deliver from (C,1) gives +2 and leads to (C,0).

Sources and credits

Original KeyTouch lesson. Background reading · UC Berkeley · Introduction to Artificial Intelligence.