X hits on this document

PDF document

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

326 views

0 shares

0 downloads

0 comments

37 / 110

setting and resetting world state symbols was included in the design so that world states could be changed and queried if necessary.

3.8.2 Agent action and goal sets

Different agents in the system can have different capabilities. Each type of agent has its own goal and action set which define what goals and actions the planner can use when planning. Rather than hard-code this into the application it was decided to keep this data external to the C++ code. XML was chosen as the means to represent what actions and goals an agent could have. An external XML file is processed using an open source plugin written in C++ called XPathParser that can read XML files and provides functions to parse them quickly and easily. When an agent is first created, this XML file determines which actions and goals can be allocated to it. A sample XML file for a basic agent is outlined below. The agent has a single goal in its goal set, Idle along with GoToCover, GoToAmmo, GoToHealth and Idle actions available in its action set.

<?xml versi <agent> <actions>

on="1.0" ?>

<action <action <action <action <action <action <action <action <action <action

typ typ typ typ typ typ typ typ typ typ

e="Attack">false</action> e="ChangeWeapon">false</action> e="GoTo">false</action> e="Patrol">false</action> e="Idle">true</action> e="Reload">false</action> e="GoToAmmo">true</action> e="GoToCover">true</action> e="GoToHealth">true</action> e="Dodge">false</action>

</actions> <goals> <goal type= <goal type= <goal type= <goal type= </goals> </agent>

"KillEnemy">false</goal> "Dodge">false</goal> "Idle">true</goal> "Patrol">false</goal>

29

Document info
Document views326
Page views330
Page last viewedSat Dec 10 02:30:29 UTC 2016
Pages110
Paragraphs700
Words23812

Comments