Skip to main content
Top
Published in: The Computer Games Journal 3/2017

25-07-2017

Behavior Trees for Modelling Artificial Intelligence in Games: A Tutorial

Authors: Ryan Marcotte, Howard J. Hamilton

Published in: The Computer Games Journal | Issue 3/2017

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

We provide a tutorial introduction to behavior trees, which are a useful way of structuring artificial intelligence in games. A behavior tree is a model of plan execution that is graphically represented as a tree. A node in a tree either encapsulates an action to be performed or acts as a control flow component that directs traversal over the tree. Behavior trees are appropriate for specifying the behavior of non-player characters and other entities because of their maintainability, scalability, reusability, and extensibility. We describe the main features of behavior trees, show an example of how to create a behavior tree, and briefly survey existing packages for editing behavior trees. We recommend that behavior trees be used when some game designers are not programmers, the conditions governing the behavior are complex, and the NPCs have aspects of behavior in common.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Appendix
Available only for authorised users
Literature
go back to reference Bates, J. (1994). The role of emotion in believable agents. Communications of the ACM, 37(7), 122–125.CrossRef Bates, J. (1994). The role of emotion in believable agents. Communications of the ACM, 37(7), 122–125.CrossRef
go back to reference Bohm, C., & Jacopini, G. (1966). Flow diagrams, turing machines and languages with only two formation rules. Communications of the ACM, 9(5), 366–371.CrossRefMATH Bohm, C., & Jacopini, G. (1966). Flow diagrams, turing machines and languages with only two formation rules. Communications of the ACM, 9(5), 366–371.CrossRefMATH
go back to reference Bungie Studios. (2004). Halo 2, video game, Xbox, Microsoft. Bungie Studios. (2004). Halo 2, video game, Xbox, Microsoft.
go back to reference Champandard, A. J. (2008). Getting started with decision making and control systems. In S. Rabin (Ed.), AI Game programming wisdom (Vol. 4, pp. 257–264). Boston: Charles River Media. Champandard, A. J. (2008). Getting started with decision making and control systems. In S. Rabin (Ed.), AI Game programming wisdom (Vol. 4, pp. 257–264). Boston: Charles River Media.
go back to reference Colledanchise, M., & Ogren, P. (2014). How behavior trees modularize robustness and safety in hybrid systems. IEEE/RSJ International Conference on Intelligent Robots and Systems (pp. 1482–1488). Chicago: IEEE. Colledanchise, M., & Ogren, P. (2014). How behavior trees modularize robustness and safety in hybrid systems. IEEE/RSJ International Conference on Intelligent Robots and Systems (pp. 1482–1488). Chicago: IEEE.
go back to reference Flórez-Puga, G., Gómez-Martín, M. A., Gómez-Martín, P. P., Díaz-Agudo, B., & González-Calero, P. A. (2009). Query-enabled behavior trees. IEEE Transactions on Computational Intelligence and AI in Games, 1(4), 298–308.CrossRef Flórez-Puga, G., Gómez-Martín, M. A., Gómez-Martín, P. P., Díaz-Agudo, B., & González-Calero, P. A. (2009). Query-enabled behavior trees. IEEE Transactions on Computational Intelligence and AI in Games, 1(4), 298–308.CrossRef
go back to reference Humphreys, T. (2014). Exploring HTN planners through example. In S. Rabin (Ed.), Game AI pro: Collected wisdom of game AI professionals (pp. 149–167). Boca Raton: CRC Press. Humphreys, T. (2014). Exploring HTN planners through example. In S. Rabin (Ed.), Game AI pro: Collected wisdom of game AI professionals (pp. 149–167). Boca Raton: CRC Press.
go back to reference Johansson, A., & Dell’Acqua, P. (2012). Emotional behavior trees. IEEE Conference on Computational Intelligence and Games (pp. 355-362). Granada, Spain: IEEE Xplore. Johansson, A., & Dell’Acqua, P. (2012). Emotional behavior trees. IEEE Conference on Computational Intelligence and Games (pp. 355-362). Granada, Spain: IEEE Xplore.
go back to reference Khoo, A. (2006). An Introduction to behaviour-based systems for games. In S. Rabin (Ed.), AI Game programming wisdom (Vol. 3, pp. 351–364). Boston: Charles River Media. Khoo, A. (2006). An Introduction to behaviour-based systems for games. In S. Rabin (Ed.), AI Game programming wisdom (Vol. 3, pp. 351–364). Boston: Charles River Media.
go back to reference Lim, C.-U., Baumgarten, R., & Colton, S. (2010). Evolving behaviour trees for the commercial game DEFCON. Applications of Evolutionary Computation (pp. 110–110). Lim, C.-U., Baumgarten, R., & Colton, S. (2010). Evolving behaviour trees for the commercial game DEFCON. Applications of Evolutionary Computation (pp. 110–110).
go back to reference Llopis, N. (2010). Game architecture. In S. Rabin (Ed.), Introduction to Game Development (pp. 235–270). Boston: Charles River Media. Llopis, N. (2010). Game architecture. In S. Rabin (Ed.), Introduction to Game Development (pp. 235–270). Boston: Charles River Media.
go back to reference Marcotte, R. (2017). Modelling artificial intelligence in games using MindSet behavior trees. Regina: Department of Computer Science, University of Regina. Marcotte, R. (2017). Modelling artificial intelligence in games using MindSet behavior trees. Regina: Department of Computer Science, University of Regina.
go back to reference Marzinotto, A., Colledanchise, M., Smith, C., & Ogren, P. (2014). Towards a unified behavior trees framework for robot control. IEEE International Conference on Robotics and Automation (pp. 5420–5427). Hong Kong: IEEE. Marzinotto, A., Colledanchise, M., Smith, C., & Ogren, P. (2014). Towards a unified behavior trees framework for robot control. IEEE International Conference on Robotics and Automation (pp. 5420–5427). Hong Kong: IEEE.
go back to reference Mateas, M. (2002). Interactive drama, art, and artificial intelligence. Technical report CMU-CS-02-206, Carnegie Mellon University, School of Computer Science, Pittsburgh. Mateas, M. (2002). Interactive drama, art, and artificial intelligence. Technical report CMU-CS-02-206, Carnegie Mellon University, School of Computer Science, Pittsburgh.
go back to reference Mateas, M., & Stern, A. (2005). Structuring Content in the Facade Interactive Drama Architecture. In Proceedings of Artificial Intelligence and Interactive Digital Entertainment (AIIDE 2005). Marina del Rey, CA. Mateas, M., & Stern, A. (2005). Structuring Content in the Facade Interactive Drama Architecture. In Proceedings of Artificial Intelligence and Interactive Digital Entertainment (AIIDE 2005). Marina del Rey, CA.
go back to reference Merrill, B. (2013). Building utility decisions into your existing behavior tree. In S. Rabin (Ed.), Game AI Pro (pp. 127–136). Boston: Charles River Media. Merrill, B. (2013). Building utility decisions into your existing behavior tree. In S. Rabin (Ed.), Game AI Pro (pp. 127–136). Boston: Charles River Media.
go back to reference Millington, I. (2009). Artificial intelligence for games (2nd ed.). San Francisco: Morgan Kaufmann. Millington, I. (2009). Artificial intelligence for games (2nd ed.). San Francisco: Morgan Kaufmann.
go back to reference Rabin, S. (2010). Artificial intelligence: Agents, architecture, and techniques. In S. Rabin (Ed.), Introduction to game development (2nd ed., pp. 521–557). Boston: Charles River Media. Rabin, S. (2010). Artificial intelligence: Agents, architecture, and techniques. In S. Rabin (Ed.), Introduction to game development (2nd ed., pp. 521–557). Boston: Charles River Media.
go back to reference Schenk, K., Lari, A., Church, M., Graves, E., Duncan, J., Miller, R., & Schaeffer, J. (2013). ScriptEase II: Platform independent story creation using high-level patterns. Proceedings of the Ninth AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (AIIDE) (pp. 170–176). Boston: AIIDE. Schenk, K., Lari, A., Church, M., Graves, E., Duncan, J., Miller, R., & Schaeffer, J. (2013). ScriptEase II: Platform independent story creation using high-level patterns. Proceedings of the Ninth AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (AIIDE) (pp. 170–176). Boston: AIIDE.
go back to reference Shoulson, A., Garcia, F., Jones, M., Mead, R., & Badler, N. (2011). Parameterizing behavior trees. Motion in Games, 2011, 144–155.CrossRef Shoulson, A., Garcia, F., Jones, M., Mead, R., & Badler, N. (2011). Parameterizing behavior trees. Motion in Games, 2011, 144–155.CrossRef
go back to reference Weiss, M. A. (2013). Data structures and algorithm analysis in C ++ (4th ed.). Upper Saddle River: Pearson. Weiss, M. A. (2013). Data structures and algorithm analysis in C ++ (4th ed.). Upper Saddle River: Pearson.
Metadata
Title
Behavior Trees for Modelling Artificial Intelligence in Games: A Tutorial
Authors
Ryan Marcotte
Howard J. Hamilton
Publication date
25-07-2017
Publisher
Springer New York
Published in
The Computer Games Journal / Issue 3/2017
Electronic ISSN: 2052-773X
DOI
https://doi.org/10.1007/s40869-017-0040-9

Other articles of this Issue 3/2017

The Computer Games Journal 3/2017 Go to the issue

Premium Partner