X hits on this document

PDF document

Enhanced NPC Behaviour using Goal Oriented Action Planning - page 59 / 110





59 / 110

4.2 Agent Architecture

The biggest obstacle encountered during the implementation of the agent’s architecture was during the development of the working memory. The working memory is a collection of facts whereby each fact is a piece of information that relates to the game world. It was originally designed to contain several different types of working memory fact: valid attack positions, cover positions, pickup data, enemy and friendly agent data, events and orders. The sensory manager populates the working memory with information it senses about the game world. It soon became apparent that the memory usage and cleanup of the working memory would become a problem. When attempting to record valid attacking or covering positions, every time a new valid cover or attack position was discovered a new working memory fact was created and was given a belief value. When an attack action was looking to find an attack position, it would query the working memory which would search through all the facts and return the position with the highest belief. However targets change often and agents move around the world quickly. Nodes that had high belief values when inserted weren’t so good only a couple of seconds later. So agents were being sent to locations that were good a short time previously (when the sensor was last updated) but weren’t ideal when being queried.

One solution explored was to update the sensors more regularly. Because there are so many path nodes in the game (256x256) updating too regularly caused excessive amounts of facts to be created and the cleanup effort alone was harming frame-rate. The other choice was to only allow the addition of a single memory fact every time the sensor was updated. However even with this too many facts were being created and the performance suffered. Hence, instead of using the working memory structure to record certain data, actions were allowed to directly query the navigation manager and other systems to find the best positions to attack, the best cover positions, closest pickup positions etc. Other information that didn’t


Document info
Document views168
Page views172
Page last viewedSun Oct 23 09:45:03 UTC 2016