X hits on this document

PDF document

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





46 / 110

A* node to a path node or GOAP action. There are two other types of nodes used in the A* search which extend the generic A* node, the AStarPlannerNode and AStarNavNode. The AStarPlannerNode contains two extra pieces of data over the regular A* nodes, the current and goal world states. The GOAP planner must keep track of current and goal world states upon applying actions when planning (see figure 7) and so these are stored alongside the A* nodes so that they can be revisited at a later stage if necessary. The AStarNavNode contains a reference to the node ID of a path node. The two types of A* map are called the AStarMapNavigation and AStarMapPlanner. Whenever the A* algorithm requests for a node to be created it sends in an ID into the A* map which creates a new node. The AStarMapPlanner creates an AStarPlannerNode while the AStarMapNavigation creates an AStarNavNode.

3.9.2 A* Storage

The A* storage maintains two linked lists of A* nodes, the open and closed list. The open list is sorted in ascending order according to the A* nodes actual (or f) values. Searching of the open and closed list for nodes with specific IDs was included as it was needed during the A* search.

3.9.3 A* Map

The A* map is used to determine how the generic A* nodes map to the GOAP actions and the path nodes. Another function of the A* map is to calculate and return what the neighbours of a specific node are.

When an action is created by the action container, the action is given a unique ID. During a planning A* search, each A* node’s ID relates to an action ID. When the A* map is


Document info
Document views427
Page views431
Page last viewedMon Jan 23 21:46:21 UTC 2017