NVIDIA’s AI Finally Solved Walking In Games
By Two Minute Papers
Key Concepts
- Physically Simulated Agents: NPCs (Non-Player Characters) controlled by physics rather than pre-defined animations.
- Trace (Diffusion Model): The “brain” of the system, responsible for path planning and predicting future open space.
- Pacer: The “muscle” of the system, responsible for physically simulating joint movements to follow the planned path.
- Adversarial Reinforcement Learning: A training method using a “Discriminator” to judge the realism of the AI’s movements and provide feedback.
- Diffusion Model: A generative AI technique used to create paths from noise, similar to image generation.
- NPCs (Non-Player Characters): Characters in a game or simulation that are not controlled by a human player.
Realistic Physically Simulated Characters: A Deep Dive into "Trace" and "Pacer"
This video details a novel approach to NPC movement in simulations and games, moving beyond traditional animation-based systems to physically simulated agents. The core issue with current methods – relying on “floating capsules” with applied animations – is the occurrence of unnatural movements like “moonwalking bugs” when speed or unexpected events disrupt the synchronization between animation and movement. This new system aims to eliminate these artifacts by grounding character movement in physics and learning.
The Problem with Traditional NPC Movement
The presenter highlights the limitations of conventional game NPC movement. Typically, NPCs are represented as capsules moved by game code, with animations layered on top. This approach is prone to errors when the animation speed doesn’t perfectly match the desired movement speed, resulting in visually jarring glitches where feet appear to slide or pass through the ground. These “moonwalking bugs” detract from realism and immersion.
Introducing Trace and Pacer: Brain and Muscle
The research presented introduces a two-part system: Trace and Pacer. Trace functions as the “brain,” utilizing a diffusion model – a technology similar to those powering AI image generators – to plan paths. Unlike traditional pathfinding which draws a simple line, Trace imagines the future, predicting where open space will be and adjusting its path accordingly.
Pacer acts as the “muscle,” focusing solely on physically simulating the character’s joints to follow the path provided by Trace. Crucially, Pacer doesn’t rely on pre-canned animations. Instead, it runs a live simulation, with each joint constantly fighting against gravity 30 times per second. This constant interaction between the brain (Trace) and the muscle (Pacer) is a key element of the system’s success. If Pacer encounters difficulty – such as a joint slipping on a rock – it communicates this to Trace, which then adjusts the path to avoid the obstacle.
Training the AI: Adversarial Reinforcement Learning
The system doesn’t inherently know how to walk. The researchers employed Adversarial Reinforcement Learning to train the AI. This involved a “Discriminator” – a judge – that evaluated the AI’s movements. If the movement appeared unnatural or “glitchy,” the Discriminator would provide negative feedback, forcing the AI to iterate and improve.
This process involved billions of attempts across over 2,000 humanoids trained in parallel for three days. Through this rigorous training, the AI learned to coordinate its joints, stiffen its legs for stability, and swing its arms naturally, effectively evolving the ability to walk.
Generative Pathfinding and Social Interactions
The diffusion model used in Trace allows for generative pathfinding. Similar to prompting an image generator, researchers can guide the diffusion process to create specific behaviors, such as instructing agents to walk side-by-side, forming social groups. This contrasts with traditional pathfinding which often results in robotic and predictable movements.
Handling Complex Terrains
A significant advantage of this physically simulated approach is its ability to handle complex terrains without requiring specialized animations. The agents naturally adjust their movements for stairs, slopes, and rocky paths, as the physics engine governs their interaction with the environment. This eliminates the need for developers to create separate animations for each terrain type.
Real-World Applications: Beyond Games
While the technology is visually impressive in a gaming context, the presenter emphasizes its potential beyond entertainment. A key application lies in the training of self-driving cars. Current simulation environments often use predictable, rule-based pedestrian behavior. This can lead to autonomous vehicles that are unprepared for the unpredictable actions of real humans.
This system allows for the creation of virtual cities populated with thousands of agents exhibiting diverse and realistic behaviors. Researchers can instruct agents to walk “aggressively” or “like a constipated hippo,” generating unique and challenging scenarios for autonomous vehicle training, ultimately improving safety.
Data and Accessibility
The presenter notes that the source code for this system is publicly available, fostering further research and development.
Notable Quote
“This constant bickering between the dreamy brain and the struggling legs is one of the keys to success here.” – Dr. Károly Zsolnai-Fehér, describing the interaction between Trace and Pacer.
Conclusion
This research presents a significant advancement in NPC movement, moving beyond animation-based systems to a physically simulated approach driven by AI and physics. The combination of Trace and Pacer, trained through adversarial reinforcement learning, results in more realistic, adaptable, and robust character behavior. While initially developed for gaming, the technology has broader implications for fields like autonomous vehicle training, highlighting the potential for safer and more realistic simulations. The open-source nature of the project further encourages innovation and collaboration within the research community.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "NVIDIA’s AI Finally Solved Walking In Games". What would you like to know?