system forms a chain of actions to solve a goal while FSMs are reactive and can only flip from state to state, they cannot plan out what states they will go to next in advance. The GOAP planning combined with the dynamic replanning could have helped in bringing about the GOAP dominance in the results.
Finally, the GOAP system threw up several surprises during testing. For example, when an agent is patrolling, it can only break out of its control pattern if it senses or sees an opposing agent. The agent would then proceed to attack the target and once finished, it should immediately go back and into its original patrol pattern. However, occasionally the agent would unexpectedly go and search for health or search for ammo or even a Domination point instead of going back patrolling as was expected of it. This along with other unexpected behaviour wasn’t directly coded into the GOAP system but occurred entirely through the planning process and provides another possible reason as to why the GOAP system out- performs FSMs.
So overall, the results of the experiments indicate that GOAP is the superior AI system and integrates better with the squad behaviour than the FSM system for the game scenario.
The next step when comparing the FSM and GOAP systems was based on the results from the technical experiments. Memory, CPU usage and average frames per second were recorded during the tests using VTune. The average percentage processor time used for the GOAP system was 33.62% while the average for the FSM was 35.44%, 1.82% of a difference. However the GOAP system had a minimum processor usage of 2.34% and a maximum of 98.44% while the FSM had a minimum of 0.05% and a maximum of 71.09%. The GOAP system approached 100% processor usage more often while the FSM was comfortably short of this limit. On occasion during the experiments the GOAP system would actually peak when several GOAP agents happened to plan at the same time (i.e. if a