Wednesday 19 November 2008

Notes from the Paper "Interaction With Groups Of Autonomous Characters" by Craig Reynolds

For my project I am going to have to find the best method that will allow the construction of a large group of autonomous agents which will be able to respond to the users interaction while maintaining a decent frame rate. The agents will need some sort of mental model that will allow them to actively select which behavioural goal they should be after, and control the agents steering.

Intro

Our world is a very active and populated place. Therefore why aren’t games. Games in contrast are usually very static or desolated. (With the exception of a few). Normally only a few agents move autonomously and a few areas on the game environment move in predefined cycles. My project will have agents that will be able to react to and coordinated their movements in respect to not only each other, but to the environment and the player as well.

Three key concepts will be looked at.

  1. Behavioural Models: The programs that serve as the brains of the character.
  2. Spatial data structures: used to calculate locality queries to help with performance.
  3. The techniques used to drive the movement from the behavioural models.

Related Work

Generally, most games employ some sort of autonomous characters. Any or all in game agents that are not directly influenced by the player must have some sort of autonomy associated to them. The historical trend has been for autonomous agents to just follow pre-built scripts and very little to no ability to react to a dynamic environment, going towards agents that have to level of reactive ability and then toward agents that have the ability to learn. Many games are now looking to be able to create autonomous characters that can react and respond to the user.

Behavioural Models

Autonomous agents rely and need some sort of behavioural model/ controlling program to drive them. In the game environment, objects can fall under several categories; static, player controlled, periodic/running a pre-defined animation or they can have a degree of autonomy. Autonomous agents are driven by a controlling program which makes use of a behavioural model. The agents behaviours and actions are mapped to the environment by the controlling program. The agent has two environments. The external environment – the game universe that it resides in – and the internal environment – it’s memory or other mental/ cognitive processes. The level of autonomy that an agent has can vary widely.

A very simple representation for the physical representation of the agent can be used. A simple point mass that has a velocity and a local frame of reference. The local system can be updated every frame, making sure the mass and velocity are always aligned correctly. A finite steering force could be applied to move the agent and the velocity can be capped to represent appropriate levels of friction or drag.

“The position, velocity, orientation and visual appearance of the character is driven by the behavioural model, primarily through control of the steering force”

An autonomous agent should have multiple yet distinct behavioural states. There should be an active control in each state and take appropriate actions based on it’s perception of it’s own local and immediate environment. However, this will be tempered by its currently active behavioural states. Eg, a jet low on fuel take different responses when patrolling than when in a dogfight. Changes in an agents states are triggered by internal and external environmental conditions. Eg spotting an enemy changes you from wander to engage.

Panic within startled agents could be made to be contagious, so a normally calm agent would run away if several of it’s neighbours begin to run off. The urge to go wander away could also be contagious, so each agent would be sensitive to the percentage and amount of other agents that have wandered off. When a panicked agent runs, it will run a small distance before returning to it’s original spot (unless it’s being chased). An annoyance value could be present for each time an agent gets the panicked, the higher the value, the further the agent runs. It would then decay when it is calm.

Reacting to the User

The autonomous agents should be able to react to the user in two different ways – discrete and continuous. The agents may want to keep their distance from the player, simply moving out the way when the player is far away and slowly moving toward the agent, compared to the player being close and moving fast, then the agent will run off.

No comments: