PCBWorld: A Benchmark Environment for Engine-Grounded PCB Design Automation

Hyungseok Song, Junseok Park, Won-Seok Choi, Seohui Bae, Han-Seul Jeong, Youngjoon Park, Soonyoung LeearXiv 2026

TL;DR

The authors introduce PCBWorld, an open-source, engine-grounded reinforcement learning (RL) and LLM environment built on top of the KiCad electronic design automation (EDA) engine. By allowing AI agents to interactively route printed circuit boards using native engine operations and real-time Design Rule Check (DRC) feedback, it overcomes the scalability limits of traditional grid-based routing. Along with a new benchmark suite (PCBWorld-Bench), the environment demonstrates that learning-based agents can successfully achieve zero-shot transfer from synthetic training data to real-world circuit boards.

What Problem Does This Paper Address?

Printed Circuit Board (PCB) routing—the intricate task of drawing copper traces to connect electronic components while keeping distinct nets electrically isolated—is a critical bottleneck in hardware design. Despite the rise of machine learning, the electronics industry still relies heavily on decades-old, rule-based heuristics.

Existing learning-based routing methods suffer from a fundamental modeling flaw:

  1. Grid-based RL formulations treat routing as cell-by-cell movement on a discrete lattice. As board resolution increases, the search space and decision horizon explode, causing algorithms to collapse.
  2. LLM-based approaches typically generate entire EDA scripts or code snippets in an open-loop fashion, completely missing the strict, unforgiving geometric constraints imposed by real-world manufacturing rules.

Human engineers do not route cell-by-cell, nor do they write entire boards blindly. Instead, they interactively read the board state, judge feasibility, and leverage the native operations of an EDA engine (like pushing traces aside or detouring) to keep routes legal. This paper bridges this gap by placing AI agents directly into that exact same human-in-the-loop workflow.

Figure 2: Core concepts of PCB routing. Pads of the same net must be electrically connected. Traces of different nets that come too close incur a design rule violation (DRV). Vias let traces switch layers to avoid such conflicts.

Methods

PCBWorld wraps the open-source KiCad EDA engine into a headless, vectorized Python environment compatible with the standard Gymnasium interface. It operates across three distinct layers:

  • Python API Layer: Exposes 58 native KiCad engine operations, including step-level routing mutators and full Design Rule Checks (DRC).
  • MDP Formulation: The routing workflow is formalized as a Markov Decision Process. The State is represented as a precise, nested dictionary of exact geometric objects (pads, tracks, vias) rather than a lossy image or grid abstraction. Actions consist of high-level native routing commands (e.g., start_route, make_line, make_via, finish) paired with engine-driven routing modes like push_n_shove (pushing obstacles aside) and walkaround (detouring).
  • Agent Wrappers: To accommodate different architectures, PCBWorld provides an RL Wrapper (which tokenizes geometric objects using Fourier feature maps) and an LLM Wrapper (which serializes the board state into compact S-expressions).

The environment uses a potential-based reward shaping function that relaxes hard manufacturing constraints into a smooth, concave logarithmic penalty for design rule violations, combined with penalties for total wirelength and via counts.

Figure 4: Example Action of PCBWorld. An example of make_line, where the routing_mode argument alters routing behavior through the KiCad routing engine, yielding different trace geometries across the three modes.

Datasets

The authors introduce PCBWorld-Bench, a comprehensive evaluation suite categorized into three distinct board datasets:

  • D1 (Synthetic Grid-based): 10,000 boards replicating the grid-routing task of Jumanji’s Connector environment across five scaling grid sizes ($10 \times 10$ to $500 \times 500$).
  • D2 (Synthetic Gridless): 10,000 procedurally generated multi-pin, 2-layer boards with varying net and pad counts used for in-distribution training and evaluation.
  • D3 (Open-Source Boards): A curated set of 679 real-world boards extracted from the open-source PCBench corpus, converted to KiCad 9 format, and partitioned by difficulty into Small (D3-A), Medium (D3-B), and Large (D3-C) splits.

Key Insights and Ideas

  • Resolution Independence via Engine Grounding: By using segment-level engine APIs rather than cell-by-cell grid steps, the agent's decision horizon remains tied to the number of connections rather than physical board resolution. This fundamentally solves the scalability issue of prior RL routers.
  • Closed-Loop Interaction is Vital for LLMs: Moving an LLM from "engine-free" code generation to an "interactive" tool-use loop dramatically improves performance. LLMs cannot reason through strict geometric constraints open-loop; they require step-by-step engine feedback to correct course.
  • Procedural-to-Real Sim-to-Real Transfer: A compact PPO policy trained entirely on procedurally generated synthetic boards (D2) successfully generalizes zero-shot to real-world open-source boards (D3-A), even outperforming established rule-based baselines on smaller layouts.

Key Results

  • Grid Scaling Mastery: On the D1 dataset, as grid sizes scale up to $500 \times 500$, traditional grid-action RL baselines (A2C and Sable) completely collapse due to the massive horizon. PCBWorld's PPO agent maintains near-perfect routability across all resolutions.
Simulation Results on Synthetic Grid-based Boards
  • Synthetic Gridless Performance (D2): PPO achieved a perfect 1.00 Clean Pass (CP) rate (fully connected with zero design violations), outperforming the best interactive LLM baseline (GPT-5.4 at 0.96 CP).
  • Zero-Shot Real Board Generalization (D3-A): On real-world small boards, the synthetic-trained PPO policy achieved 0.86 CP, outperforming the commercial-grade rule-based router Freerouting (0.80 CP) and all LLM variants.
  • LLM Engine Engagement: Interactive LLMs significantly outperformed their open-loop counterparts. On D3-A, interactive GPT-5.4 scored 0.65 CP, while its "plan-and-execute" variant dropped to 0.19 CP, and the "engine-free" generation failed entirely (0.02 CP).

Limitations and Future Work

  • The Large Board Bottleneck: Routing larger, highly congested boards (splits D3-B and D3-C) remains an open challenge. All tested LLM variants scored 0.00 CP on the medium-sized D3-B split, and the RL policy's performance degraded significantly.
  • Lack of Dynamic Deletion/Editing: To keep the action space compact, the authors excluded track-deletion APIs from the agent's available actions. Consequently, agents cannot undo a committed trace and struggle to resolve deadlocks when severe routing congestion occurs.
  • LLM Inference Latency: Interactive LLM routing is computationally expensive and slow, averaging 94 seconds per episode on synthetic boards due to the requirement of a full model call at every single routing step.

Summary updated

BibTeX
@misc{song2026pcbworld,
  author = {Hyungseok Song and Junseok Park and Won-Seok Choi and Seohui Bae and Han-Seul Jeong and Youngjoon Park and Soonyoung Lee},
  title = {{PCBWorld: A Benchmark Environment for Engine-Grounded PCB Design Automation}},
  year = {2026},
  eprint = {2607.05915},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.05915},
}
Figure