intelcad · 2026-11-04 · 10 min

Where DeepPCB and Freerouting Diverge in Board Layout

A technical look under the hood of reinforcement learning routers and heuristic maze engines, from BGA escape routing to broken analog return paths.

Comparison of PCB trace geometries routed on a multilayer circuit board

The release of academic benchmarks like PCBWorld and the ongoing debate across the open-source electronics community have brought the underlying mechanics of PCB autorouting back into sharp focus. Over on GitHub, developers maintain Freerouting as the default open-source geometric solver, while commercial platforms like DeepPCB report over 100,000 boards processed using cloud-based deep reinforcement learning models.

For a solo hardware engineer at a startup or an electronics design house, this algorithmic shift is not an academic curiosity. It is a direct calculation of prototype lead times and respin budgets. Every failed routing run, broken ground reference, or unmanufacturable via stackup pushes your fab turn by two weeks and burns thousands of dollars in assembly setup fees.

Understanding where neural reinforcement learning diverges from traditional rip-and-retry maze routers explains why certain complex board layouts route cleanly on the first pass while others emerge from automated tools as electromagnetic compliance disasters.

The Engine Under the Hood: Lee's Maze vs MCTS

To evaluate what an autorouter actually does to your netlist, you have to look at the mathematical formulation of the pathfinding problem.

Traditional tools, including Freerouting and legacy commercial engines, rely fundamentally on variants of Lee's maze routing algorithm, Dijkstra's shortest path, and A-star heuristics. In these systems, the board is discretized into a geometric grid or a topological graph of clearance obstacles.

When routing a net, the algorithm radiates a wavefront from the source pad until it hits the target pad. If an existing track blocks the path, the router calculates a cost function. When congestion peaks, a rip-up-and-retry loop triggers: the engine removes previously placed tracks, routes the higher-priority connection, and attempts to reroute the displaced nets into whatever clearance remains.

