TL;DR
Prioritized Sweeping is a reinforcement learning (RL) algorithm that combines the data efficiency of classical model-based methods with the real-time speed of incremental methods. By using a priority queue to focus computation only on the states most affected by new information, it achieves dramatic speedups in both learning time and the number of required observations.
What Problem Does This Paper Address?
In the early 90s, RL researchers faced a frustrating trade-off. On one hand, incremental methods like Temporal Differencing (TD) and Q-learning are "model-free"—they learn directly from experience. While they are computationally cheap and fast in real-time, they are incredibly "data-hungry." They require a massive number of observations to converge because information propagates slowly through the state space.
On the other hand, classical model-based methods build an internal map (a transition model) of the environment and use Dynamic Programming (DP) to solve it. These are highly data-efficient because they make full use of every observation, but they are computationally "heavy." Re-solving the entire model after every single step is impossible for large state spaces in real-time.
Researchers Andrew Moore and Christopher Atkeson asked a pivotal question: Can we get the accuracy of classical methods without the crippling computational overhead?
Methods: The Prioritized Sweeping Algorithm
The authors introduce Prioritized Sweeping (PS). The core insight is that when an agent learns something new about a state, it doesn't need to update every other state in the system. It only needs to update the states that lead into it (its predecessors), and even then, only if the change was mathematically significant.
The Algorithm Works Like This: 1. Build a Model: As the agent moves, it records transitions to estimate the probability of moving from state $i$ to state $j$. 2. Identify "Surprise": When an observation changes the estimated value of a state, the algorithm calculates the magnitude of that change (the $\Delta$). 3. Prioritize Updates: Instead of a blind sweep, PS uses a priority queue. The state that just changed is put at the top. 4. Backward Propagation: The algorithm pops the top state, updates it, and then looks at all its predecessors. It assigns each predecessor a priority based on how much the current state's change is likely to affect them. 5. Budgeted Computation: The agent performs a fixed number of these "top-priority" updates per real-world step, ensuring the system can keep moving in real-time while still "thinking" about the most important parts of its map.
Key Insights and Ideas
- Focus on the "Delta": The most important states to update are those whose values are currently the most "wrong." By focusing on the largest changes, PS avoids wasting CPU cycles on states that have already converged.
- Information Flows Backward: In RL, rewards usually happen at the end of a sequence. PS acts like a high-speed courier, rushing that reward information backward through the chain of predecessors to the start state.
- The 100-Backup Rule: The authors found that performing just 100 prioritized updates per observation was often enough to make almost complete use of the data. Doing "full" dynamic programming would take days, but PS gets nearly the same result in seconds.
Key Results
The performance gains demonstrated by Prioritized Sweeping were massive across multiple challenging benchmarks:
Data Efficiency: In a 500-state Markov prediction task, PS reached a target error rate in just 3,000 observations. In stark contrast, standard TD-learning required roughly 100,000 observations to achieve the same accuracy.
Real-Time Speed: The algorithm was tested on grid world mazes ranging from 15 to 4,528 states. In the largest 4,528-state maze, PS found the optimal path in 59,000 steps. Its closest competitor, an optimized version of Dyna (Dyna-OPT), took 245,000 steps.
Solving the "Unsolvable": The paper also evaluated a complex 3D "Rod-in-Maze" task (15,000 potential states) involving translating and rotating a rod through a cluttered environment. Standard Q-learning and Dyna-PI+ failed to even reach the goal within 200,000 experiences. Prioritized Sweeping converged to the optimal path in just 14,000 experiences (about 5.5 minutes of real-time).
Limitations and Future Work
- Memory Overhead: Unlike model-free methods, PS requires storing a transition matrix and a list of predecessors for every state. For astronomical state spaces (like Go or modern video games), this memory requirement can become prohibitive.
- State Discretization: The paper focuses on discrete states. The authors suggest using kd-trees to partition continuous state spaces more intelligently, a concept Moore explored in later work.
- Heuristics: The authors briefly mention that combining PS with heuristics (like Manhattan distance in a maze) can further prune the search space, focusing the agent only on states relevant to the current goal.
Summary updated