X hits on this document

PDF document

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

265 views

0 shares

0 downloads

0 comments

31 / 110

The working memory is a collection of working memory facts. Each fact was designed to have a fact type, an ID and several other optional values such as belief, owner ID, target ID, position, distance, radius, direction etc. In all there were six different types of facts designed: Enemy, Friendly, PickupInfo, Event, Order and NodeType.

A fact’s belief (or confidence) can represent the agent’s belief that something exists in the virtual world. For example, if an enemy target is in the agent’s field of view then a working memory fact of type Enemy would be created and set to have a belief of 1. If the enemy was obstructed or not seen in some time the belief of the fact would be lower. The target manager chooses the enemy fact with the highest belief as its current target.

The working memory also provides a querying facility whereby a working memory fact can be sent in as a query and used to check if any facts match it. Associated with each fact is a standard template library bitset that indicates which of the working memory fact attributes have been set. When two facts are being compared, the first step is to test each fact’s bitset. If this passes then the query’s attribute values are tested against each of the existing working memory facts’ attribute values. Also designed within the working memory was a facility to count the number of fact types and find facts with the highest belief for a given fact type.

3.5 Blackboard

Each agent in the game has a blackboard which serves as a public scratch-pad for all the various subsystems in the game. As suggested by Orkin (Orkin, 2003), the blackboard was designed to be simply a list of getters and setters for the different subsystems. For example, there is a list of getters and setters for the agent’s navigation such as setting a new navigation location, setting the speed of movement and the status of the navigation. There are also getters and setters for targeting, following of agents, weapons, planning and agent’s

23

Document info
Document views265
Page views269
Page last viewedSun Dec 04 10:36:55 UTC 2016
Pages110
Paragraphs700
Words23812

Comments