Papers
Topics
Authors
Recent
Search
2000 character limit reached

CoPiC: Domain-Adaptive Planning Framework

Updated 10 March 2026
  • CoPiC is a framework for efficient, domain-adaptive, long-horizon planning that integrates LLM-generated programs with a learned critic for robust decision-making.
  • It decouples plan generation from evaluation, reducing token costs and mitigating hallucinated, infeasible plans through environment-specific grounding.
  • Empirical results on ALFWorld, NetHack, and StarCraft II show significant improvements in success rates and query efficiency compared to leading LLM planners.

CoPiC (Code-Driven Planning with Domain-Adaptive Critic) is a framework for efficient, domain-adaptive, long-horizon planning in sequential decision-making environments using LLMs as program generators and a learned critic as a long-term reward estimator. CoPiC addresses two central limitations in prior LLM-based planning: the lack of grounding to environment specifics (leading to hallucinated or infeasible plans) and the high query cost incurred by per-step, short-term LLM invocation. By decoupling code generation from plan evaluation and leveraging domain-adaptive learning, CoPiC achieves substantial improvements in both solution quality and computational efficiency relative to leading LLM-based planners (Tian et al., 23 Sep 2025).

1. Motivation and Problem Landscape

State-of-the-art LLM planners such as ReAct, Reflexion, and AdaPlanner operate by repeatedly querying the LLM to generate or refine an action sequence at each decision point. This process is expensive due to high token requirements and tends to optimize for short-term, myopic rewards driven by recent environmental feedback. Critically, LLMs pretrained on general corpora are prone to hallucinate actions or interactions not supported in specific environments (e.g., referring to objects or modalities that do not exist), resulting in infeasible or suboptimal plans.

CoPiC is designed to:

  1. Minimize LLM query frequency (reducing inference cost).
  2. Improve long-horizon task completion rates by promoting global reward alignment.
  3. Adapt plan generation and assessment to environment idiosyncrasies via learned feedback, as opposed to overfitting on transient, shallow feedback.

2. Methodology: Architecture and Pipeline

CoPiC operates in two recurring phases: planning and learning.

  • Planning Phase:
    • Program Generation: An LLM, prompted with a domain- and task-specific “init prompt,” synthesizes nn high-level Python planning programs {ρi}i=1n\{\rho_i\}_{i=1}^n, each accepting task instruction II and observation oo, and outputting a candidate plan pip_i.
    • Plan Scoring: Each plan pip_i is scored by a compact LLM critic CθC_\theta, which computes log-likelihoods of natural language plan descriptions, applies length normalization, and softmaxes across candidates. The top-scoring plan is selected for execution.
  • Learning Phase:
    • Program Evolution: The LLM refines the set {ρi}\{\rho_i\} using an “evolve prompt” that summarizes performance over the last MM episodes.
    • Critic Fine-Tuning: Transitions (I,o,p,r,o,done)(I, o, p, r, o', \text{done}) are marshaled into a replay buffer. Proximal Policy Optimization (PPO) with Low-Rank Adaptation (LoRA) is applied to further train {ρi}i=1n\{\rho_i\}_{i=1}^n0 so that its value estimates {ρi}i=1n\{\rho_i\}_{i=1}^n1—where {ρi}i=1n\{\rho_i\}_{i=1}^n2—better reflect true long-term returns.

The process alternates until episode-level success rates plateau, yielding a refined ensemble of planning programs and a specialized critic.

3. Formalism: Domain-Adaptive Critic

The critic component is implemented as a lightweight LLM with LoRA-augmented final layers, abstracted as learning a state-value mapping {ρi}i=1n\{\rho_i\}_{i=1}^n3. Key elements:

  • TD-Error Minimization:

{ρi}i=1n\{\rho_i\}_{i=1}^n4

  • Inference-Time Scoring:

    • Plan descriptions {ρi}i=1n\{\rho_i\}_{i=1}^n5 are tokenized and their conditional likelihood under a critic prompt {ρi}i=1n\{\rho_i\}_{i=1}^n6 is calculated:

    {ρi}i=1n\{\rho_i\}_{i=1}^n7 - Length normalization:

    {ρi}i=1n\{\rho_i\}_{i=1}^n8 - Scores are softmax-normalized over all {ρi}i=1n\{\rho_i\}_{i=1}^n9 candidates:

    II0 - The plan II1 is executed.

4. Algorithmic Workflow

A concise view of the CoPiC process:

Step Description
1. Initial Program Synthesis LLM generates II2 candidate planning programs via init prompt
2. Candidate Plan Generation Each II3 produces a plan II4 given current II5
3. Plan Selection Critic II6 softmax-scores and chooses the best II7
4. Execution and Feedback Execute II8 in environment, collect reward and feedback
5. Critic Fine-Tuning PPO-based RL updates II9 using replayed experience
6. Program Evolution If stabilized, evolve programs via LLM using an episode summary

Program evolution ensures continual adaptation to environment specifics, while critic fine-tuning enhances reward alignment.

5. Empirical Performance and Cost Analysis

Evaluated on ALFWorld, NetHack, and StarCraft II Unit Building, CoPiC establishes superiority over advanced LLM planning baselines (Reflexion, AdaPlanner):

  • Achieves a mean 23.33% improvement in success rate and 91.27% lower query cost (tokens) compared to Reflexion on ALFWorld.
  • Attains an average 79.39% reduction in total LLM query token count across all benchmarks.
  • Program evolution is central: success rate in ALFWorld increases from ~75% to 100% after four refinement iterations.
  • Removal of the critic (random candidate selection) reduces success rates by 20–60% at fixed token cost.
  • oo0 planning programs found optimal for success/cost trade-off.
  • Open-source LLMs (e.g., DeepSeek, Qwen2.5-Coder) yield comparable gains, suggesting model-agnosticism.
Metric CoPiC vs. Best Baseline Highlighted Result
Success Rate +20.29% average improvement Up to 100% on SC2 Hard
LLM Token Cost −79.39% reduction Up to 96% reduction (NetHack)
ALFWorld (tokens) 0.74M → 0.16M +20% absolute SR delta

6. Strengths, Limitations, and Prospects

Strengths

  • Token Efficiency: Drastic savings versus step-wise querying planners.
  • Long-Horizon Reward Focus: Critic-driven selection enables non-greedy, long-term optimal plans.
  • Environment Adaptivity: Iteratively evolved programs capture environment-specific constraints absent from LLM pretraining.

Limitations

  • Requires Initial Program Synthesis: Baseline LLM must yield a working program in the environment.
  • RL Training Overhead: Critic adaptation incurs training cost and environment interaction demands.

Directions for Future Work

  • Extension to richer, more dynamic domains (e.g., full StarCraft II, Civilization).
  • Applications to real-world robotics/industrial process planning.
  • Development of more expressive critic architectures, introduction of Q-function-based or multi-agent frameworks.

CoPiC establishes a general approach for amortized, domain-adaptive, and cost-efficient LLM-based planning in complex sequential environments, marking a significant advancement over immediate-feedback planners by closing both the cost and reward alignment gaps (Tian et al., 23 Sep 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CoPiC.