Planning with Pixels in (Almost) Real Time

Wilmer Bandres, Blai Bonet, Hector Geffner

TL;DR

This paper demonstrates that width-based planning algorithms can achieve human-level performance on Atari 2600 games directly from screen pixels, completely out-of-the-box and without any training. By introducing Rollout IW(1), an episodic rollout variant of the Iterated Width algorithm, the authors enable online decision-making in near real-time (0.5 seconds per move), challenging the notion that pixel-level control requires massive reinforcement learning.

What Problem Does This Paper Address?

In the Arcade Learning Environment (ALE), there is a sharp divide between learning and planning. Deep reinforcement learning (RL) methods like DQN learn closed-loop policies from screen pixels, but require millions of frames of offline training. Conversely, planning algorithms look ahead online and work instantly without training, but traditionally rely on internal RAM states rather than raw pixels.

Planning with RAM states is an unfair comparison to humans, who must rely purely on visual inputs. However, planning directly from pixels introduces a massive state space. This paper tackles the challenge of planning directly from visual screen inputs in (almost) real-time, bridging the gap between human-like visual perception and online lookahead search.

Methods

The authors combine a state-of-the-art visual feature extractor with a novel variation of a classical planning algorithm:

  1. B-PROST Features: Instead of raw pixels, the screen is mapped to over 20 million boolean features that capture spatial and temporal relationships (e.g., color offsets between current and previous frames).
  2. Iterated Width (IW): Standard breadth-first search scales exponentially with state size. IW(1) bypasses this by pruning any state that does not make at least one boolean feature true for the first time (novelty > 1). This bounds the search space linearly relative to the number of features.
  3. Rollout IW(1): To make IW(1) suitable for real-time play, the authors replace systematic breadth-first search with depth-progressing random rollouts (episodes). This drastically improves the algorithm's "anytime" behavior, allowing it to return a solid move even under tight time constraints.
  4. Enhancements: The authors introduce Partial Caching to avoid redundant simulator calls, Risk Aversion to heavily penalize in-game deaths, and Subscoring (IWS(1)) to track logarithmic score changes as subgoals.

Datasets

The algorithms were evaluated using the standard Arcade Learning Environment (ALE) benchmark, consisting of 58 Atari 2600 games. Performance was compared directly against human baselines, the deep RL algorithm DQN, and a shallow RL method utilizing the same visual features.

Key Insights and Ideas

  • Linear Complexity in a Massive Feature Space: Even though B-PROST generates over 20 million features, IW(1)’s pruning mechanism ensures that the number of expanded states remains small and computationally tractable.
  • Pixels Can Beat RAM: Surprisingly, planning with screen pixels often outperforms planning with RAM states. This is because the engineered B-PROST features explicitly capture structural, spatial, and temporal relationships that are highly relevant to gameplay, whereas raw RAM bits do not.
  • Rollouts for Anytime Performance: Standard systematic search algorithms perform poorly if cut off early. Rollout IW(1) behaves like an open-loop Monte Carlo search, ensuring deep exploration paths are evaluated even within a fraction of a second.

Key Results

The authors evaluated their best configuration, RAS Rollout IW(1) (Risk-Averse with Subscoring), under strict online time budgets:

  • 0.5-Second Budget: With only half a second to decide each move, the algorithm performed as well as or better than a human player in 25 out of 49 games (51.0%). It outright beat humans, DQN, and shallow RL in 15 of those games.
  • 32-Second Budget: When given more time to plan, the algorithm outperformed humans in 75.5% of the games.
  • Montezuma's Revenge: Notably, the risk-averse rollout planner achieved a positive score on Montezuma's Revenge in 0.5 seconds—a notoriously difficult game for standard exploration methods.
Figure 3: Comparison of RAS Rollout IW(1) with time bud- get of 0.5 seconds with the human player and DQN using relative scores over 48 games. Blue bars depict RAS Roll- out IW(1) scores (r) vs. human scores (h), while red bars, RAS Rollout IW(1) scores vs. DQN scores (d). The bar has positive length (r −h)/h when r > h, and negative length (h −r)/r when r < h. Bars have zero length when r = h. Same for d in place of h.

Limitations and Future Work

  • Stochastic Environments: The current lookahead planner relies on the deterministic nature of the ALE simulator. Extending width-based search to stochastic settings (such as the newer "noisy" Atari benchmarks) remains an open challenge.
  • Lack of a Closed-Loop Policy: Because the algorithm plans online for every single step, it does not retain a permanent "policy." The authors suggest that future work could use imitation learning, treating the Rollout IW planner as a "teacher" to train a fast, closed-loop neural network policy.

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