Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search
<|reference_start|>Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search: Programmatic reinforcement learning (PRL) has been explored for representing policies through programs as a means to achieve interpretability and generalization. Despite promising outcomes, current state-of-the-art PRL methods are hindered by sample inefficiency, necessitating tens of millions of program-environment interactions. To tackle this challenge, we introduce a novel LLM-guided search framework (LLM-GS). Our key insight is to leverage the programming expertise and common sense reasoning of LLMs to enhance the efficiency of assumption-free, random-guessing search methods. We address the challenge of LLMs' inability to generate precise and grammatically correct programs in domain-specific languages (DSLs) by proposing a Pythonic-DSL strategy - an LLM is instructed to initially generate Python codes and then convert them into DSL programs. To further optimize the LLM-generated programs, we develop a search algorithm named Scheduled Hill Climbing, designed to efficiently explore the programmatic search space to consistently improve the programs. Experimental results in the Karel domain demonstrate the superior effectiveness and efficiency of our LLM-GS framework. Extensive ablation studies further verify the critical role of our Pythonic-DSL strategy and Scheduled Hill Climbing algorithm.<|reference_end|>
@article{liu2024synthesizing,
    title={Synthesizing Programmatic Reinforcement Learning Policies with Large
  Language Model Guided Search},
    author={Max Liu, Chan-Hung Yu, Wei-Hsu Lee, Cheng-Wei Hung, Yen-Chun Chen,
  Shao-Hua Sun},
    journal={arXiv preprint arXiv:2405.16450},
    year={2024},
    archivePrefix={arXiv},
    eprint={2405.16450},
    primaryClass={cs.LG cs.AI cs.PL}
}