Share on Facebook Tweet on Twitter Share on LinkedIn Share by email
Drivatar™ Theory

Drivatar™ technology is at the heart of all the computer opponents in Forza Motorsport, and is the basis for the novel "Train Drivatar" feature in the game.


The development of the Drivatar AI system is broken down into three main sub-tasks:

    • Path, or racing line, specification for a car (which includes speed information too)
    • Car control, or keeping the car on the specified path
    • Racing strategy: overtaking, blocking, pitting etc

In order to obtain a given car behaviour, the first thing we do is specify a desired line and speed for the car to follow around the track (or through the streets etc), assuming that there are no other vehicles or obstructions present. For convenience, let us call this the "racing line" on the "track" for now.

Given this information, we could then simply place the car on the track in the desired position in the world, frame by frame. However, this tends to look very unsatisfactory, as it is clear to the player that the AI car is driving in a highly unrealistic manner, and from a competitive viewpoint, is unfairly not subject to the same laws of physics as the player. Realism is something we are very concerend about in the development of the Drivatar AI.

Thus, the racing line data is fed to a "controller" which will attempt to actuate the AI car's steering, accelerator and braking systems in a manner analogous to the way a player might. This control information is then fed into the games physics simulation engine which does the rest. This solution clearly provides the best gameplay, but there is a big problem: controller design is really tough. Because of this, in the end most implementations understandably "cheat" in one way or another. We do not do this in Drivatars - the racing line you see a car taking in this system is the result of the application of the physics engine to the inputs provided by the controllers of the Drivatar system.

Unfortunately, a "racing line" assumes that there is no external factors dictating the choice of path for the vehicle. However, during a race this is often not the case - for the majority of the time there are other cars to block or overtake. In order to implement such "interaction" strategies, a separate subsystem is added to post-process the racing line where required.

The diagram below is a relatively simplistic decomposition of the Drivatar AI system, and illustrates how the above sub-systems might be combined. In addition to these general racing AI components, we have also shown how the Drivatar's novel in-game learning system is integrated into the system as a whole. 

More Details

We have given numerous talks about the Drivatar system in public and for those of you who would like to know all the nitty-gritty details (including a live demonstration) we would like to point you to this recent recording of a talk on Drivatars at the UK Student Day 2008.

External Resources

A lot of the work on the Drivatar artificial intelligence (AI) system the was done by Michael Tipping and Mark Hatton. Mike and Mark have founded a new company, Vector Anomaly, and are hosting a more detailed description of the algorithm on their games lab pages.

In the following pages you will find a mixture of general thoughts on racing game AI, further details of the Drivatar AI system and some nuggets of information regarding its implementation in Forza Motorsport. Simply follow the links below to find out more: