One new approach to NPC AI is the field of AI planning. AI Planning involves monitoring the current state of an NPC and planning out in advance what actions it is going to perform in order to reach a particular goal. The AI planning process is somewhat similar to the way in which humans reason when looking to satisfy a goal or task. Suppose a human wishes to satisfy their thirst. They know that to satisfy this desire they require a drink. To get a drink the human could first go to the fridge. If the human knows there is nothing to drink in the fridge they can go to the shop and buy a drink. Once the drink has been obtained then the human must open the drink and drink it. So the human would subconsciously build two plans of action, the first to go to the fridge, open the drink and drink it. The second would be to go to the shop, buy the drink, open the drink and drink it. AI Planning takes a similar approach. If an NPC has a goal, ‘KillEnemy’ for example, it has a collection of actions available that it can execute. The KillEnemy goal can be satisfied by shooting at a target but its weapon first needs to be loaded. If the weapon isn’t loaded, the NPC can reload. If there is no more ammunition the NPC must either change weapons or find ammunition somewhere. Finally, once the NPC has a loaded weapon it can fire. So depending on the state of the world and the NPC’s goal, the AI planning process chains actions together (e.g. GoToAmmo->Reload->Fire) in the correct combination in order to satisfy their goals.
Goal oriented action planning (GOAP) is a type of AI planning that is beginning to gain more support within the games industry. It is based on the STRIPS (Stanford Research Institute Problem Solver) language which is a planner made up of goals and operators. The planner finds solutions to STRIPS goals by combining actions in sequence and executing them one by one.
The task of this dissertation was to investigate, analyse and develop both a GOAP and a FSM system. These two systems are then to be tested against one another in a game scenario to evaluate the relative merits and drawbacks of the two systems and satisfactorily answer the research question.