Sunday, April 23, 2023

How Forza's Drivatar Actually Works | AI and Games #60 [VIDEO SUMMARY]

In the 60th episode of AI and Games titled "How Forza's Drivatar Actually Works," the video explores the impressive AI implementation in the Forza series, known as Drivatars. These AI-controlled racers are designed to drive like real people, learning from player behavior and allowing players worldwide to face off against their friends and other players across the Xbox network without actually playing the game together. The video delves into the complex system behind Drivatars, their development history, and how they utilize machine learning to provide a realistic and personalized racing experience.


Drivatars are a product of player modeling, an AI technique that gathers data on how players play a game and uses it to make intelligent decisions reflecting that knowledge. The Drivatar system has been an ongoing development since the first entry of the Forza Motorsport series on the original Xbox in 2005. What sets Drivatars apart is their ability to reproduce actions they have seen the player make before, as well as predict how the player would race in situations they might never have tried.

The video explains that machine learning is particularly suitable for the Drivatar system because it can identify patterns in large, complex data sets and generalize them. This allows the AI to respond appropriately when it encounters a particular pattern in the data. The Forza series' physics simulation system plays a crucial role in the Drivatar's performance, as it provides a realistic and authentic driving experience.

The AI controller layer in Forza is designed to know exactly how to drive a car in a given situation based on the current physics simulation. This information is used to achieve maximum utility of the vehicle on the track. The Drivatar system then tweaks the AI controller layer to mimic the player's driving style.

Originally, Drivatars were trained on the hard drive of the player's console and based on pre-trained data from the developers. However, starting with Forza Motorsport 5, Drivatars were hosted on the cloud as part of the Xbox network, allowing them to be downloaded and used by other players. This change also enabled continuous and ongoing learning, adapting, and evolving after every race the player entered.

Drivatars are based on artificial neural networks, which are inspired by the human brain. Bayesian neural networks are used to apply Bayes theorem to the neural network, allowing the AI to make decisions based on probabilities influenced by the frequency of specific actions appearing in a given circumstance from the recorded training data.

The Drivatar system also takes into account various turn types on Forza racetracks, such as kink, constant radius, increasing radius, decreasing radius, hairpin, sweeper, right angle, dual apex, two types of chicane, mild bend, and hard corner. This information is used to update the Drivatars' trained model in the cloud, focusing on achieving the precision of the player's driving style and inferring similar behavior for different conditions.

The video also discusses the rewind feature, which negates the training of the Drivatar if the player botches a corner and uses the rewind feature. This prevents players from gaming the system and creating the perfect Drivatar by taking the same corner repeatedly.

Lastly, the video touches on the issue of rubber banding, a common tactic in racing games to tie the performance of AI racers to the player. Turn 10, the developers of Forza, have stated that Drivatars do not rubber band, but the cars do. If a player is too far behind, the game begins to manipulate the cars by slightly increasing the weight, scaling back the torque of the engine, or adjusting the friction of the tires.