X hits on this document

PDF document

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

313 views

0 shares

0 downloads

0 comments

52 / 110

actions satisfies the goal conditions (i.e. there are no unsatisfied world state symbols) then the planning process has completed and the A* search is deemed to have finished.

3.10 The planners

Just like all the other parts in the A* system, there is a planner for both the navigation and the GOAP system. Each of the planners is a global singleton class that is shared across all the agents in the game. The role of the planner is to take in a goal (whether it be a GOAP goal or navigation target) and request the A* machine to run an A* search to satisfy that goal. Once the A* algorithm has completed successfully the planners obtain the current node that the A* machine breaks out at and this is added as the first step in the plan. The planner then proceeds to add every parent of the node until there are no more parents left to add which then completes the plan.

Each GOAP goal has a reference to the global GOAP planner and requests it to build a plan if asked to do so from the goal manager. The navigation manager has a reference to the navigation planner and it builds plans if a new navigation target is placed on the blackboard.

3.11GOAP Controller

The GOAP controller was designed to extend the base AI module. It is charged with updating the various subsystem managers, the agent’s world state and the GOAP system. Updating the agent’s world state is a case of setting world state symbols to be true or false depending on the contents of the blackboard. Updating the GOAP system simply updates to the goal manager. The updating of the subsystems involves calls to the sensory, target, weapons and navigation managers along with updating of the working memory. The GOAP

44

Document info
Document views313
Page views317
Page last viewedThu Dec 08 19:23:21 UTC 2016
Pages110
Paragraphs700
Words23812

Comments