Finite state machines (FSMs) are widely used to manage robot behavior logic, particularly in real-world applications that require a high degree of reliability and structure. However, traditional manual FSM design and modification processes can be time-consuming and error-prone. We propose that large language models (LLMs) can assist developers in editing FSM code for real-world robotic use cases. LLMs, with their ability to use context and process natural language, offer a solution for FSM modification with high correctness, allowing developers to update complex control logic through natural language instructions. Our approach leverages few-shot prompting and language-guided code generation to reduce the amount of time it takes to edit an FSM. To validate this approach, we evaluate it on a real-world robotics dataset, demonstrating its effectiveness in practical scenarios.
翻译:有限状态机(FSM)被广泛用于管理机器人行为逻辑,尤其是在需要高度可靠性和结构化的实际应用中。然而,传统的手动FSM设计与修改过程往往耗时且容易出错。我们提出,大型语言模型(LLM)能够辅助开发者为实际机器人应用场景编辑FSM代码。LLM凭借其利用上下文和处理自然语言的能力,为FSM修改提供了一种高正确率的解决方案,使开发者能够通过自然语言指令更新复杂的控制逻辑。我们的方法利用少样本提示和语言引导的代码生成,以减少编辑FSM所需的时间。为验证该方法,我们在一个真实机器人数据集上进行了评估,证明了其在实践场景中的有效性。