Code-BT: A Code-Driven Approach to Behavior Tree Generation for Robot Tasks Planning with Large Language Models
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 8814-8822.
https://doi.org/10.24963/ijcai.2025/980
Keywords
- Natural Language Processing: NLP: Applications
- Robotics: ROB: Behavior and control
- Planning and Scheduling: PS: Robot planning
- Natural Language Processing: NLP: Language generation
Abstract
Behavior trees(BTs) provide a systematic and structured control architecture extensively employed in game AI and robotic behavior control, owing to their modularity, reactivity, and reusability. Nonetheless, manual BTs design requires significant expertise and becomes inefficient as task complexity increases. Recent automation technologies have avoided manual work, but often have high application barriers and face challenges in adapting to new tasks, making it difficult to easily configure them to specific requirements. Code-BT introduces a novel approach that utilizes large language models(LLMs) to automatically generate BTs, representing the task planning process as the process of coding and organizing sequences. By retrieving control flow information from the generated code, BTs can be efficiently constructed to address the complexity and diversity of task planning challenges. Rather than relying on manual design, Code-BT uses task instructions to guide the selection of relevant APIs, and then systematically assembles these APIs into modular code to align with the BTs structure. Finally, action sequences and control logic are extracted from the generated code to construct the BTs. Our approach not only ensures the automation of BTs generation but also guarantees the scalability and adaptability for long-term tasks. Experimental results demonstrate that Code-BT substantially improves LLM performance in BTs generation, achieving improvements ranging from16.67% to 29.17%.
@inproceedings{ijcai2025p980,
title = {Code-BT: A Code-Driven Approach to Behavior Tree Generation for Robot Tasks Planning with Large Language Models},
author = {Zhang, Siyang and Li, Bin and Qi, Jingtao and Wang, Xueying and Li, Fu and Wang, Jianan and Zhu, En and Sun, Jinjing},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {8814--8822},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/980},
url = {https://doi.org/10.24963/ijcai.2025/980},
}
TY - CPAPER TI - Code-BT: A Code-Driven Approach to Behavior Tree Generation for Robot Tasks Planning with Large Language Models AU - Zhang, Siyang AU - Li, Bin AU - Qi, Jingtao AU - Wang, Xueying AU - Li, Fu AU - Wang, Jianan AU - Zhu, En AU - Sun, Jinjing T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 8814 EP - 8822 DO - 10.24963/ijcai.2025/980 UR - https://doi.org/10.24963/ijcai.2025/980 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: