Skip to content

dgerod/behavior_tree_learning

Repository files navigation

Learning Behavior Trees using Genetic Programming

This repository contains an implementation of a Genetic Programming (GP) algorithm that evolves Behavior Trees (BTs) to solve different tasks.

This repository is based on:

References:

  • Towards Blended Reactive Planning and Acting using Behavior Trees. Colledanchise, Michele & Almeida, Diogo & Ogren, Petter. ICRA-2019, May 2019. DOI:10.1109/ICRA.2019.8794128. PDF
  • A Survey of Behavior Trees in Robotics and AI. Iovino, Matteo & Scukins, Edvards & Styrud, Jonathan & Ogren, Petter & Smith, Christian. May 2020. PDF
  • Behavior Trees in Robotics and AI: An Introduction. Colledanchise, Michele & Ogren, Petter. June 2020. PDF
  • Genetic Programming. Accessed on December 22, 2021. Web
  • A Field Guide to Genetic Programming. Poli, Riccardo & Langdon, William & Mcphee, Nicholas. 2008. ISBN 978-1-4092-0073-4.
  • Learning Behavior Trees with Genetic Programming in Unpredictable Environments. Iovino, Matteo & Styrud, Jonathan & Falco, Pietro & Smith, Christian. ICRA 2021, May 2021. DOI:10.1109/ICRA48506.2021.9562088. PDF
  • Combining Planning and Learning of Behavior Trees for Robotic Assembly. Styrud, Jonathan & Iovino, Matteo & Norrlöf, Mikael & Björkman, Mårten & Smith, Christian. March 2021. PDF

Other references:

  • Combining Context Awareness and Planning to Learn Behavior Trees from Demonstration. Gustavsson, Oscar & Iovino, Matteo & Styrud, Jonathan & Smith, Christian. September 2021. PDF
  • Integrating Reinforcement Learning into Behavior Trees by Hierarchical Composition. Kartašev, Mart. In Degree Project Computer Sciene and Engineering, KTH, Stockholm (Sweden) 2019. PDF
  • Learning Behavior Trees From Demonstration. French, Kevin & Wu, Shiyu & Pan, Tianyang & Zhou, Zheming & Jenkins, Odest Chadwicke. ICRA-2019, May 2019. IEEE

Installation

After cloning the repository, run the following command to install the correct dependencies:

pip3 install -r requirements.txt

To check the package is working well you should execute all the tests. So, move to the test directory of the package and execute them:

cd %PACKAGE_DIRECTORY%/src/behavior_tree_learning/tests
python -m unittest discover -s . -p 'test_*.py'

Examples

Execute an existing behavior tree stored in "bt_collection.py":

cd %PACKAGE_DIRECTORY%/examples/duplo
python ./run_execute_bt.py

Learn a behavior tree using genetic programming:

cd %PACKAGE_DIRECTORY%/examples/duplo
python ./run_learn_bt.py

Releases

No releases published

Packages

No packages published