Welcome to my developer diary. My name is John Northan and I'm a programmer on Star Wars Battlefront at Pandemic Studios, specializing in game Artificial Intelligence (A.I.). My plan is to give you an insight into several challenging technical issues that we've worked on while developing Battlefront: Creating a massive battlefield sensation, encouraging emergent A.I. environment interaction, and developing distinct soldier behaviors, such as assault, scout, and repair.

One of the great sensations to come from watching the Star Wars movies are the massive battle sequences. We want the player to feel like they are in the midst of those battles, such as down on the surface of Hoth running amongst giant AT-ATs or taking a defensive position in the snow trenches. To achieve this, we need to simulate great numbers of soldiers, ground-based vehicles, and flyers.

In Battlefront's single-player experience, the majority of these entities need to be A.I. controlled. The A.I. for each entity is calculated at several different layers. At the highest level, the strategic A.I., examples of the types of critical decisions that need to be made are: Which command post to attack, which enemy to engage, which weapon is most appropriate, and whether to interrupt a current action because a thrown grenade has just been spotted. At the lower levels, the controller A.I., examples of the types of immediate decisions that need to be made are: How fast and in what direction to move, where to aim a weapon in order to hit a moving target, and whether to alter course in order to avoid a collision.



The technical difficulty in juggling all this strategic and control A.I. for a large number of soldiers and vehicles is that it must all be achieved with low CPU usage. For example, in Battlefront, we allow the A.I. about five to ten percent of CPU time. One of our solutions was to realize that high-level strategic decisions could be made much less frequently than the lower-level controls. Decisions, therefore, are made at differing time intervals, dependent upon their urgency. For example, when a soldier is running through a battlefield, he needs only to evaluate which command post to attack every few seconds, whereas he needs to make weapon aiming decisions continuously.

One of the leading-edge A.I. techniques in use in games at the moment is for characters to react to the environment intelligently. Examples of this are soldiers in combat seeking cover behind barriers or snipers hiding out on rooftops. This emergent behavior is achieved in Battlefront by the placement of hint nodes within the world. We have a variety of hint nodes that our level designers can populate the world with, such as "cover" nodes to designate strategic positions to fire on the enemy; "snipe" hints for concealed, long-range firing positions; and "minefield" hints for areas where mines could be laid. It is the emergent use of these hints that can give an A.I.-controlled soldier the appearance of intelligent environment use.

We have put much time during the development of Battlefront into distinct soldier behaviors. When running through a battlefield, it is possible to notice each behavior: there will be trooper soldiers directly engaging the enemy, sniper soldiers staying hidden at the periphery of the battle, assault soldiers attempting to outflank and destroy enemy vehicles, and repair soldiers busy healing the wounded. The trooper soldiers have the most variety of behavior. Upon spotting an enemy, they will select a method of attack, based upon factors such as weapon availability and enemy mobility. For example, a trooper soldier armed with just a pistol will try to get up close to a target, dodging and weaving, whereas a trooper armed with a long-range rifle will go prone, reducing the potential for shot error. Troopers will use cover hints to use natural environmental barriers to hide from the enemy. If a cover position is compromised the soldier will run for another barrier from which to take cover.