Travelling Salesman on Canvas
The Travelling Salesman Problem (TSP) serves as the canonical benchmark for discrete combinatorial optimization, robotic toolpath sequencing, and assembly logistics in parametric design.
Grasshopper definitions of the three integer-slider instances and the two random-key controls are in Demo Definitions.
Combinatorial Challenges in Grasshopper
Grasshopper's native computational architecture is fundamentally continuous, operating on floating-point number sliders. Optimizing discrete permutation problems—such as CNC rapid-travel toolpaths, waterjet nesting cuts, continuous 3D-printing extrusion paths, or structural crane assembly sequences—requires a mapping mechanism from continuous slider values to discrete visit orders.
Unlike synthetic continuous test functions where global minima may be trivial or artificial, Euclidean TSP instances provide an unarguable mathematical ground truth. While structural finite-element or building energy simulations depend on mesh discretization and numerical convergence, the exact minimum tour length of a Euclidean TSP is known definitively down to the decimal point through the Held–Karp dynamic programming algorithm (Held & Karp, 1962).
Exact Mathematical Ground Truth (Held-Karp)
The SilverHawk benchmark suite evaluates solvers against three standardized instances generated as uniform random coordinates within a
| Problem Instance | Cities ( | Candidate Search Space | Exact Held-Karp Minimum | Evaluation Budget |
|---|---|---|---|---|
| TSP-10 | 10 | 39.06 cm | 1,200 FEs (10 runs) | |
| TSP-15 | 15 | 44.78 cm | 1,200 FEs (10 runs) | |
| TSP-20 | 20 | 48.46 cm | 1,200 FEs (10 runs) |
Having provable mathematical optima allows rigorous calculation of the optimality gap:
where
The SilverEye DataTree Trap vs. Normalized Random-Keys
In 2017, the developers of SilverEye (Cichocka et al., 2017) distributed an official TSP tutorial as an architectural benchmark for particle swarm optimization in Grasshopper. However, that definition introduced a severe mathematical artifact:
Variant 1: DataTree Integer Encoding (Many-to-One)
- Each city
received an integer number slider . - Sliders fed the path input of a DataTree
Graft, assigning each city to a branch/{branch_id}/. - When multiple cities shared the same slider integer, they clumped into the same branch and were visited in their arbitrary canvas input order.
- The Plateau Trap: For a 20-city problem, there are
slider combinations mapping to only valid tours. This produces vast multi-dimensional fitness plateaus where mutations cause zero change ( ), punctuated by cliffs when an integer flips.
Variant 2: Ambrosini Normalized Random-Keys (Bijective)
- Continuous floating-point sliders in the unit interval
serve as sorting keys. - Cities are sequenced strictly in ascending order of their continuous values (
argsort). - Because the probability of two continuous floating-point sliders having the exact same value is zero, this guarantees:
- Zero DataTree clumping: Every city has a distinct sorting rank, eliminating fallback to canvas input order.
- Smooth topological neighborhoods: Small slider perturbations produce localized adjacent swaps, preserving search gradients.
- Piecewise smoothness: Enables advanced metaheuristics (CMA-ES, MERLIN, L-SHADE) to adapt covariance matrices and mutation vectors effectively.
Exploration Trail Across 16 Solvers (TSP-20)
The figure below documents the full benchmark campaign on the 20-city instance, comparing 16 optimization engines (11 SilverHawk solvers and 5 external configurations) across 10 independent runs (1,200 evaluations each):

Performance Ranking & Statistical Analysis
| Rank | Solver | Family | Best (cm) | Mean ± SD (cm) | Median (cm) | Gap of median (%) |
|---|---|---|---|---|---|---|
| 1 | CMA-ES | SilverHawk | 51.04 | 54.28 ± 1.69 | 54.29 | 12.0 |
| 2 | MERLIN | SilverHawk | 49.32 | 55.32 ± 5.47 | 55.63 | 14.8 |
| 3 | PSO | SilverHawk | 55.39 | 60.68 ± 2.91 | 61.00 | 25.9 |
| 4 | Opossum-RBFOpt | External | 50.24 | 61.91 ± 7.89 | 63.00 | 30.0 |
| 5 | Opossum-CMA-ES | External | 51.82 | 66.21 ± 11.91 | 65.22 | 34.6 |
| 6 | RAPTOR | SilverHawk | 59.23 | 67.25 ± 4.81 | 68.29 | 40.9 |
| 7 | STRIKE-AS † | SilverHawk | 56.43 | 67.69 ± 7.97 | 66.27 | 36.8 |
| 8 | SilverEye | External | 58.85 | 68.55 ± 8.68 | 66.98 | 38.2 |
| 9 | L-SHADE-RSP | SilverHawk | 64.27 | 70.72 ± 4.93 | 70.27 | 45.0 |
| 10 | L-SHADE-SW | SilverHawk | 63.87 | 71.56 ± 6.12 | 70.62 | 45.7 |
| 11 | Galapagos-GA | External | 64.38 | 72.16 ± 5.93 | 73.12 | 50.9 |
| 12 | Tunny-TPE (n = 3) | External | 69.08 | 72.54 ± 3.26 | 73.00 | 50.6 |
| 13 | jEDE | SilverHawk | 66.92 | 73.46 ± 3.95 | 73.46 | 51.6 |
| 14 | PFO | SilverHawk | 56.32 | 73.67 ± 8.08 | 74.25 | 53.2 |
| 15 | L-SHADE | SilverHawk | 68.32 | 74.27 ± 3.54 | 74.19 | 53.1 |
| 16 | HHO | SilverHawk | 65.54 | 74.32 ± 6.35 | 72.89 | 50.4 |
Ranking by mean best tour length; Held–Karp optimum = 48.46 cm. Gap = (median − optimum) / optimum. Tunny-TPE was run 3 times only (it is slow per evaluation); all other solvers 10 times. The gap is computed on the median, which is robust to the heavy tails of the shorter-sample distributions. † Result from an earlier build of STRIKE-AS (as in the Benchmark Report). Source: Benchmark Report, Table 18 and Fig. S2.
Key Empirical Takeaways
Best single tour. MERLIN found the shortest tour of the campaign (49.32 cm, +1.8% over the optimum), ahead of the best single tour from any external configuration (50.24 cm, Opossum-RBFOpt). Best-of-10 is a lucky-run statistic: it says what the solver can reach, not what you should expect from one run.
Consistency. CMA-ES has the lowest mean (54.28 cm) and the tightest spread (± 1.69 cm). MERLIN trades some spread for a better best-case.
Pairwise tests. Across 20 comparisons (TSP-10, TSP-15, TSP-20 and the Kakamigahara shell, each against the five external configurations; Mann–Whitney with Holm correction), SilverHawk CMA-ES wins 15 and MERLIN 13, with no comparison lost by either.
Wall-clock cost. Surrogate-assisted Opossum-RBFOpt is competitive per evaluation, but model fitting makes a TSP run last 3–25 min, against about 1 min for the SilverHawk population solvers at the same 1,200 evaluations. With a fast model like TSP the time saved is what lets you replicate runs; with a slow simulation the balance can reverse (see Cross-comparison).
Convergence Dynamics

References
- Ambrosini, L. (2026). SilverHawk Benchmark Report 2026: single- and multi-objective optimization in Grasshopper – the complete results of the 2026 benchmark campaigns. Zenodo Technical Report LA-SH-TR-2026-01, v1.0. doi:10.5281/zenodo.23768134
- Ambrosini, L. (2026). Hybrid metaheuristics for architectural design optimization under small evaluation and wall-clock budgets. arXiv:2610.26202 [cs.NE]. https://arxiv.org/abs/2610.26202
- Cichocka, J. M., Browne, W. N., & Rodriguez, E. (2017). SilverEye – The Implementation of Particle Swarm Optimization Algorithm in a Design Optimization Tool. CAADRIA 2017, pp. 145–154. doi:10.52842/conf.caadria.2017.145
- Held, M., & Karp, R. M. (1962). A dynamic programming approach to sequencing problems. Journal of the Society for Industrial and Applied Mathematics, 10(1), 196–210. doi:10.1137/0110015
