Planning With Pixels in (Almost) Real Time

Wilmer Bandres, Blai Bonet, Hector Geffner

Abstract: Recently, width-based planning methods have been shown to yield state-of-the-art results in the Atari 2600 video games. For this, the states were associated with the (RAM) memory states of the simulator. In this work, we consider the same planning problem but using the screen instead. By using the same visual inputs, the planning results can be compared with those of humans and learning methods. We show that the planning approach, out of the box and without training, results in scores that compare well with those obtained by humans and learning methods, and moreover, by developing an episodic, rollout version of the IW(k) algorithm, we show that such scores can be obtained in almost real time.

The Pixel and Speed Gaps in Atari Planning

In the Arcade Learning Environment (ALE), agents typically fall into two categories: learning-based (like DQN) and planning-based. While learning methods require extensive training but react instantly, planning methods search for optimal moves on the fly. However, traditional planners often rely on internal RAM states—information unavailable to human players—and are frequently too slow for real-time interaction.

This research addresses two primary challenges: the Pixel Gap, planning effectively using only raw screen pixels, and the Speed Gap, achieving this lookahead within a real-time budget of approximately 0.5 seconds per decision.

Methods: Rollout IW(1) and B-PROST Features

The core of this approach is Iterated Width (IW), a planning algorithm that manages the search space by pruning states that do not trigger "novel" features. To adapt this for pixels, the authors utilized B-PROST features, mapping screen states to over 20 million boolean features that capture color, spatial relationships, and temporal movement.

To achieve real-time performance, the authors introduced Rollout IW(1). Unlike standard breadth-first IW, the rollout version performs a sequence of episodes, making it an "anytime" algorithm that can return a viable move even when interrupted by a strict time budget.

Pseudocode for the Rollout IW(1) algorithm, illustrating the anytime search strategy.

Additional refinements include "subscoring" to handle sparse rewards and "risk aversion" (RAS) to penalize the loss of lives, which is critical for survival in complex environments like Montezuma’s Revenge.

Key Results

The researchers evaluated the RAS Rollout IW(1) algorithm across 58 Atari games. With a decision budget of only 0.5 seconds, the planner achieved human-level performance or better in 51% of the games (25 out of 49 compared).

Comparison of RAS Rollout IW(1) at a 0.5s budget against Human and RL baselines across Atari games.

Notably, the algorithm outperformed the Deep Q-Network (DQN) and shallow RL baselines in roughly 30% of the games without any prior training. The results also demonstrated that planning from pixels is as effective as planning from RAM, suggesting that the B-PROST features successfully capture the underlying game mechanics.

Insights and Future Directions

A key takeaway is that the complexity of IW(1) scales linearly with the number of features, allowing it to process millions of visual features efficiently. Furthermore, the rollout strategy proved superior for real-time play by exploring deeper into the state space more rapidly than systematic search.

Future work aims to address stochastic (randomized) environments and explore imitation learning, where the planner acts as a teacher to train a fast, closed-loop neural network controller, potentially removing the need for real-time lookahead entirely.

Summary updated

BibTeX
@inproceedings{bandres2018planning,
  author = {Wilmer Bandres and Blai Bonet and Hector Geffner},
  title = {{Planning With Pixels in (Almost) Real Time}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=S1-6flbdWr},
}
Figure