Source-linked AI summary

Adaptive Code Generation for Controlling Robots

Justus Flerlage, Thorsten Wittkopp, Alexander Acker, Odej Kao

arXiv:2610.09588v1cs.ROcs.AI

TL;DR

Robots in open-ended environments must translate underspecified natural-language intentions into actions despite changing scenes and uncertainty. This paper proposes a MAPE-K-inspired architecture combining constrained LLM code generation, VLM semantic grounding, and environment-triggered replanning. Its quadruped evaluation reports robust performance on finite tasks but unresolved challenges on open-ended ones.

  • Problem

    Robots built around predefined taxonomies struggle with novel objects and tasks, while natural-language intentions leave gaps between goals and executable actions.

    Source: §1 · pp. 2–3
  • Method

    A MAPE-K-inspired architecture combines LLM-generated workflows constrained to robotic actions, VLM semantic grounding, and replanning triggers based on environmental change.

    Source: tasks · p. 3, §3.2 · p. 7, §6 · p. 14
  • Results

    The quadruped evaluation found high syntactic reliability and robust finite-task performance, while open-ended tasks remained challenging; Qwen3.5 and Kimi-K2.5 each achieved about 82% overall success versus GPT-5-nano at about 46%.

    Source: §4.6 · p. 12, §6 · pp. 14–15
  • Takeaways & Limitations

    The framework demonstrates intention-based robot task execution through a dual-AI architecture in exploration tasks, with open-ended performance still bounded by long-horizon reasoning, state awareness, and completeness checking.

    Source: §6 · pp. 14–15

    Open-ended tasks expose unresolved challenges in long-horizon reasoning, state awareness, and completeness checking; degradation is attributed primarily to exhaustive-search cognitive limits.

    Source: §6 · p. 15

Abstract

from arXiv · show

Deploying robots as Complex Adaptive Systems (CAS) in unknown and dynamic environments necessitates a transition from rigid command libraries toward intention-based autonomy, as natural language represents the only medium capable of articulating complex goals beyond the capacity of finite instruction sets. While Large Language Models (LLMs) offer a path toward natural language goal description, their integration introduces significant challenges: the formalization gap between imprecise intentions and executable actions, the taxonomy gap induced by unpredictable environments, and the challenge of maintaining temporal state and progress awareness. This work introduces an architectural framework that enables robotic control by leveraging generative AI. The system follows a dual-AI design: an LLM translates high-level intentions into executable program code restricted to a formal robotic library and constrained by verifiable syntax, while a Vision-Language Model (VLM) provides semantic grounding via a distillation process. To ensure robustness, the framework incorporates environment-driven replanning triggers based on geometric and semantic thresholds, complemented by continuous runtime monitoring and an adaptive planning loop. Benchmarked across frontier models, our framework architecture demonstrates that grounding generative AI in a reactive, constrained loop enables robust fulfillment of complex intentions in dynamic and unknown environments.

1 Introduction

Robots designed for fixed environments struggle with novel objects and open-ended tasks, while natural-language intentions leave key actions and completion conditions unspecified. The paper proposes a MAPE-K-inspired framework combining generative AI, constrained code generation, semantic grounding, and persistent task knowledge, and evaluates it on quadruped exploration tasks.

1 Introduction

  • Conventional robotic systems rely on predefined taxonomies and execution models, limiting their ability to generalize to dynamic environments with novel objects and tasks.The paper contrasts these systems with open-ended settings that cannot be fully specified at design time.Source: §1 · p. 2
  • Natural-language intentions can express complex tasks but often omit objects, routes, reactions, and completion timeframes needed for an operational plan.The robot must infer these procedural details and environmental constraints.Source: §1 · p. 2
  • The framework combines LLM-generated executable behavior, VLM semantic descriptions, library-constrained actions, and persistent progress and scene-change knowledge in a MAPE-K loop.This design targets the formalization, taxonomy, and temporal-state challenges of intention-driven control.Source: §1 · p. 3, tasks · p. 3
  • A quadruped proof-of-concept is evaluated on object-identification and exploration tasks, including finite and open-ended settings, while benchmarking LLMs across task success, robustness, replanning, and termination control.The robot receives high-level intentions and must generate, execute, and adapt its behavior.Source: tasks · p. 4

