Introduction
Training AI agents for complex video games typically requires massive computational resources and millions of environment interactions. This study investigates the efficacy of 22 different visual encoders for imitation learning (IL) across diverse gaming environments, including Minecraft, Counter-Strike: Global Offensive (CS:GO), and Minecraft Dungeons. The findings reveal that pre-trained foundation models, particularly DINOv2, can enable high-performance agents using as little as five minutes of human gameplay data while significantly reducing training overhead.
Problem Statement
The primary challenge in developing game-playing agents is the "visual bottleneck"—the ability of the model to interpret raw pixels into meaningful state representations. Traditional approaches often train encoders from scratch (end-to-end), which is data-intensive and computationally expensive. This research explores whether "foundation models" pre-trained on real-world imagery can bridge the domain shift to stylized game environments, thereby improving data efficiency and accessibility for researchers with limited hardware.
Methodology
The researchers utilized Behaviour Cloning (BC), where agents learn to map visual observations ($o_t$) to expert actions. The core architecture consists of a visual encoder that produces embeddings ($z_t$), which are then fed into a two-layer Long Short-Term Memory (LSTM) network to capture temporal dependencies.
The study compared two categories of encoders:
- End-to-End Encoders: Standard ResNets and Vision Transformers (ViTs) trained from scratch.
- Pre-trained Encoders: Ten frozen models, including CLIP, DINOv2, FocalNet, and Stable Diffusion VAE.
By freezing pre-trained encoders and using pre-computed embeddings, the authors achieved a 98% reduction in training time and a 95% reduction in VRAM usage, making the training of sophisticated agents far more accessible.
Experimental Setup and Datasets
The agents were evaluated on three distinct benchmarks:
- Minecraft (Treechop): A first-person navigation and interaction task in a blocky, stylized world.
- CS:GO (Clean Aim Train): A realistic first-person shooter task requiring high precision.
- Minecraft Dungeons (Arch Haven): A complex isometric combat environment introduced as a new benchmark in this work.
Key Insights
- Superiority of DINOv2: Despite being trained on real-world photographs, DINOv2 emerged as the most robust general-purpose encoder, frequently outperforming models trained specifically on game data.
- The Impact of Domain Shift: While pre-trained models excelled in Minecraft, they struggled in CS:GO. The latter's monotone, greyish palette differs significantly from the diverse real-world datasets used for pre-training, suggesting that visual style remains a critical factor in model transferability.
- Extreme Data Efficiency: The study demonstrated that capable agents could be trained with only 5 to 45 minutes of human demonstration data, challenging the assumption that IL requires massive datasets.
Results
- Performance: In Minecraft, DINOv2 ViT-L/14 achieved a 32% success rate, surpassing the best end-to-end model (24.3%). Conversely, in CS:GO, end-to-end ResNets dominated with 17.4 kills-per-minute (KPM), compared to just 6.0 KPM for the best pre-trained model (CLIP).
- Efficiency: Using pre-computed embeddings for a DINOv2 ViT-L/14 model reduced training time from 280 minutes to just 4.5 minutes.
Limitations and Future Directions
The study focused exclusively on frozen encoders; future work could explore the benefits of fine-tuning. Additionally, while the agents succeeded in short-horizon tasks, their performance on long-term strategic objectives remains an open question. Further research is needed to determine how well these models generalize to unseen maps or significantly different visual mods.
Summary updated