Summary

This chapter discussed the interaction between the weapon-selection capability and the game engine, used to gather information and perform the weapon changes:

  • The weapons are modeled as symbols; their properties need to be learned or included into the AI.

  • The interfaces with the environment are extended to provide queries for spatial restriction.

  • Queries to the personal state and inventory are also provided, allowing the animat to determine health and weapons available.

  • Information about enemy damage is handled indirectly, thanks to callbacks and events sent by the environment.

  • All the interfaces were chosen to be compatible with the existing ones and are simple to use.

The next chapter provides a simple prototype for weapon selection using scripting facilities and a voting system.

Practical Demo

Sir Obvious is an animat that makes use of the interfaces defined in this chapter. It checks the inventory to find the weapons and corresponding ammo available and prints the result to a debug console. Health changes and the constriction of the terrain are also worthy of Sir Obvious's comments. The source and demo is available online at http://AiGameDev.com/.




AI Game Development. Synthetic Creatures with Learning and Reactive Behaviors
AI Game Development: Synthetic Creatures with Learning and Reactive Behaviors
ISBN: 1592730043
EAN: 2147483647
Year: 2003
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net