AI Middleware: Getting into Character; Part 1 - BioGraphic Technologies' AI.implant; Dybsand (2003)

AI Middleware: Getting into Character; Part 2 - MASA's DirectIA; Dybsand (2003)

AI Middleware: Getting into Character; Part 3 - Criterion's Renderware AI 1.0; Dybsand (2003)

Type of Research: Commercial Game Development Software Reviews (Gamasutra)

Summary:
These are reviews of three “middleware” (i.e. turnkey third-party) products for AI for computer games.

AI.implant flow chart above.

Basically, AI.implant is designed to work with Maya or 3D Studio Max as a plug-in (you call it from inside Maya or 3DS). You fill in a number of fields—and voila—you’ve got an instant NPC (Non-Player Character).

In the example above the blue lines show a waypoint network (yes, you preprogram the waypoint so you don’t actually do any pathfinding).

Then you get to fill in some more fields:


and when you’re done you have an ‘autonomous agent’.

This product also comes with an SDK. You have to fire up the AI.implant module in your code and then you can call it like so:

aiSolver->AddSubSolver( new ACE_BehaviourSolver) ;

This is definitely a canned AI that is appropriate for D&D or RPG games. I don’t see how applicable it would be for RTS games.

The next product reviews is DirectIA. As the name implies it is an Intelligent Agent creation product. It is primarily script driven. An example of a ‘stimulus’ script and an ‘emotion’ script follows:

// Stimulus for greed. Activated by the perception of valuable objects.
//------------------------------------------------------------
// declare the stimulus with a unique name to identify it

stimulus SeeTreasure
{
          float rStimulusValue=0.0;

// a c callback function is called that will return the list of all objects
// in the game. There is also some built-in functions that could have been
// called to get a list of all entities from world which then would have been
// filtered to retrieve the 'object' entities. selection selObjects=c_GetObjects();
// The loop instruction in the DirectIA script language with ( y in selObjects)
{
// DirectIA is a strongly typed language, but allows dynamic conversion
// within a structure hierarchy to get the correct type of an object.
// A 'selection' is a collection of 'thing's and in this case 'y' is a thing

RealObject obj=y;

float rBoost;

// 'myself' is the reserved word for the ID of the agent. Here other
// script functions are called to see if the current object is of interest to
// the agent. The 'InSameRoom' is called due to game rules. The agent
// is only stimulated by object that are in the same room as him.

if( InSameRoom( myself, obj ) && CareAboutObject( obj, rBoost ) )

// If the object is of some value for the agent, boost the stimulus

rStimulusValue = rStimulusValue + c_Love( obj );

}

// Here the final value of the stimulus is set to the value just computed.

DIA_SetStimulusValue( SeeTreasure, rStimulusValue );
}

Code Fragment Copyright © MASA (Mathematiques Appliquees SA) 2002

// The emotion is declared with a unique name to identify it.
// This emotion will be used somewhere else in the engine to
// modify the strength of a behavior activation. The value of
// this emotion can be retrieved in the script by calling DIA_GetEmotion( greed ).

emotion greed
{

// Factor applied to the input stimulus
// (In this case, the input value is equal to the stimulus) stim_factor = 1;
// The surprise factor is used to simulate a boost when the emotion increase.
// here there is no surprise surprise_factor = 0;
// define the max increase and decrease rate of the value per time unit.
// Here the emotion can vary a lot quickly.

max_decrease_rate = 300;

max_increase_rate = 300;

// Used to simulate the adaptation of an agent to a stimulus
// (for example, an agent facing a treasure long enough will get
// used to seeing it, and will no longer feel any greed).
// Here there is no persistence habit_factor = 0;
// The name of the input stimulus used with this emotion used_stimulus = SeeTreasure;
// The state variable that is modified by the output of this emotion.
// Here we only use the output of the emotion as a direct value in
// another part of the script by calling DIA_GetEmotion( greed ).
// No state variable is influenced. modified_sv = {};

}
Code Fragment Copyright © MASA (Mathematiques Appliquees SA) 2002

As before, the module has to be fired up at the beginning of the code and then
called from the main game loop: DIA_Workspace::GetTime() to calculate when it should execute and then DIA_Engine::ExecuteAllActions().

The last AI package reviewed is Criterion’s Renderware AI. Basically, this product creates ‘entities’ which have predefined behaviors:

  • CGoToAgent - directs an NPC to a specific destination.
  • CFollowerAgent - enables an NPC to follow a specific entity, from a defined distance and at a defined bearing.
  • CFleeAgent - directs an NPC to move away from a set of locations and to stop when hidden from all of them.
  • CPathWayAgent - directs an NPC to follow a series of way points, that form a predetermined path.
  • CWanderAgent - enables an NPC to wander to random destinations.
  • CHideAgent - directs an NPC to hide out of sight, of specific entities.
  • CShooterAgent - enables an NPC to move into a firing position and shoot at a targeted enemy with the current weapon, based on line-of-sight and weapon ranges.
  • CAttackNNAgent - enables an NPC to fight a targeted enemy in melee combat, using predefined strategies.
  • CTestAgent - provides a testing and debugging agent tool to the game developer for use prior to any agent modification or development. Prices are not shown for any of the three products but I seem to recall that they are in 4-5 figures area.

All three products got good reviews and would probably be handy for any RPG type game. However, I certainly wouldn’t want to advertise that any of the NPCs so created would exhibit “intelligent behavior”.



Copyright© 2007 — D. Ezra Sidran — Scarab Industries

HTML version by: Ralph the Wizard - Wizard Information Technology Services, LLC