Unlocking Smarter Device Control: Foresighted Planning with a World Model-Driven Code Execution Approach

Xiaoran Yin, Xu Luo, Hao Wu, Lianli Gao, Jingkuan Song · DOI

Abstract

Autonomous agents for mobile devices often struggle with complex, multi-step tasks due to a "reactive" operational loop that lacks global context. This paper introduces FPWC (Foresighted Planning with World Model-Driven Code Execution), a framework that shifts agent behavior from reactive clicking to foresighted navigation. By constructing a task-specific language-centric world model and generating executable Python code for planning, FPWC achieves significant performance gains. Evaluated on MobileAgentBench and a new real-world benchmark, FPWC demonstrates a 44.4% relative improvement in success rates over previous state-of-the-art agents, while also reducing the average number of steps required for task completion.

Introduction

Current mobile agents typically follow a "ReAct" (Reason + Act) loop, making decisions based on immediate visual feedback. This "myopic" approach often leads to logical dead loops, a failure to anticipate long-term consequences, and significant difficulties in cross-application workflows. To address these limitations, the authors propose that agents require an internal "world model"—a mental map of the application environment that allows for multi-step planning and a structural understanding of how different screens relate to one another.

Methodology

FPWC introduces a paradigm shift in how agents interact with mobile interfaces by moving from simple visual responses to structured planning.

Comparison of the previous reactive method versus the proposed FPWC method featuring a world model and code-based planning.

The framework consists of several key components:

  • Language-Centric World Model: Before execution, the agent uses a Large Language Model (LLM) to build a task-oriented directed graph. Nodes represent text descriptions of app views, while edges represent the actions required to transition between them.
  • Code-Based Foresighted Planning: Instead of natural language thoughts, the agent generates a Python function (plan()). This allows the agent to utilize standard programming logic, loops, and conditional checks (e.g., verifying if a setting is already enabled) to handle environmental uncertainty.
  • Iterative Refinement: The world model is dynamic. As the agent receives new screenshots, it compares them against its internal model, updating the graph and regenerating plans if discrepancies are found.
  • Hierarchical Framework: For cross-app tasks, a "Parent-Child" architecture allows specialized agents to handle sub-tasks in different applications.
  • Action Verification: To improve grounding, the agent performs a "zoom-in" check, cropping target UI elements for the Vision-Language Model (VLM) to confirm before execution.

Evaluation

The researchers evaluated FPWC against two primary benchmarks:

  1. MobileAgentBench: A standard benchmark with 100 tasks across 10 open-source Android applications.
  2. Real-World Benchmark: A challenging new dataset featuring 103 tasks across 9 popular commercial apps (e.g., Gmail, WeChat, Chrome), specifically designed to test complex workflows and cross-app interactions.

Results and Discussion

FPWC established a new state-of-the-art performance across both benchmarks. On MobileAgentBench, it achieved a 39% success rate, significantly outperforming previous leaders like AutoDroid (27%) and Mobile-Agent (26%).

Performance comparison on MobileAgentBench showing FPWC's superior Success Rate (SR) and efficiency metrics.

In real-world testing, the advantage was even more pronounced. FPWC achieved a 33% success rate and a 62.8% completion rate, nearly doubling the success rate of the previous best-performing agent (Mobile-Agent at 19.4%).

Beyond success rates, FPWC proved more efficient, completing tasks in an average of 11.9 steps compared to 13.2–14.5 steps for baseline models. This suggests that better initial planning leads to more direct and effective execution paths. Ablation studies confirmed that the world model is the most critical component, providing a "semantic scaffold" that significantly improves instruction grounding.

Conclusion

FPWC demonstrates that foresighted planning and world modeling are essential for the next generation of mobile agents. By treating the environment as a refinable hypothesis and using code for logical consistency, the system overcomes many of the "myopic" failures of previous reactive agents. While challenges remain regarding VLM grounding for small UI elements and the computational cost of complex reasoning, FPWC sets a new standard for autonomous device control.

Summary updated

BibTeX
@misc{yin2025unlocking,
  author = {Xiaoran Yin and Xu Luo and Hao Wu and Lianli Gao and Jingkuan Song},
  title = {{Unlocking Smarter Device Control: Foresighted Planning with a World Model-Driven Code Execution Approach}},
  year = {2025},
  eprint = {2505.16422},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.16422},
}
Figure