JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section


With regards to finite-state machines in game AI development, there are some observations to point out.


Finite-state machines are so incredibly simple. They're easy to implement, visualize, design, debug, and work with in pretty much any other stage of the development pipeline.

Their theory is extremely well understood. We have formal definitions of finite-state machines, which can be optimized and manipulated by various algorithms. It's also clear that finite-state machines can deal with regular languages only.

Finite-state machines have been proven to work well with computer games, and are in fact one of the most popular AI techniques. This is because of the fact that they can be used for control, and almost anyone can create them.


The pitfalls of finite-state machines seem insignificant compared to avalanche of benefits, although there are quite a few:

  • Designing finite-state machines can get very complex when building large machines.

  • They are computationally limited to certain problems.

  • Finite-state machines are not suited to many simple tasks, such as counting.

  • The design of finite-state machines is frozen at runtime.

  • There can be problems dealing with procedural control.

  • The output of finite-state machines is very predictable, and not necessarily suited to creating behaviors.

The disadvantages of finite-state machines can be easily taken into account during the design (and selection of the right solution), so these issues have not affected finite-state machines as the most popular game AI technique.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor