Skip to content
StackDecode
AI & ML Atlas
Reinforcement LearningalgorithmInteractive simulation

Prioritised Sweeping

A planning method that updates the states whose values would change the most first.

The idea

When a state's value changes a lot, its predecessors' values probably need to change too. Prioritised sweeping keeps a queue of states ordered by how big the expected change is, and processes the most urgent first, propagating information backwards through a learnt model far faster than sweeping uniformly.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

GOAL +1PIT −1start000000000000000000
  • positive value
  • negative value
  • best action

Every state starts with value zero. A state's value is the total future reward expected from it.

sweep:
0
1/51

Each cell shows its estimated value; arrows show the action the policy would take.

Step by step

  1. 1Take a real step and update the model.
  2. 2Compute the size of the value change for the state.
  3. 3If it exceeds a threshold, put the state in a priority queue.
  4. 4Pop the highest priority, update it, and queue its predecessors.
  5. 5Repeat a few planning steps per real step.

Where it is used

Sample-efficient model-based learning in small problems.

Watch out for

Requires a model and a way to find predecessors.

Related