Printed circuit board (PCB) routing is the stage of physical layout that finds paths connecting the placed pads of each net. Public datasets in this domain are few, and most contain only the final states of routed boards, not demonstrations of the electronic design automation (EDA) engine actions that produce them. To close this gap, we propose CADET (Constructing executAble Demonstrations for Engine-grounded Training), which jointly generates synthetic boards and demonstrations built from EDA engine actions. The resulting RouteDemos provides 100,000 synthetic boards routed with zero design rule violations (DRVs), together with their demonstrations. Their distributions over 17 statistics resemble those of 142 real reference boards. CADET trains a routing policy on these demonstrations with behavior cloning and fine-tunes it with reinforcement learning (RL). On real test boards, the policy raised the rate of complete DRV-free routing from 38.0% to 67.2% over an RL-only baseline. This rate was comparable to that of the open-source autorouter FreeRouting and exceeded those of the other baselines, including GPT-6 Astra. We release the dataset and its generation code as open source at https://github.com/LGAI-Research/CADET.
Figures & tables
Figure 1: Routing with an EDA engine. At each step, the policy observes the board state st and selects an action at∈A(st) that invokes a KiCad operation. The engine executes it and returns the updated board st+1 with connectivity and DRC results. In this example, the policy selects make_line toward P4, and the engine routes the track around the obstacle. The reward rt is the resulting change in the potential Φ .
Figure 2: Overview of Cadet . (a) Inductive construction. The generator samples board attributes from qψ and grows each net pad by pad. It accepts a proposed pad p only when TryConnect connects p to the pad set Si with zero DRVs, and it adds the action sequence τp to D . Every accepted pad thus leaves all retained nets connected with zero DRVs. A failed proposal is relocated within a retry budget. (b) The policy is trained by BC on the replayed demonstrations and then fine-tuned with PPO.
Figure 3
Figure 3: Example routed boards from D3-B test, RouteDemos, and D2. Green and blue traces lie on different copper layers.
Statistic
D3-B test
RouteDemos
D2
Statistic
D3-B test
RouteDemos
D2
Board size
0.064
0.075
0.971
THT drill
0.108
0.058
0.970
Aspect ratio
0.170
0.072
0.504
Clearance
0.045
0.018
0.933
Net density
0.071
0.107
1.000
Track width
0.059
0.045
0.630
Pad density
0.057
0.139
1.000
Netclasses
0.028
0.129
0.660
Locality
0.026
0.066
0.392
THT fraction
0.057
0.026
0.444
Pads per net
0.015
0.016
0.108
Front SMD fraction
0.044
0.037
0.728
Table 1: Marginal KS distances to D3-B ref over 17 statistics, used to calibrate the generator. Lower is closer. Bold marks the lower distance between the two synthetic datasets. D3-B test provides a reference between real splits, not a lower bound. SMD and THT denote surface-mount and through-hole pads. Appendix defines each statistic.
D3-B test (141)
D3-A (99)
Method
Type
CP
ΔΦ
Rout.
Time
CP
ΔΦ
Rout.
Time
Reference
–
100.0
144.41
100.0
–
100.0
50.61
100.0
–
FreeRouting @1
Rule-based
65.6
119.33
96.8
45.6
82.1
46.05
97.7
8.6
KRT @1
Rule-based
27.7
84.71
78.3
2.7
69.7
40.54
92.8
1.5
GPT-6 Astra @1
LLM
56.0
104.20
86.0
491.7
83.8
45.03
93.8
138.9
GPT-6 Luna @1
LLM
5.0
37.72
47.9
335.7
46.5
31.30
78.5
179.1
Table 2: Evaluation on real test boards. Reference is the original human layout. Bold marks the best value among the other methods. Learned policies are averaged over four training seeds. CP and Rout. are in percent, and Time is in seconds per board.
D3-B test (141)
D3-A (99)
Method
CP
ΔΦ
Rout.
CP
ΔΦ
Rout.
Cadet
67.2
107.22
91.7
89.5
45.13
96.6
Cadet (BC)
43.1
78.29
81.7
83.2
41.61
94.4
PPO (RouteDemos)
38.0
95.98
92.0
80.2
44.74
96.6
PPO (RouteDemos w/o TryConnect)
30.9
90.54
91.1
76.6
43.27
96.3
PPO (D2)
40.4
80.66
74.4
78.4
42.28
90.6
Table 3: Effect of demonstrations and training data. Cadet is Cadet @1 of . Bold marks the best value in each column. CP and Rout. are in percent.
Appendix figures & tables28 assets
Supplementary material from the paper’s appendix.
Appendix
Statistic
D3-B ref
RouteDemos
D2
Board size, WH (mm)
0.064
0.102
0.972
Aspect ratio, ln(long/short)
0.170
0.124
0.606
Net density (nets/cm 2 )
0.071
0.154
1.000
Pad density (pads/cm 2 )
0.057
0.167
1.000
Locality, minimum spanning tree (MST) edge length / board diagonal
0.026
0.078
0.369
Pads per net
0.015
0.014
0.101
Appendix
Table 4: Full marginal KS distances to D3-B test. The D3-B ref column measures variation between the two real-board splits. It is a reference value, not an achievable lower bound for a generator. SMD and THT denote surface-mount and through-hole pads, respectively.
Statistic
D3-B test
D3-B ref
RouteDemos
D2
All-THT boards
0.262
0.291
0.297
0.000
All-front SMD
0.615
0.620
0.621
0.005
Two-pad nets
0.610
0.600
0.616
0.601
Three-pad nets
0.194
0.195
0.193
0.199
Appendix
Table 5: Selected proportions. Proportions are fractions, not percentages.
Statistic
Sampling model
Size WH , net density
Lognormal
Log aspect ratio
Point mass and half-normal
Netclass sets, layer fractions, Pi
Empirical resampling
Pad dimensions and drill
Empirical, conditional on type
Same-net MST edge length /d
Lognormal locality
Appendix
Table 6: D3-B ref sampling models before connection acceptance.
Hyperparameter
Value
Architecture
Transformer layers
6
Embedding width
256
Attention heads
8
Feed-forward width
1,024
Parameters
6.79M
Appendix
Table 7: Architecture and PPO hyperparameters shared by all policies. lists the settings that differ between runs.
Setting
Cadet
Scratch
PPO (D2)
Initialization
BC
Random
Random
Obstacle / shape / net constraints
Enabled
Enabled
Disabled
Outline representation
Native arcs
Native arcs
Polygonal
Edge midpoint encoding
Enabled
Enabled
Disabled
KL coefficient
0.05
0
0
Critic warm-up (iterations)
10–50
0
0
Appendix
Table 8: Configured policy differences. Scratch denotes PPO on RouteDemos, its variant without TryConnect, or D3-B ref. Warm-up values denote configured minimum and maximum lengths, not measured durations.
(a) t=0 , net_select (net 1)
(b) t=1 , start_route (19.2, 12.4, F.Cu)
(c) t=2 , make_line (14.4, 13.0, walkaround)
(d) t=3 , start_route (12.0, 11.9, F.Cu)
(a) t=4 , make_line (14.4, 13.0, walkaround)
(b) t=5 , net_end ()
(a) t=6 , net_select (net 2)
(b) t=7 , start_route (6.8, 8.2, F.Cu)
(c) t=8 , make_via (1.8, 3.2, walkaround)
(d) t=9 , start_route (1.8, 3.2, B.Cu)
(a) t=10 , make_line (2.8, 3.1, walkaround)
(b) t=11 , start_route (8.7, 7.7, F.Cu)
(c) t=12 , make_line (6.8, 8.2, walkaround)
(d) t=13 , net_end ()
Method
CP
ΔΦ
Rout.
WL
Vias
DRVs
Time
D3-B test (141)
Reference
100.0
144.41
100.0
575
6.6
0.00
–
FreeRouting @1
65.6 ± 4.1
119.33 ± 3.22
96.8 ± 0.1
527 ± 5
4.1 ± 0.2
1.14 ± 0.22
45.6 ± 6.0
KRT @1
27.7
84.71
78.3
463
14.7
8.23
2.7
GPT-6 Astra @1
56.0
104.20
86.0
466
7.5
6.81
491.7
GPT-6 Luna @1
5.0
37.72
47.9
203
2.0
23.37
335.7
Appendix
Table 9: Full evaluation results as mean ± standard deviation over four training seeds for the learned methods and over four runs for FreeRouting. KRT and the LLM agents ran once and have no standard deviation. All methods except Cadet @3 use one rollout per run. CP and Rout. are in percent, WL is in millimeters, and Time is in seconds per board.
Method
β
Critic detached
CP
ΔΦ
Rout.
Vias
PPO (RouteDemos)
–
no
38.0 ± 6.2
96.0
92.0
4.8
Cadet
0.05
yes
67.2 ± 1.8
107.2
91.7
10.4
0
yes
64.0 ± 3.4
109.1
90.1
7.7
0.05
no
66.5 ± 1.5
107.7
91.0
10.1
0
no
63.3 ± 2.9
109.1
88.7
6.8
Appendix
Table 10: Effect of fine-tuning settings on D3-B test. CP and Rout. are in percent. CP is the mean ± standard deviation over four training seeds. Vias is the mean via count per board.
D3-B test
D3-A
Method
Mean
95% CI
Mean
95% CI
Cadet @1
67.2
[64.3, 70.1]
89.5
[87.9, 91.1]
Cadet @3
79.8
[79.4, 80.3]
96.3
[95.8, 96.8]
Cadet (BC)
43.1
[39.8, 46.4]
83.2
[82.0, 84.5]
PPO (RouteDemos)
38.0
[28.2, 47.8]
80.2
[72.7, 87.7]
PPO (D2)
40.4
[36.9, 43.9]
78.4
[73.2, 83.6]
Appendix
Table 11: 95% CIs of CP, from the t distribution over four training seeds for the learned methods and over four runs for FreeRouting. Bottom: the fine-tuning variants of on D3-B test.
Figure 8: D3-B test CP and ΔΦ during training, averaged over five rollouts per board. Lines are means over four training seeds, and bands span the minimum and maximum. Cadet (BC) steps are rescaled so that the steps before fine-tuning span 300 iterations. The dotted line marks the start of Cadet fine-tuning.
Component
Specification
Board attribute distributions and fitted values
§ , Appendix ,
Construction and TryConnect search
Algorithms and , Appendix
Replay, repair, pruning, and acceptance
§ , Algorithm
Pad-count calibration
Appendix , Equation ( )
Generation cost and acceptance rate
Appendix
Data splits and board counts
§ , Appendix
Appendix
Table 12: Location of the specification for each component.
Training
Method
Training data
RL iterations
Data generation (CPU only)
BC (RTX PRO 6000 × 4)
RL (L40 × 1)
PPO
D3-B ref
500
–
–
177
PPO
RouteDemos
500
146
–
135
Cadet
RouteDemos
200
146
97
85
Appendix
Table 13: Approximate cost of data generation and training in hours. Data generation is for a single server and includes the independent replay of the demonstrations (Appendix ). The 200 fine-tuning iterations of Cadet include the critic warm-up. Training times are for a single run.
Figure 10: State format description inserted into the system prompt (a) and user prompt template (b) of the LLM agents.
Placeholder
Content
{state_format_desc}
State format description in (a), inserted into the system prompt
{board_static}
Board outline, nets with pad locations, and obstacles in S-expression form
{current_step}
Current step index
{dynamic_observation}
Per-net tracks, vias, and unconnected points, and the routing head state
{valid_step_count}
Number of valid actions taken so far
{action_history}
Last four steps, each marked “[no effect]” if it made no progress
Appendix
Table 14: Placeholders in the LLM agent prompt.
Method
WL
Vias
Reference
540
3.9
Demonstration search
553
6.0
Appendix
Table 15: Demonstration search and human layouts on the 88 D3-B ref boards where the search reached a clean pass. Reference is the original human layout. WL is in millimeters.