|
Before we delve into the detail of the Drivatar system's model of line and speed, we first discuss a few general considerations regarding these aspects of racing game AI.
General Principles
The first task of any AI system for determining car behaviour is to specify the "racing line". That is, where should the car be on the track, and at what speed should it travel at that point? This specified line and speed data ideally should:
- Be fast and competitive, as and when required. The racing line should allow the car to complete races in the very best times realistically achievable, without the need to "cheat".
- Be realistically slow, as and when required. The line and speed combination should appear entirely realistic even when downgraded to simulate intermediate or novice opposition.
- Exhibit evidence of credible driver characteristics. e.g. the player may observe occasional, yet consistent, modest sliding of an AI car caused by it frequently braking too late when entering a corner.
- Be physically realisable (at least, approximately) by the car in conjunction with an appropriate control system. e.g. there should be no sudden right angle turns.
- Feature credible variety from lap to lap. Note that a car is distinct from a train, which does travel on fixed rails
.
Competitive Lines
For the most competitive racing, the lines specified for AI cars should flow through corners, and combinations thereof, in as straight and smooth a manner as possible while just clipping the apexes. The "target speeds" associated with those most competitive lines should also be as optimal as possible. On straights, the car should be looking to continuously accelerate as far as the approach of any oncoming corner. For corners, speeds should be specified such that the car will brake as late as is feasible such that it can reduce its speed to an appropriate level. By "appropriate", this implies that the car will corner at a speed such that it is on the very limit of its tyres' grip.
Realistic Balancing
For many (maybe most?) players, the best matched opposition will not be the fastest. Novice or intermediate players will enjoy the game much more if they are pitched against AI cars of similar simulated driving skill.
Slower AI driving can of course be naively simulated simply by reducing speeds proportionately along the entire track. However, this will usually look unrealistic — slowing cars down artificially on straights, for example, will generally significantly undermine the player's sense of realism. There are better ways to moderate AI cars' behaviour such that overall they post slower lap times yet still drive in a credible manner. Non-expert AI drivers should typically:
- Go flat out on a straight (unless a complete and utter novice perhaps)
- Corner tentatively, failing to approach the lateral traction limits of their car
- Mis-judge the braking point before entry to corners (both early and late)
- Delay hitting the accelerator on exiting from a corner
- Follow (often badly) sub-optimal racing lines, and in particular miss the apex at corners
- Drive with less consistency overall (see later)
Driver Characteristics
Careful specification of the line and speed information can help give the impression of credible driver characteristics of the individual AI drivers. As well as making the AI opponents more interesting to race, these same characteristics, of course, can be modulated by the AI system to vary the lap times to assist with the difficulty-balancing discussed in the previous section. Examples of characteristics that could be implemented, to a greater or lesser degree, are "tentative cornering", "late braking", "smooth steering", "aggressive acceleration" etc.
Physical Realisability
The specified line and speed should be such that the car is physically capable of following the line and attaining the speeds (at least approximately in both cases). So, there should be no unreasonably sharp corners, or changes in desired speed that imply the need to decelerate as if the car had driven into a brick wall.
Credible Variety
Last but not least ... how many real-world racing drivers follow the exact same path, to the millimetre, around a race track, lap after lap, race after race? The answer, as you of course know, is none. Yet playing a number of driving games, you'd be forgiven for thinking otherwise — sometimes the AI cars appear to drive as if upon fixed rails. Even worse, in some games, its not just the same car lap after lap, but all the cars follow this same single line.
AI drivers will look far more realistic if they exhibit a reasonable and consistent degree of variety in the lines (and speeds) that they follow around the track. This variety should ideally be visible both across the entire field of AI cars, as well as for individual cars from lap to lap (and race to race). More competitive drivers will, of course, be expected both to follow better lines and to be far more consistent in sticking to them lap after lap (i.e. with only modest variation), whereas a novice will follow a generally sub-optimal line to begin with, with much greater variation.
Clearly, then, this is another opportunity to contribute positively to a couple of the considerations discussed above. For example, "consistency" can be both a visible driver characteristic as well as a feature of the driver "skill" which is one determinant of the AI difficulty level.
Drivatar Models in Forza Motorsport
So that's probably enough general waffle — onwards to a few specifics on the implementation within the Forza Drivatar system.
|