[Lee's Wavefront / Heuristic Engine]
Source Pad -> Grid Expansion -> Collision -> Rip-Up Conflicting Track -> Retry (Greedy Local Search)

[Reinforcement Learning / MCTS Engine]
State Vector (Board Density, Nets) -> Policy Network -> MCTS Branch Rollouts -> Global Topological Action

This approach is strictly deterministic and locally greedy. It evaluates the immediate geometric penalty of track length, via count, and clearance violations. When net counts stay low and layer counts remain generous, heuristic maze routers solve boards with mathematical certainty.

However, as track density climbs, the state space explodes. The rip-up-and-retry engine gets trapped in cyclical loops, endlessly swapping two competing traces back and forth until it hits an arbitrary step timeout, leaving five unrouted ratsnest lines in the center of your board.

Reinforcement learning engines frame PCB layout differently. DeepPCB and modern experimental routers treat layout as a Markov Decision Process solved through Monte Carlo Tree Search (MCTS) guided by deep neural policy and value networks.

Instead of evaluating one trace from pad A to pad B in isolation, the neural network ingests the overall board state, including pin distributions, keepouts, and layer allocations, as a high-dimensional tensor. The agent explores thousands of potential multi-net moves simultaneously, evaluating simulated rollouts to maximize a cumulative reward function.

The policy network predicts which topological channels will keep congested corridors open for subsequent nets, while the value network scores the board state long before the final connection is dropped. The router plans several moves ahead, sacrificing local trace length on non-critical nets to keep broad routing avenues open across the inner layers.

Where Neural Routing Wins: Dense BGA Escape Channels

Where reinforcement learning demonstrates real mechanical superiority over traditional maze routers is inside high-pin-count, tight-pitch components such as 0.8mm and 0.5mm Ball Grid Arrays (BGAs) and high-density microcontrollers.

Breaking out an array of several hundred pins across four signal layers is a multidimensional topological puzzle. A classic heuristic router attacks the problem sequentially. It routes the outermost perimeter pins along the top layer, moves inward, drops dog-bone vias, and promptly boxes itself in.

By the time the algorithm attempts to extract the innermost power rails and high-speed data lanes, the surrounding quadrant is a solid wall of vias and antipads. The maze router then starts ripping up outer traces, dropping random vias in suboptimal locations, and frequently gives up with dozens of clearance errors.

An MCTS-guided reinforcement learning agent approaches the BGA field globally. Because the policy network was trained across thousands of dense routing topologies, it recognises the structural symmetry required for escape routing.

It prioritizes unified channel allocation. It drops vias in uniform, diagonal, or staggered patterns that leave continuous copper corridors open on inner layers. It plans the escape of inner signal pins first or reserves dedicated routing channels beneath the component shadow.

Traditional Heuristic BGA Fanout:
[Pin] -> [Via] -> Random Outer Escape -> Blocks Inner Escape (Rips up and fragments)

Reinforcement Learning BGA Fanout:
[Pin Matrix] -> Coordinated Staggered Vias -> Uniform Layer Escape Corridors Maintained

On mixed digital boards carrying dense microcontrollers, SPI flash, and memory interfaces, an RL router can achieve 100 percent geometric completion in minutes where a traditional rip-up engine stalls or requires hours of manual track nudging.

Where Heuristic Rules Still Dominate: Return Paths and Analog Planes

Despite the power of neural search for topological routing, deep learning engines have a major blind spot that regularly bites solo engineers: they optimize strictly for what is inside their reward function.

In most commercial and academic RL implementations, the reward function is a composite score based on:

  1. Completion rate (percentage of connected nets).
  2. Total trace length minimization.
  3. Total via count reduction.
  4. Strict geometric clearance according to user-defined design rules (DRC).

Notice what is missing from that list: return path physics, copper balance, reference plane integrity, and parasitic coupling.

+---------------------------------------------------------------------------------+
|                       ALGORITHMIC TRADEOFF MATRIX                               |
|             (Composite architectural analysis from published benchmarks)        |
+-----------------------+-----------------------------+---------------------------+
| Metric / Behavior     | Traditional Heuristic       | Deep RL + MCTS            | 
|                       | (Freerouting / Maze Router) | (DeepPCB Architecture)    | 
+-----------------------+-----------------------------+---------------------------+
| Core Search Method    | Dijkstra / Lee / Rip-Up     | Deep Policy Net + MCTS    | 
| State Optimization    | Local greedy geometric      | Global topological value  | 
| BGA Fanout Success    | Poor (frequent bottlenecks) | High (coordinated channels)| 
| Compute Environment   | Single-threaded CPU local   | Cloud GPU/CPU cluster     | 
| Deterministic Results | 100% repeatable             | Stochastic variations     | 
| Return Path Awareness | Rule-dependent / Constrained| Blind without custom loss | 
| Run Cost              | Free / Open Source          | Credit / Subscription     | 
+-----------------------+-----------------------------+---------------------------+

To a neural network optimizing for trace length and via reduction, an unbroken internal ground plane looks like an empty four-lane highway. If the engine finds an easier path across an inner ground layer, it will drop signal tracks straight through that copper pour without hesitation.

When an autorouter cuts a track across an internal ground plane, it creates a slot in the copper. When a fast-switching digital trace on an adjacent layer crosses that slot, its high-frequency return current cannot flow directly beneath the signal. The return current must divert around the entire slot, creating a massive current loop area.

That loop acts as an efficient magnetic dipole antenna. The board passes geometric DRC with zero clearance errors, but it will fail radiated emissions testing in an EMC chamber on the first sweep.

Traditional rule-based engines, when configured properly inside mature CAD tools, enforce absolute layer-use rules and net-specific keepouts. If you lock an internal layer as a dedicated GND plane in your stackup rules, a heuristic router will refuse to drop a signal trace on it, no matter how desperate it gets to route a difficult net.

Similarly, with sensitive analog signals, such as low-noise op-amp inputs, Kelvin-sense connections across a current shunt, or crystal oscillator traces, deterministic rules and manual routing remain mandatory. An RL router does not inherently understand that a 24 MHz crystal trace must remain tightly grouped with its load capacitors, isolated from noisy DC-DC switch nodes, and routed without vias.

The Cost and Compute Realities

There is also a practical operational divergence between running an open-source tool like Freerouting locally and dispatching netlists to an RL cloud platform like DeepPCB.

Freerouting runs locally in Java on your workstation. It is free, requires no network connection, keeps your proprietary design files entirely on your machine, and executes deterministically. If you make a minor modification to your placement and re-run it with the same seeds, the results are predictable.

DeepPCB and similar reinforcement learning systems operate as cloud-based platforms. They consume considerable parallel compute, evaluating thousands of MCTS rollout trajectories per second across remote servers.

Commercial platforms often meter this compute through credit-based or subscription models. You pay for the optimization time whether the output requires zero edits or needs half its nets redrawn because a switching node was routed right past an ADC reference line.

For a hardware team operating on tight seed funding, paying cloud credits to generate layouts that still require manual post-route cleanup creates friction. If you spend three hours cleaning up fragmented ground planes, re-routing differential pairs, and fixing thermal ties, the time savings of automated routing quickly evaporates.

A Production-Grade Decision Framework

Automated routing tools should neither be dismissed entirely nor trusted blindly. The engineering solution is to apply algorithms where their mathematical strengths solve your layout bottlenecks, while maintaining strict, physics-driven control over sensitive nets.

Here is how to structure a routing strategy that minimizes respins and protects your prototype schedule:

1. Route Power, Ground, and Critical Nets Manually

Never hand an unconstrained board to an autorouter. Before running any automated solver, manually place and lock down:

  • Ground and Power Planes: Define continuous solid copper layers. Lock them so automated engines cannot drop signal traces on internal reference layers.
  • Switch-Mode Power Supplies: Route high-di/dt loops (inductors, switching nodes, input capacitors) compactly on the top layer with broad copper pours.
  • High-Speed and Differential Pairs: Route USB, Ethernet, MIPI, and PCIe pairs with controlled-impedance stackup geometry and continuous ground references.
  • Sensitive Analog and Clock Lines: Keep crystal oscillators, ADC analog inputs, and current-sense lines isolated with dedicated guard traces or unbroken ground shields.

2. Isolate Dense Digital Buses for RL Exploration

Once critical nets are pinned, identify the high-congestion digital buses: GPIO arrays, LED driver lines, level-shifter matrices, and dense microcontroller breakout zones.

This is where reinforcement learning shines. Export the sub-layout or unrouted digital nets to an AI routing engine. Let the neural network solve the complex pin-swapping and multilayer escape puzzle that would take a human engineer or heuristic maze solver hours to untangle.

3. Run Post-Route Return Path and DFM Verification

When you pull the routed netlist back into your primary EDA environment, run an uncompromising audit before exporting Gerbers:

  • Return Path Continuity Check: Inspect every layer transition. If a high-speed net switches from Layer 1 to Layer 4, ensure there is an adjacent ground via nearby to provide an AC return path between planes.
  • Reference Plane Inspection: Turn off all signal layers and inspect your ground pours. Look for islands, narrow necks, or slots caused by via clusters.
  • Fabricator DFM Check: Verify annular ring sizes, track-to-track clearances, and solder mask slivers against your specific PCB fab rule deck. Automated routers frequently push trace clearances right up to the mathematical minimum, which can drive up PCB fabrication costs if it triggers advanced precision pricing tiers.
[Routing Workflow for Solo Engineers]

1. Critical Manual Phase:
   [Stackup Defined] -> [Lock Solid Planes] -> [Route Power/Clocks/Diff-Pairs Manually] -> [Pin Nets]

2. Algorithmic Routing Phase:
   [Dense Digital Nets / GPIOs] -> [RL or Heuristic Engine Execution] -> [Import Solved Netlist]

3. Verification & DFM Audit:
   [Check Return Paths & Via Clusters] -> [Run Fab DRC Rule Deck] -> [Final Copper Pour Generation]

What This Means for IntelCAD

Autonomous layout tools cannot treat circuit boards as abstract geometric puzzles. An algorithm that scores 100 percent completion on trace connectivity while destroying power integrity or creating assembly bottlenecks is not solving the engineer's problem.

IntelCAD (intelcad.ai) approaches automated PCB design by coupling layout automation directly to board physics, design rule checks, and real-time component availability. By enforcing stackup awareness, signal integrity return paths, and live sourcing constraints during the placement and routing phases, the platform bridges the gap between fast layout generation and boards that work reliably on Rev A.

The Practical Bottom Line

The fundamental divide between heuristic routers and reinforcement learning engines comes down to local rules versus global strategy. Heuristic maze routers like Freerouting remain reliable, accessible tools for structured, lower-density boards with strict rule constraints. Deep learning engines like DeepPCB represent a significant leap forward in untangling dense, high-pin-count digital pinfields that choke traditional pathfinders.

For the solo engineer, the goal is not to choose one ideology over the other. The goal is to avoid board respins. Use neural routing to solve topological congestion where it saves days of tedious fanout work, but never surrender your power planes or critical signal paths to an engine that does not understand the underlying physics of electrical current.

Sources

More IntelCAD Insight

PCB DesignAutoroutingEDA ToolsHardware Engineering