You are on page 1of 7

PLANNING

Planning is basically a method for an agent to achieve its goal through acknowledgement of its current states and environment, actions available and its consequences, and its goal, and then generate a sequence of actions to reach the goal. A typical planner takes three inputs, first a description of the initial state of the world, second a description of the desired goal and finally a set of possible actions all encoded in a formal language such as STRIPS or PDDL. The planner produces a sequence of actions that lead from the initial state to a state meeting the goal. An alternative language for describing planning problems is that of hierarchical task networks, in which a set of tasks is given, and each task can be either realized by a primitive action or decomposed in a set of other tasks.

1.1

First Encounter Assault Recon (F.E.A.R.) Game

Monoliths F.E.A.R. was one of the first games to bring planning systems to the fore when it launched at the end of 2005 and it was instantly noticeable when seeing multiple characters on-screen acting uniquely and in some cases very humanly. Gone was the straightforward shooting and wandering around and in came an advanced force of enemies that would vault over obstacles, duck to avoid fire and kick during close combat. In simple terms, a planning system makes a gaming character work out what it has to do in order to fulfil an objective. Instead of having a series of rule-based behaviours in a state machine jostling for attention, it will have a set of goals or objectives, and the character has several choices of ways to achieve them, which depend on the current circumstances.

1.1.1 Three States

The common AI techniques applied to games are A* and Finite State Machines (FSMs). Most game use FSM to control character behaviour and A* to plan paths. F.E.A.R. also utilized these techniques, but in an unconventional ways. The character (Non-Player Character or NPC) in F.E.A.R. has only three states, and the actions sequence are planned
1

using A*. The point to apply these AI is meant to let the NPC act like in an action movie, giving a satisfying gameplay experience to the player.

In F.E.A.R. the three states are Goto, Animate, and UseSmartObject. UseSmartObject is an implementation detail of systems at Monolith and is really just a specialized data-driven version of the Animate state. Rather than explicitly telling it which animation to play, the animation is specified through a SmartObject in the game database. Considering UseSmartObject to be the same as Animate. So the two important states are Goto and Animate.

So the only difference between Goto and Animate is that Goto is playing an animation while heading towards some specific destination, while Animate just plays the animation, which may have a side effect of moving the character to some arbitrary position. The design philosophy in F.E.A.R. at Monolith is that the designers job is to create interesting spaces for combat, packed with opportunities for the A.I. to exploit and perceive the environment. For example, spaces filled with furniture for cover, glass windows to dive through, and multiple entries for flanking. Designers are not responsible for scripting the behavior of individuals, other than for story elements. This means that the A.I. need to autonomously use the environment to satisfy their goals. The A.I. will do nothing after being dropped into the game world eventhough the game has been started and he sees the player because the goal have not been set.

For better understanding the situation, lets assumed a goal set named GDC06 is created, which having two goals, Patrol and KillEnemy. When the GDC06 is applied on a soldier in the world, he will start firing his weapon at player when he sees the player or else he will be patrolling through a warehouse. However, when assigning the GDC06 to an assassin in the same world, the Patrol and KillEnemy actions are different from that of the soldier. At this instant, the assassin's Patrol means runs cloaked through the warehouse, jumps up and sticks to the wall and only comes down when he spots the player. The KillEnemy goal in this case would results in melee attack. The third illustration will assign GDC06 on a rat. The rat patrols on the ground but when it see the player, it never attempt to attack at all because in the set of actions of the rat, there are no actions that can be use to achieve KillEnemy goal. The rat simply drop its intention to achieve KillEnemy goal, and falls back to perform the lower priority Patrol goal. These illustrations showed how each character choose its action to achieve its goal.

Goals set for different characters

1.1.2 Three Benefits of Planning in F.E.A.R.

1.

Ability to decouple goals and actions to allow different types of characters to satisfy goals in different ways. Given a situation someone (NPC) is sitting down at a desk and doing some work. Only the Work goal knew that the A.I. was in a sitting posture, interacting wit the desk. Problem arises when the player shot the A.I., instead slumping naturally over the desk, he would finish his work, stand up, push in his chair and then fall to the floor. This was because there was no information sharing between goals, so each goal had to exit cleanly, and get the A.I. back into some default state where he could cleanly enter the next goal. Decoupling the goals and actions forces them to share information through some external working space. In a decoupled system, all goals and actions have access to information including whether the A.I. is sitting or standing, and interacting with a desk or some other object. This knowledge is taken into account when formulating a plan to satisfy the Death goal and slump over the desk as expected.

Conventional Problematic Goals in Black Boxes and Actions

F.E.A.R. Decoupled Goals

2.

Facilitation of layering simple behaviours to produce complex observable behaviour F.E.A.R basic soldier combat behavior can be categorized into 7 layers. The layers start with a basic layer, AI will fire their weapons when they spotted the player. Second, AI values their lives, they dodges when being aimed with a gun. Third, in close distance, AI use melee attacks instead of wasting bullets. Fourth, AI will take cover. Fifth, AI will blind firing when in cover. Sixth, AI will reposition when his current cover position is invalidated. Lastly, AI can communicate with other squad members. The conclusion of this is with a planning system; goals and actions can be added and deleted wherever and whenever as it is needless to manually specify the transitions between these behaviours because the A.I. will figure out the dependencies themselves at run-time based on the goal state and the preconditions and effects of actions.

Planning in F.E.A.R.

Chaotic Modelling, not in F.E.A.R.

Example Sequence Layers

3.

Empowering characters with dynamic problem solving abilities To put it in a simple way, the A.I. has the full freedom to do whatever it wants to achieve its goal. If an obstacle arises, it can record this knowledge in working memory and take it into consideration when re-planning to find alternative solutions to the goal. This means the player has no ways of knowing what they A.I. will do at a particular situation because with this knowledge, it tends to decide for itself.

Concluding all these, F.E.A.Rs planning system as Goal-Oriented Action Planning (GOAP) and it has cost per action feature that guides A* search toward the lowest cost sequence of actions to satisfy some goal. A* is really a general search algorithm that can be used to search for the shortest path through any graph of nodes connects by edges.

You might also like