Researching Different AI Techniques - Finite-State Machine

For my Final Project module I have been asked to pick a subject I have studied over the past few years of University, that I have enjoyed and would like to improve my knowledge of.  For this I have selected to research into Artificial Intelligence (AI).  The reason for this, is during my second year of University I had to complete an AI module using Torcs which is "an open-source 3D car racing simulator" (En.wikipedia.org, 2018) using one of the methods we had learnt previously, these are;
  • Finite State Machines (FSM)
  • Steering Behaviours 
  • Behaviour Trees
Although there were different AI techniques we had learnt, we were instructed to pick one or more of these techniques and control a car around a track, I used a Behaviour Tree to control mine.  

To begin my research into AI I will be looking at Finite-State Machines (FSM) and how they can be applied to games.  A FSM as described by (Buckland, 2005) "is to decompose an object's behavior [sic] into easily manageable 'chunks' or states.".  Buckland then goes on to give an example of a Finite-State Machine using a light switch, which has two states, on and off.
FSMs have been used in multiple games in the past some examples are;
  • The ghosts in Pac-Man.
  • The bots in Quake
    • Even the weapons have mini FSMs built into the systems.
  • Sports games
    • Players have their own individual FSM
    • The teams also have a larger FSM to wrap the whole team up in
  • NPCs in many games such as Real Time Strategy (RTS) games
Although these are just some examples that Buckland uses in his book, Programming Game AI By Example, there are many more games that implement FSMs to control the AI in the game.  This is because they are very simple to implement and debug as the agents behaviour is broken down into many different states it can be fairly easy to find and pinpoint the issue, or to add in some extra transitions to a new state.

Although it is simple to add new states into an FSM at the beginning, they "can become very challenging to manage as they grow." (Champandard, A. J, 2007).  To manage this the programmer will have to maintain dividing up the responsibilities of states keeping them as generic as possible so the logic can be used elsewhere, however, this is not really possible as "states perform a very specific role inside a state machine" (Champandard, A. J, 2007)

FSMs seem like a very viable option for me to use to control the AI in my final project, however I will spend time looking into other techniques such as Hierarchical Finite-State Machine and Behaviour Trees.

Reference List
[1] Buckland, M. (2005). Programming Game AI by Example. Wordware Pub.
[2] Champandard, A. J (2007, September, b). On Finite-State Machines and Reusability. AiGameDev. [online] Available at http://aigamedev.com/open/article/fsm-reusable/ [Accessed 24 September 2018]
[3] En.wikipedia.org. (2018). TORCS. [online] Available at: https://en.wikipedia.org/wiki/TORCS [Accessed 24 September 2018].