CLMASP: Coupling Large Language Models with Answer Set Programming for Robotic Task Planning

Xinrui Lin,Yangfan Wu,Huanyu Yang,Yu Zhang,Yanyong Zhang,Jianmin Ji
2024-06-05
Abstract:Large Language Models (LLMs) possess extensive foundational knowledge and moderate reasoning abilities, making them suitable for general task planning in open-world scenarios. However, it is challenging to ground a LLM-generated plan to be executable for the specified robot with certain restrictions. This paper introduces CLMASP, an approach that couples LLMs with Answer Set Programming (ASP) to overcome the limitations, where ASP is a non-monotonic logic programming formalism renowned for its capacity to represent and reason about a robot's action knowledge. CLMASP initiates with a LLM generating a basic skeleton plan, which is subsequently tailored to the specific scenario using a vector database. This plan is then refined by an ASP program with a robot's action knowledge, which integrates implementation details into the skeleton, grounding the LLM's abstract outputs in practical robot contexts. Our experiments conducted on the VirtualHome platform demonstrate CLMASP's efficacy. Compared to the baseline executable rate of under 2% with LLM approaches, CLMASP significantly improves this to over 90%.
Artificial Intelligence
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: how to transform the task plans generated by large - language models (LLMs) into specific action plans that can be executed by specific robots, while ensuring that these plans meet various constraints in the scenario. Specifically, although large - language models possess extensive basic knowledge and certain reasoning abilities and are suitable for general task planning in open - world scenarios, they face challenges when concretizing the generated plans into executable robot instructions. The main problems include: 1. **Complex - scene handling**: Putting a large amount of scene content into the limited context window of the language model will limit its ability to handle complex scenes. For example, in a home environment, the relationships between thousands of items cannot all be input into the language model, which makes it difficult for the model to handle complex environments. 2. **Constraint compliance**: Many constraints or preferences in the scenario may not be fully complied with by the language model. For example, details such as plugging in the power and then turning on the TV are crucial for the successful execution of the task, but the language model often ignores these checks. To solve these problems, the paper introduces the CLMASP method, which combines large - language models with Answer Set Programming (ASP) to overcome the above limitations. The main steps of CLMASP are as follows: - **Initial skeleton plan generation**: First, use a large - language model to generate a basic skeleton plan according to natural - language instructions. - **Vector database adjustment**: Adjust the skeleton plan through the vector database to adapt it to the specific scenario. - **ASP refinement**: Use the ASP program to further refine the skeleton plan, add the robot's action knowledge, and transform the abstract output into practical and feasible robot instructions. The experimental results show that the execution rate of CLMASP on the VirtualHome platform has increased from less than 2% to more than 90%, significantly improving the success rate of task plans.