Programming-by-Demonstration for Long-Horizon Robot Tasks
On the map: Offline RL and imitation learning from data → Robot learning from demonstration
Abstract (arXiv)
The goal of programmatic Learning from Demonstration (LfD) is to learn a policy in a programming language that can be used to control a robot's behavior from a set of user demonstrations. This paper presents a new programmatic LfD algorithm that targets long-horizon robot tasks which require synthesizing programs with complex control flow structures, including nested loops with multiple conditionals. Our proposed method first learns a program sketch that captures the target program's control flow and then completes this sketch using an LLM-guided search procedure that incorporates a novel technique for proving unrealizability of programming-by-demonstration problems. We have implemented our approach in a new tool called PROLEX and present the results of a comprehensive experimental evaluation on 120 benchmarks involving complex tasks and environments. We show that, given a 120 second time limit, PROLEX can find a program consistent with the demonstrations in 80% of the cases. Furthermore, for 81% of the tasks for which a solution is returned, PROLEX is able to find the ground truth program with just one demonstration. In comparison, CVC5, a syntax guided synthesis tool, is only able to solve 25% of the cases even when given the ground truth program sketch, and an LLM-based approach, GPT-Synth, is unable to solve any of the tasks due to the environment complexity.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Placed in Robot learning from demonstration, one of 13 directions in Offline RL and imitation learning from data. First posted on arXiv 4 May 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 4; 2026: 2.
9 papers.
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositoriescited by 15
- 2026RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repaircited by 5
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2026InterPReT: Interactive Policy Restructuring and Training Enable Effective Imitation Learning from Laypersonscited by 2
- 2024SYNAPSE: SYmbolic Neural-Aided Preference Synthesis Enginecited by 1
- 2024Transformer-XL for Long Sequence Tasks in Robotic Learning from Demonstrationcited by 1
- 2025Rational Inverse Reasoning: Few-Shot Imitation by Inferring Intent through Planningcited by 0
- 2026RepoRepair: Leveraging Code Documentation for Repository-Level Automated Program Repair1 Mar 2026
- 2026InterPReT: Interactive Policy Restructuring and Training Enable Effective Imitation Learning from Laypersons4 Feb 2026
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
- 2025Rational Inverse Reasoning: Few-Shot Imitation by Inferring Intent through Planning12 Aug 2025
- 2025Meta-RAG on Large Codebases Using Code Summarization4 Aug 2025
- 2025CSR-Bench: Benchmarking LLM Agents in Deployment of Computer Science Research Repositories10 Feb 2025
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul 2024
- 2024Transformer-XL for Long Sequence Tasks in Robotic Learning from Demonstration24 May 2024
- 2024SYNAPSE: SYmbolic Neural-Aided Preference Synthesis Engine25 Mar 2024
Similar, not cited
Close in wording, no citation either way
- 2023Auto-LfD: Towards Closing the Loop for Learning from Demonstrations
- 2023Learning from Few Demonstrations with Frame-Weighted Motion Generation
- 2023Enabling Robots to Identify Missing Steps in Robot Tasks for Guided Learning from Demonstration
- 2023Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-Thought
- 2018Learning Generalizable Robot Skills from Demonstrations in Cluttered Environments
- 2025Demonstration Sidetracks: Categorizing Systematic Non-Optimality in Human Demonstrations
- 2020Elaborating on Learned Demonstrations with Temporal Logic Specifications
- 2026Learning Compositional Symbolic Task Rules from Demonstrations with Inductive Logic Programming