2 Framework Architecture

The MAPE-K-inspired architecture connects perception, cognition, and a centralized world state to adapt robot behavior to environmental change. It grounds semantic descriptions in geometry, constrains LLM-generated workflows to robotic primitives, and preserves execution state across replanning.

2 Framework Architecture

  • The architecture organizes monitoring, analysis, planning, and execution around a shared knowledge base, with perception, cognition, and centralized world state as its components.The world state supplies environmental cues and geometric grounding for adaptation.Source: §2 · p. 4
  • A VLM enriches raw sensor data with open-ended semantics, which are grounded in precise coordinates so robots can reason about previously unidentified objects without a fixed taxonomy.The world state serves as an active source of environmental cues for cognition.Source: §2 · pp. 4–5
  • The LLM maps ambiguous intentions to imperative workflows restricted to predefined robotic primitives, providing a formal sequence of actions for execution.It updates workflow logic using the current world state and environmental triggers.Source: §2 · p. 5
  • When environmental change triggers replanning, virtual-machine snapshots preserve execution state so an adapted workflow can be hot-reloaded without restarting the task.Snapshots include instruction pointers and variable bindings.Source: §2 · p. 5

3 Methods and Implementation

The implementation grounds perception in LiDAR geometry and VLM semantics, invokes replanning through environmental triggers, and executes LLM workflows with a state-preserving virtual machine.

3.1 Perception Component

3.2 Event-Driven Adaptation Triggers

  • Three triggers request replanning: promotion of a new AABB, significant growth in an active AABB’s area, or a change in the most frequent semantic tags.The triggers gate LLM invocation on environmental shifts that exceed defined thresholds.Source: §3.2 · p. 7

3.3 Cognition Component

  • Workflows are Python 3 imperative programs executed by a custom virtual machine, which snapshots state and supports granular hot code reloading.The stated choice of Python 3 rests on the assumption that LLMs are well-trained on publicly available data and on its popularity as a programming language.Source: §3.3 · pp. 7–8

4 Evaluation

The evaluation tests a quadruped-robot framework across visibility conditions, finite and open-ended tasks, navigation and exploration modes, and multiple generative models. Open-ended success varies by model, while reported failures center on grounding, completeness, and state tracking.

4.1 Experimental Setup

  • The benchmark evaluates a quadruped robot in Gazebo with ROS 2, using a 640x480 RGB camera and 2D LiDAR with 512 rays across two visibility conditions.Environment A starts with objects in sensing range; Environment B requires active exploration as initially unseen objects can invalidate the current plan.Source: §4.1 · p. 8, Environments · p. 8, Figure 2 · p. 9
  • Finite tasks specify quantitative targets, whereas infinite tasks require continued discovery and plan updates as matching entities are found.The evaluation also distinguishes goal-oriented navigation to an identified object from semantic exploration that searches for it.Source: Environments · p. 9

4.2 Benchmarking Suite

  • A cross-model benchmark tests whether adaptive-loop reliability is an architectural property rather than a property of one generative model.Each task is evaluated three times across finite and infinite tasks and both operational modalities.Source: §4.2 · p. 9, §4.4 · p. 10

4.3 Metrics

  • The evaluation measures end-to-end success, syntactic executability, and re-adaptation frequency across tasks and operational modalities.Re-adaptation frequency is the ratio of structural plan updates to trigger-initiated LLM calls.Source: §4.3 · pp. 9–10

4.5 Baseline Robustness: Smoke Tests

  • Smoke tests report near-perfect success rates and high syntactic executability across models and environments under adversarial prompts.The authors attribute this resilience to formalization constraints that prevent malformed outputs.Source: Table 2 · p. 10, §4.5 · p. 11

