Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Max, Yu, Chan-Hung, Lee, Wei-Hsu, Hung, Cheng-Wei, Chen, Yen-Chun, Sun, Shao-Hua
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916648810708992
author Liu, Max
Yu, Chan-Hung
Lee, Wei-Hsu
Hung, Cheng-Wei
Chen, Yen-Chun
Sun, Shao-Hua
author_facet Liu, Max
Yu, Chan-Hung
Lee, Wei-Hsu
Hung, Cheng-Wei
Chen, Yen-Chun
Sun, Shao-Hua
contents 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 improve the programs consistently. Experimental results in the Karel domain demonstrate our LLM-GS framework's superior effectiveness and efficiency. Extensive ablation studies further verify the critical role of our Pythonic-DSL strategy and Scheduled Hill Climbing algorithm. Moreover, we conduct experiments with two novel tasks, showing that LLM-GS enables users without programming skills and knowledge of the domain or DSL to describe the tasks in natural language to obtain performant programs.
format Preprint
id arxiv_https___arxiv_org_abs_2405_16450
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search
Liu, Max
Yu, Chan-Hung
Lee, Wei-Hsu
Hung, Cheng-Wei
Chen, Yen-Chun
Sun, Shao-Hua
Machine Learning
Artificial Intelligence
Programming Languages
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 improve the programs consistently. Experimental results in the Karel domain demonstrate our LLM-GS framework's superior effectiveness and efficiency. Extensive ablation studies further verify the critical role of our Pythonic-DSL strategy and Scheduled Hill Climbing algorithm. Moreover, we conduct experiments with two novel tasks, showing that LLM-GS enables users without programming skills and knowledge of the domain or DSL to describe the tasks in natural language to obtain performant programs.
title Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search
topic Machine Learning
Artificial Intelligence
Programming Languages
url https://arxiv.org/abs/2405.16450