Goal-Guided Efficient Exploration via Large Language Model in Reinforcement Learning

Yajie Qi, Wei Wei, Lin Li, Lijun Zhang, Zhidong Gao, Da Wang, Huizhong Song · Submission to ICLR 2026 · Withdrawn

TL;DR

Large Language Models (LLMs) can give reinforcement learning (RL) agents common-sense guidance in open-world games, but querying them step-by-step is painfully slow and expensive. Structured Goal-guided Reinforcement Learning (SGRL) solves this by having an LLM generate a reusable, prioritized Python goal-selection program and an adaptive action-pruning mask, enabling an agent to unlock deep, complex achievements (like mining diamonds) with orders-of-magnitude faster training than prior LLM-guided baselines.

What Problem Does This Paper Address?

Open-world environments (such as Crafter or Minecraft) feature vast state spaces, sparse rewards, and intricate technology trees where deep achievements require long chains of prerequisites. Standard model-free RL algorithms (like PPO) struggle with exploration, often getting stuck on simple, immediate tasks.

Recent methods use LLMs to supply high-level semantic subgoals (e.g., ELLM, AdaRefiner). However, these methods suffer from two critical pain points:

  1. Extreme computational overhead: They repeatedly query large models online (e.g., every few hundred environment steps), grinding training speeds down to a crawl.
  2. Short-sighted guidance and semantic mismatch: Flat subgoal prompting often fails to plan across deep dependency chains or bridge the gap between high-level text instructions and low-level action execution.

Methods

SGRL introduces a modular framework that combines structured code generation with goal-conditioned policy execution:

[ Text Observations ] ──► [ Structured Goal Planner (Python Code) ] ──► Candidate Goals & Weights
                                    │
                                    ▼
[ Action Pruning Bank ] ──► [ Goal-Conditioned Action Pruner ] ──────► Action Mask (Cosine Annealed)
                                    │
                                    ▼
[ Visual/State Inputs ] ──► [ Goal-Conditioned PPO Agent ] ──────────► Executed Action
  • Structured Goal Planner: Instead of asking an LLM for individual actions or subgoals on every step, SGRL uses DeepSeek-R1 via a three-stage prompt pipeline (Design $\rightarrow$ Implementation $\rightarrow$ Reflection/Revision) to write a modular Python class (determine_goal). This code maps environmental text observations to a set of prioritized goals. The LLM only re-tunes the numeric priority weights periodically (every 2 million steps), making LLM invocations infrequent.
  • Goal-Conditioned Action Pruner: An action bank maps specific goals to admissible action subsets (e.g., crafting recipes exclude combat actions). To avoid policy rigidity caused by imperfect LLM priors, SGRL applies a three-stage cosine annealing schedule with Bernoulli stochastic relaxation, gradually balancing LLM constraints with RL policy autonomy.
  • Goal-Conditioned PPO Agent: Goals and their priority weights are mapped to continuous vectors via a pretrained sentence encoder (paraphrase-MiniLM-L6-v2) and concatenated with state observations. The action mask penalizes irrelevant action logits by setting them toward negative infinity.

Datasets

The authors evaluated SGRL on two widely used open-world benchmarks:

  • Crafter: A standard 2D open-world survival benchmark featuring 22 hierarchical achievements spanning up to 8 dependency levels (from gathering wood to mining diamonds).
  • Craftax-Classic: A vectorized JAX reimplementation of Crafter that matches the original dynamics and metrics while providing up to $250\times$ faster environment simulation.

Key Insights and Ideas

  • LLM-as-a-Programmer vs. LLM-as-an-Oracle: Generating executable Python code shifts the reasoning burden upfront. The resulting code executes locally at microsecond speeds, decoupling expensive LLM inference from high-throughput environment rollouts.
  • Forward-Looking Prioritization Unlocks Deep Tasks: Analysis of goal weights revealed that SGRL consistently assigns small, non-zero priority weights to late-stage achievements (e.g., Collect diamond) early in training. This forward-looking bias nudges the agent toward preparatory actions well before those resources are immediately needed.
  • Smooth Pruning Schedules Prevent Policy Collapse: Ablations show that static (rigid) action masking performs well initially but plateaus early because the agent cannot adapt to dynamic environmental shifts. Smooth three-stage cosine annealing offers the ideal trade-off: strong goal guidance when bootstrapping skills, followed by full policy autonomy in late training.

Key Results

Experiments demonstrate clear improvements in both exploration depth and training efficiency:

  • Superior Score and Depth: On Craftax-Classic (5M steps), SGRL achieves a score of $33.8 \pm 1.5\%$ and reaches the maximum achievement depth of 8, successfully unlocking Collect Diamond at ~3.7M steps. In comparison, baselines stalled at lower depths:
  • AdaRefiner: Score $28.5\%$, max depth 7 (failed to mine diamond by 5M steps).
  • ELLM: Score $28.4\%$, max depth 6.
  • PPO: Score $24.8\%$, max depth 6.
  • Massive Training Speedup: On Craftax-Classic, SGRL runs at $1,850$ steps per second (SPS), compared to $30$ SPS for AdaRefiner and $90$ SPS for ELLM—a $20\times$ to $60\times$ speedup over existing LLM-guided methods due to drastically reduced API query frequencies.
  • Crafter Consistency: On standard Crafter at 5M steps, SGRL leads with a $30.5\%$ score and depth 8, outperforming AdaRefiner ($28.2\%$, depth 7) and pure PPO ($18.5\%$, depth 6).

Limitations and Future Work

  • Reward-Metric Misalignment: The authors noted that while SGRL achieves deeper milestones, cumulative episode rewards do not scale proportionally. The benchmark rewards simple, repeatable tasks as heavily as rare, deep achievements (a discrepancy also visible in human expert data).
  • Domain Diversity: SGRL was evaluated exclusively on 2D survival crafting environments (Crafter and Craftax-Classic). Extending the approach to visually complex 3D environments (e.g., full Minecraft) or robotics tasks with continuous action spaces remains an open direction.
  • Dependence on Initial Prompt Framing: The structured code generator relies on an initial text description of environment rules, recipes, and text renderings. Applying SGRL to completely unfamiliar environments with zero domain descriptions would require automated environment discovery.

Summary updated

BibTeX
@misc{qi2025goal,
  author = {Yajie Qi and Wei Wei and Lin Li and Lijun Zhang and Zhidong Gao and Da Wang and Huizhong Song},
  title = {{Goal-Guided Efficient Exploration via Large Language Model in Reinforcement Learning}},
  year = {2025},
  eprint = {2509.22008},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.22008},
}
Figure