Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

RL agent stuck at 779 points in Atari Frostbite: next-frame prediction only reached 697

The author of a Habr series is training a neural network to play Atari Frostbite from raw video frames, with a target of 136 thousand points. A simple agent scores 779 points and never clears the first level, and further training changes nothing. When he forced it to predict the next frame, results got worse: 697 points. The agent understands the scene but doesn't enter the igloo any more often. So with a sparse reward, one auxiliary task isn't enough: it needs starting scenes and a plan of action.

AI-processed from Habr AI; edited by Hamidun News
RL agent stuck at 779 points in Atari Frostbite: next-frame prediction only reached 697
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Starting scenes with a finished igloonext to the door, the agent enters the house right away
Key metric #2If the house is ready but the hero is far away, the agent doesn't plan a route to the igloo
Key metric #3The state vector is trimmed from 384 to 256 numbers: Atari's memory for the game is 128 bytes

Imagine you're training a reinforcement learning (RL) agent, it reaches some result and stops improving. Training keeps running, the curves are flat, and only one thing is clear: the system is stuck in a local minimum, a comfortable rut it can't climb out of on its own. That's exactly the problem Mikhail Kocherov ran into in the second installment of his series on Habr. His agent has to learn to play Atari Frostbite, seeing only raw frames, and score 136 thousand points or more to beat the MEME-200 model. The write-up is useful to anyone building agents: it shows why a "logical" addition to training sometimes makes results worse.

Where the agent got stuck

In Frostbite, an Inuit hops across ice floes, collects igloo blocks, dodges enemies, and a freezing timer keeps ticking. To advance to the next level, you have to enter a finished house. A newcomer who plays for two hours scores around 4 thousand points, which means two or three levels.

The agent from the first installment, built on a convolutional network and a transformer, scores 779 points and doesn't even clear the first level. It has mastered the basic mechanics, but further training doesn't improve the result.

Next-frame prediction: a good idea, no effect

The first idea came from neuroscience. To predict the future, you need to understand how the world works. If you drop a cup, it falls and breaks: behind that are objects, their relationships, and physics. The author expected that an agent forced to guess the next frame would develop internal concepts on its own, such as "igloo" and "door." DreamerV3, a competing model, uses a similar technique. The author also cites Rao and Ballard's 1999 work on predictive coding: in the visual cortex, higher levels predict the activity of lower ones, and the lower levels pass along only the error.

Technically, the setup is simple. Four frames come in, the agent encodes them into hidden vectors (latents), and it additionally builds a prediction of the next step's latent. One more term is added to the standard PPO loss: the mean squared difference between the predicted and actual latent.

The result was disappointing: 697 points versus 779. The first level still isn't cleared. The author's explanation is that prediction builds concepts but doesn't make the rare event "enter the door" happen more often. The agent barely sees a reward for it.

Greenhouse conditions and the missing route

So the author decided to create situations where the reward is reachable more often. Just as a child is first shielded from danger and allowed to explore the world, the agent is given starting scenes with a finished igloo or with an Inuit standing at the door. The standard ALE emulator has no save/load function. So the author used the HackAtari project, which modifies the emulator's memory. Among its modifiers are a fully built igloo, an igloo missing one or three blocks, an Inuit lined up with the door, and a scene without flying enemies.

But in HackAtari, parallel environments run on processes rather than threads, and that eats the gains from the GPU. The author forked ALE and moved the modifier logic from Python to C++. The agent still sees only frames, so formally this isn't cheating, it's a curriculum, a training plan. The downside is that it's tied to this specific game and scales poorly.

Another practical observation: all of Frostbite's memory takes up 128 bytes, while the agent's latent vector had 384 float32 numbers. The author considers that margin excessive and proposes reducing the dimensionality to at least 256, which speeds up training and requires less memory.

Tests showed an interesting pattern. If the Inuit stands at the door, the agent immediately enters the igloo. But when the house is ready and the hero is far away, the agent keeps jumping across the ice floes. It has learned what a finished igloo is and how to enter it, but it can't plan a route to it.

Why a planning horizon is needed

The reason is that the agent acts on reflexes: every 4 frames it "wakes up" and picks a button without remembering the previous step. A human thinks differently, like a set of nested dolls of goals: score points, clear the level, enter the igloo, build it, cross the ice floes in the right order. For this kind of hierarchy there's an entire research direction, Hierarchical RL, such as Feudal Networks, where a "manager" sets goals and a "worker" carries them out. But implementing this is hard, and the author is looking for an easier path to planning.

For practitioners, the takeaway is this. If the reward in your environment is sparse, auxiliary tasks such as state prediction won't help on their own: they give the agent concepts, not reasons to pursue them. You also need to raise the probability of the rare event, for example by choosing starting states, and give the agent a way to link actions across time. If you're scaling training on GPUs, check how your environments are parallelized: processes instead of threads can wipe out the entire speed gain.

Story

Key Questions Answered

Where the agent got stuck?

In Frostbite, an Inuit hops across ice floes, collects igloo blocks, dodges enemies, and a freezing timer keeps ticking. To advance to the next level, you have to enter a finished house. A newcomer who plays for two hours scores around 4 thousand points, which means two or three levels. The agent from the first installment, built on a convolutional network and a transformer, scores 779 points and doesn't even clear the first level.

What are the key details on Next-frame prediction: a good idea, no effect?

The first idea came from neuroscience. To predict the future, you need to understand how the world works. If you drop a cup, it falls and breaks: behind that are objects, their relationships, and physics. The author expected that an agent forced to guess the next frame would develop internal concepts on its own, such as "igloo" and "door." DreamerV3, a competing model, uses a similar technique.

What are the key details on Greenhouse conditions and the missing route?

So the author decided to create situations where the reward is reachable more often. Just as a child is first shielded from danger and allowed to explore the world, the agent is given starting scenes with a finished igloo or with an Inuit standing at the door. The standard ALE emulator has no save/load function. So the author used the HackAtari project, which modifies the emulator's memory.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — RL agent stuck at 779 points in Atari Frostbite: next-frame prediction only reached 697 https://news.hamidun.com/en/news/16936/rl-agent-stuck-at-779-points-in-atari-frostbite-next-frame-p

What do you think?
Loading comments…