4.6 Task Complexity and Model Performance

  • Across finite-task configurations, Qwen3.5 and Kimi-K2.5 achieve higher success rates, especially in Environment B, while GPT-5-nano struggles with counting and multi-step state tracking.Residual failures include mapping linguistic object descriptions to perceived entities, grounding, constraint adherence, and coherent state maintenance during sequential exploration.Source: §4.6 · pp. 11–12, Table 3 · p. 11
  • Qwen3.5 and Kimi-K2.5 each achieve about 82% overall success on open-ended tasks, outperforming GPT-5-nano at about 46%.The reported results also describe success rates as more variable than for finite tasks, with the strongest degradation in Goal-Oriented settings, especially in Environment B.Source: §4.6 · p. 12, Table 4 · p. 12
  • Qwen3.5 has success rates equivalent to Kimi-K2.5, with the shortest inference time and fastest adaptability; evaluation is limited to at most three attempts per model.The authors state that this attempt cap restricts statistical robustness given computational costs and manual evaluation.Source: §4.6 · p. 13, Figure 3 · p. 13

5 Related Work

Related work frames adaptive robotics around bridging taxonomy, formalization, and temporal-state gaps. It reviews approaches spanning collective-system coordination, open-ended visual grounding, constrained code generation, and runtime validation.

5 Related Work

  • The review positions these methods as foundations for bridging taxonomy, formalization, and temporal-state gaps in generative-AI control loops.It also situates the work within engineering Collective Adaptive Systems and autonomous control.Source: §5 · p. 13
  • Collective Adaptive Systems coordinate heterogeneous components through local interaction, while attribute-based communication lets them interact by runtime properties rather than fixed identifiers.Related work also describes decentralized swarm formation and statistical model checking of consensus resilience.Source: §5 · pp. 13–14
  • VLM and VLA research addresses taxonomy limits through open-ended scene understanding, 3D spatial grounding, and video-based understanding, prediction, and planning [25] [10] [5].Examples include Avi, 3D-VLA, Any3D-VLA, and V-jepa 2.Source: §5 · p. 14
  • Formalization-gap approaches include LLM-assisted specification resolution, test-based refinement, and structured prompt templates that constrain outputs to verifiable boundaries.The gap is the disconnect between imprecise natural-language intentions and rigorous robotic execution.Source: §5 · p. 14
  • Temporal-state work includes Code-as-Monitor for reactive, proactive failure detection and white-box validation combining statistical model checking with process mining.The latter is used to explain observed behavior and identify unexpected deadlocks or synchronization errors during mission execution.Source: §5 · p. 14

6 Conclusion

The paper presents a MAPE-K-inspired dual-AI architecture for intention-driven robot tasks, with an LLM planner and VLM semantic perception. Quadruped exploration results show strong syntactic reliability and finite-task performance, while open-ended tasks retain reasoning and state-awareness challenges.

6 Conclusion

  • The MAPE-K-inspired framework combines LLM code-based planning with VLM distilled semantic perception to address formalization, taxonomy, and temporal-state gaps.It supports high-level intentions without requiring explicit programming.Source: §6 · p. 14
  • Quadruped exploration evaluation found high syntactic reliability and robust performance on finite tasks.The evaluation also found open-source frontier models better at maintaining execution context, while open-ended degradation was attributed primarily to cognitive limits in exhaustive search rather than invalid commands or execution errors.Source: §6 · pp. 14–15
  • Infinite and open-ended tasks leave unresolved challenges in long-horizon reasoning, state awareness, and completeness checking.These challenges motivate more rigorous temporal-state work.Source: §6 · p. 15
  • Future work proposes formal state-machine verification for multi-step plans and multi-agent coordination across distributed robotic platforms in large, unmapped environments.The proposed state-transition mapping aims to check consistency across multi-step objectives.Source: §6 · p. 15
Loading 2610.09588v1…