Abstract
Behaviour Trees are control structures with many applications in computer science, including robotics, control systems, and computer games. They allow the specification of controllers from very broad behaviour definitions (close to the root of the tree) down to very specific technical implementations (near the leaves); this allows them to be understood and extended by both behaviour designers and technical programmers. This chapter describes the process of applying Grammatical Evolution (GE) to evolve Behaviour Trees for a real-time video-game: the Mario AI Benchmark. The results obtained show that these structures are quite amenable to artificial evolution using GE, and can provide a good balance between long-term (pathfinding) and short-term (reactiveness to hazards and power-ups) planning within the same structure.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The sum of absolute differences in Cartesian coordinates.
- 2.
This and all results reported in this chapter are averaged over 30 independent runs. Videos of the best controllers of some runs are available online (http://tinyurl.com/gebtMarioAI).
References
C. Ryan, J.J. Collins, M. O’Neill, Grammatical evolution: evolving programs for an arbitrary language, in EuroGP 98 (1998), pp. 83–96. Available: https://doi.org/10.1007/BFb0055930
J. Togelius, S. Karakovskiy, J. Koutnik, J. Schmidhuber, Super Mario evolution, in IEEE Symposium on Computational Intelligence and Games (2009), pp. 156–161
S. Karakovskiy, J. Togelius, The Mario AI benchmark and competitions. IEEE Trans. Comput. Intell. AI Games 4(1), 55–67 (2012)
M. Nicolau, D. Perez-Liebana, M. O’Neill, A. Brabazon, Evolutionary behavior tree approaches for navigating platform games. IEEE Trans. Comput. Intell. AI Games 9(3), 227–238 (2017)
R. Colvin, I. Hayes, A semantics for behavior trees. ARC Centre for Complex Systems (ACCS), Technical report ACCS-TR-07-01 (2007)
M. O’Neill, C. Ryan, Evolving multi-line compilable c programs, in Genetic Programming, 2nd European Workshop, EuroGP 99, Göteborg, May 26–27, 1999, Proceedings, ed. by R. Poli, P. Nordin, W.B. Langdon, T.C. Fogarty. Lecture Notes in Computer Science, vol. 1598 (Springer, Berlin, 1999), pp. 83–92. Available: https://doi.org/10.1007/3-540-48885-5_7
J. M. Swafford, M. O’Neill, M. Nicolau, A. Brabazon, Exploring grammatical modification with modules in grammatical evolution, in European Conference on Genetic Programming, EuroGP 2011, Torino, April 27–29, 2011, Proceedings, ed. by S. Silva, J.E. Foster, M. Nicolau, P. Machado, M. Giacobini. Lecture Notes in Computer Science, vol. 6621 (Springer, Berlin, 2011), pp. 310–321
E. Murphy, M. Nicolau, E. Hemberg, M. O’Neill, A. Brabazon, Differential gene expression with tree-adjunct grammars, in Parallel Problem Solving from Nature - PPSN XII, 12th International Conference, Taormina, September 1–5, 2012, Proceedings, ed. by C.A.C. Coello, V. Cutello, K. Deb, S. Forrest, G. Nicosia, M. Pavone. Lecture Notes in Computer Science, vol. 7491 (Springer, Berlin, 2012), pp. 377–386
E. Galván-López, D. Fagan, E. Murphy, J.M. Swafford, A. Agapitos, M. O’Neill, A. Brabazon, Comparing the performance of the evolvable PiGrammatical evolution genotype-phenotype map to grammatical evolution in the dynamic Ms. Pac-Man environment, in IEEE Congress on Evolutionary Computation (2010), pp. 1587–1594
R. Harper, Co-evolving Robocode tanks, in GECCO, Genetic and Evolutionary Computation Conference, ed. by N. Krasnogor et al. (ACM, New York, 2011), pp. 1443–1450
R. Harper, Evolving Robocode tanks for Evo Robocode. Genet. Program Evolvable Mach. 15(4), 403–431 (2014)
J.E. Murphy, M. O’Neill, H. Carr, Exploring grammatical evolution for horse gait optimisation, in EuroGP 2009, ed. by L. Vanneschi, S. Gustafson. Lecture Notes in Computer Science, vol. 5481 (Springer, Berlin, 2009), pp. 183–194
N. Shaker, M. Nicolau, G. Yannakakis, J. Togelius, M. O’Neill, Evolving levels for super mario bros using grammatical evolution, in IEEE Conference on Computation Intelligence and Games, CIG 2012, Granada, September 11–14, 2012, Proceedings (2012), pp. 304–311
N. Shaker, G.Y.J. Togelius, M. Nicolau, M. O’Neill, Evolving personalised content for super mario bros using grammatical evolution, in AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, AIIDE-12, 8th Conference, Stanford, October 8–12, 2012, Proceedings (AAAI, Palo Alto, 2012), pp. 75–80
S. Bojarski, C.B. Congdon, REALM: a rule-based evolutionary computation agent that learns to play Mario, in IEEE Conference on Computational Intelligence and Games (2010), pp. 83–90
E.R. Speed, Evolving a Mario agent using cuckoo search and softmax heuristics, in International IEEE Consumer Electronics Society’s Games Innovations Conference (ICE-GIC) (2010), pp. 1–7
N.C. Hou, N.S. Hong, C.K. On, J. Teo, Infinite Mario Bross AI using genetic algorithm, in IEEE Conference on Sustainable Utilization and Development in Engineering and Technology (STUDENT) (2011), pp. 85–89
A.M. Mora, J.J. Merelo, P. GarcÃa-Sánchez, P.A. Castillo, M.S. RodrÃguez-Domingo, R.M. Hidalgo-Bermúdez, Creating autonomous agents for playing super Mario bros game by means of evolutionary finite state machines. Evol. Intell. 6(4), 205–218 (2014)
J.-J. Tsay, C.-C. Chen, J.-J. Hsu, Evolving intelligent Mario controller by reinforcement learning, in International Conference on Technologies and Applications of Artificial Intelligence (TAAI) (2004), pp. 266–272
H. Handa, Dimensionality reduction of scene and enemy information in Mario, in IEEE Congress on Evolutionary Computation (2011), pp. 1515–1520
E.J. Jacobsen, R. Greve, J. Togelius, Monte Mario: platforming with MCTS, in GECCO, Genetic and Evolutionary Computation Conference (2014), pp. 293–300
J. Liu, J. Togelius, D. Perez-Liebana, S.M. Lucas, Evolving game skill-depth using general video game ai agents, in IEEE Conference on Evolutionary Computation (2017)
K. Kunanusont, R.D. Gaina, J. Liu, D. Perez-Liebana, S.M. Lucas, The N-tuple bandit evolutionary algorithm for automatic game improvement, in IEEE Conference on Evolutionary Computation (2017)
A. Champandard, M. Dawe, D.H. Cerpa, Behavior trees: three ways of cultivating strong AI, in Game Developers Conference. Audio Lecture (2010)
D. Isla, Managing complexity in the Halo 2 AI system, in Game Developers Conference (2005)
L. McHugh, Three approaches to behavior tree AI, in Game Developers Conference (2007)
M. Mateas, A. Stern, Managing intermixing behavior hierarchies, in Game Developers Conference (2004)
C.-U. Lim, R. Baumgarten, S. Colton, Evolving behaviour trees for the commercial game DEFCON, in EvoApplications 2010, vol. 6024 (Springer, Berlin, 2010), pp. 100–110
J.R. Koza, Genetic Programming: On the Programming of Computers by Means of Natural Selection (Complex Adaptive Systems), 1st edn. (A Bradford Book, London, 1992)
A. Klöckner, Behavior trees for UAV mission management, in INFORMATIK 2013: informatik angepasst an Mensch, Organisation und Umwelt (2013), pp. 57–68
M. Colledanchise, P. Ögren, How behavior trees modularize hybrid control systems and generalize sequential behavior compositions, the subsumption architecture, and decision trees. IEEE Trans. Robot. 33(2), 372–389 (2017)
I. Millington, J. Funge, Artificial Intelligence for Games (CRC Press, London, 2016)
M. Nicolau, Automatic grammar complexity reduction in grammatical evolution, in GECCO, Genetic and Evolutionary Computation Conference Workshops (2004)
R. Harper, GE, Explosive grammars and the lasting legacy of bad initialisation, in IEEE Congress on Evolutionary Computation (2010), pp. 2602–2609
N.J. Nilsson, Artificial Intelligence, A New Synthesis (Morgan Kaufmann Publishers, San Francisco, 1998)
A. Champandard, Behavior trees for Next-Gen game AI, in Game Developers Conference. Audio Lecture (2007)
M. Nicolau, I. Dempsey, Introducing grammar based extensions for grammatical evolution, in IEEE Congress on Evolutionary Computation (2006), pp. 2663–2670
M. Nicolau, D. Costelloe, Using grammatical evolution to parameterise interactive 3D image generation, in EvoApplications 2011. Lecture Notes in Computer Science, vol. 6625 (Springer, Berlin, 2011), pp. 374–383
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix: Actions, Conditions, Filters and Sub-trees for Mario
Appendix: Actions, Conditions, Filters and Sub-trees for Mario
This section contains tables with the actions, conditions, filters and sub-trees used by the approaches described in this chapter to evolve Behaviour Trees. Note that some actions and conditions can be analogous in both the controllers with and without A* (i.e. IsBreakableUp vs. UnderBrick); they are, however, different: while the A* version checks the nodes in the graph, the no-A* implementation needs to analyse the contents of each cell. Also, note that actions use the terms left and right, which imply movement, while conditions use ahead (for right) and back (for left). Entries marked with a †denote sub-trees that have an analogous left (or back) variant (Tables 4 and 5).
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Perez-Liebana, D., Nicolau, M. (2018). Evolving Behaviour Tree Structures Using Grammatical Evolution. In: Ryan, C., O'Neill, M., Collins, J. (eds) Handbook of Grammatical Evolution. Springer, Cham. https://doi.org/10.1007/978-3-319-78717-6_18
Download citation
DOI: https://doi.org/10.1007/978-3-319-78717-6_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-78716-9
Online ISBN: 978-3-319-78717-6
eBook Packages: Computer ScienceComputer Science (R0)