Saturday, September 21, 2013

Week 7 : Planning

It was another busy week, which is why this post is coming late in the week. I wanted to talk about my graduate project, but before we delve deep into it I will use this post to describe what a Planner is.

My project is integrating a Planner into Unity. A Planner is an system that takes a set of axioms, operators and tasks to accomplish a goal. The result is a plan which consist of several actions that need to take place in order to accomplish the goal.

Traditionally game AI design focus on the state machine to control the AI agent's behavior. However state machines are fragile because they depend heavily on the game design. If the design changes, the state machine has to change which may result in some unpredictable behavior. It makes maintenance and code reuse very cumbersome for the AI programmer.

Planners on the other hand are different. The planner and the game engine will have a mapping from the planner's primitive tasks to actions in the game engine; such as 'go to object' or 'pick up object'. These actions can be reused in many products which permits code reuse. Similarly once a planner and game engine can communicate, the planner can use the game state for the axioms it needs to develop a plan which the game engine receives and executes. The only thing that needs to be re-coded is the operators for the plan.

Operators are the rules for forming the plan. Once the AI programmer has a working system they can focus on the Agent's behavior by changing the operators. If a new feature is requested the programmer simply considers what game state information is needed, if any, and works to incorporate the features into the planner's operators.

The greatest part about planners is the opportunity for unpredictable plans. Unlike the state machine where the agent must go through a series of steps to accomplish a goal, an agent's plan might deviate. This unpredictable behavior is more in keeping with human behavior, which makes the experience more enjoyable for the users.

Now you have the basics of planner technology, there are plenty of books on planners, I encourage you to read more on it if this is new to you. We will revisit this topic in later posts.

See you in Thirty Four Weeks.

AR

No comments:

Post a Comment