AN INDEPENDENT RESEARCH PROJECT · 2026
HBALS v2Travelling Salesman ProblemCombinatorial optimisation

A hybrid search for
better tours.

Hybrid Bees Algorithm with 2-opt Local Search for the Travelling Salesman Problem

HBALS combines a Bees Algorithm search structure with focused local improvement. Version 2 evaluates the method through equal move-evaluation budgets, component ablation, non-parametric statistics and run-by-run verification.

EKErfan KhadivSole author · design, implementation and experiments
Zenodo preprint · submitted to Croatian Operational Research Review · not yet peer reviewed
SEARCH LANDSCAPE / TSP HBALS v2
01020304050607080910 CITYSEARCH SITEILLUSTRATIVE TOUR
10 CITIES / ILLUSTRATIVE TOURConceptual illustration · not an experimental result
12Main TSPLIB instances
3Larger instances
6Compared methods
2,240Reported experiment runs
1.25Best average rank · of 6
0.299%Mean gap · main study
01 / OVERVIEW

The research question

A fair comparison of hybrid search—not simply a contest against weak baselines.

AABSTRACT / PROJECT SUMMARY

HBALS is a population-based metaheuristic for the Travelling Salesman Problem. It starts from a mixed set of nearest-neighbour and random tours, allocates search effort to elite and selected sites, and replaces the remaining population with scouts. Local improvement is applied selectively through first-improvement 2-opt and a lightweight segment-reversal operation.

The v2 study asks whether the Bees-style search contributes value when competing methods use the same 2-opt semantics and receive the same move-evaluation budget. It also tests which design components matter through a controlled ablation.

MetaheuristicsLocal searchTSPLIBEqual-budget evaluation
?
CENTRAL RESEARCH QUESTION

When every method receives the same local-search operator and the same computational budget, how much value does a Bees-style population search add—and which HBALS components actually help?

02 / PROBLEM

The Travelling Salesman Problem

A classic combinatorial optimisation problem with a simple objective and a difficult search space.

Given a set of cities and pairwise travel costs, the task is to find a minimum-length closed tour that visits every city exactly once and returns to its starting point.

The study uses TSPLIB EUC_2D instances. Distances are Euclidean and rounded to the nearest integer as specified by the TSPLIB convention used in the implementation.

ScopeSymmetric Euclidean TSP · EUC_2D benchmarks
OBJECTIVE
minπ Σi = 1n dπᵢ, πᵢ₊₁

with πₙ₊₁ = π₁ and each city appearing exactly once in the permutation π.

Tour lengthPermutation
03 / METHOD

Inside the HBALS search

The final v2 configuration uses a fixed one-swap neighbourhood and distributes the search budget across three types of sites.

01
↗

Initial population

Create 20 tours: 10 nearest-neighbour tours from different starting cities and 10 random permutations.

20 tours · 50% NN seeds
02
≋

Rank and recruit

Sort the population by tour length. Recruit 8 candidates at each of 3 elite sites and 4 candidates at each of the next 9 selected sites.

3 elite · 9 selected · 8 scouts
03
⌁

Perturb and improve

Each recruited candidate receives one random swap. Elite candidates may receive 2-opt and, occasionally, a lightweight segment reversal; selected candidates may receive a shorter 2-opt search.

First-improvement 2-opt
04
↻

Scout replacement

The 8 unselected population members are replaced by fresh random tours. The best-so-far solution is retained across generations.

8 fresh scouts · elitist best-so-far
FINAL CONFIGURATION

Key parameters

Values below describe the final method used in the reported v2 experiments.

20Population size
3Elite sites
9Selected sites
8Scout sites
8 / 4Elite / selected recruits
1Swap per perturbation
70%Elite 2-opt probability
30%Selected-site 2-opt probability
10%Elite segment-reversal probability
20 / 10Elite / selected 2-opt move caps
3Segment-reversal tries
300HBALS-iteration equivalent budget
i

The adaptive-neighbourhood rule from the earlier version was removed. The final reported configuration uses a fixed neighbourhood size of one swap (adapt = 2, ngh = 1). The ablation section below shows how adaptive and larger neighbourhood variants performed in the v2 study.

04 / EXPERIMENTAL DESIGN

A controlled benchmark study

Methods are compared under the same instance-specific move-evaluation budget, with shared 2-opt semantics wherever local search is used.

12

Main benchmark group

51–198 cities · 20 independent runs per method (plain BA: 10)

eil51 · berlin52 · st70 · eil76 · kroA100 · kroB100 · eil101 · lin105 · ch130 · ch150 · rat195 · d198
03

Larger instances

200–318 cities · 10 independent runs per method

kroA200 · a280 · lin318
07

Ablation variants

Seven component variants compared with full HBALS on four instances, 20 runs per variant.

st70 · kroA100 · ch130 · d198
06

Comparison methods

All six methods receive an instance-specific, equal evaluation budget.

HBALSILS-2optGA-2optACO-2optMS-2optBA
WHAT COUNTS AS AN EVALUATION?

A machine-independent budget unit

Each algorithm is charged for its principal search operations. The per-instance budget is set to the evaluation count used by 300 HBALS iterations, then shared by all methods on that instance.

12-opt / segment-reversal delta
4Swap delta
NFull tour-length calculation
N² / 2Ant construction
NOrder crossover
PRIMARY OUTCOME

Mean percentage gap to the best-known solution

Lower is better. Main-study averages across 12 instances.

Logarithmic bar scale · exact values shown at right

Main benchmark results

Mean gap (%) · 20 runs (BA: 10)
InstanceNBKSHBALSILS-2optGA-2optACO-2optMS-2optBA

All values are mean percentage gaps across independent runs. They are not best-run values. The data explorer below provides the saved convergence curves by instance and method.

Larger-instance results

Mean gap (%) · 10 runs per method
InstanceNBKSHBALSILS-2optGA-2optACO-2opt
kroA20020029,3680.4630.7121.41611.293
a2802802,5792.5820.6551.79120.396
lin31831842,0292.6031.7162.61413.209

The larger-instance study is exploratory and contains 10 independent runs per method. ILS-2opt has lower mean gaps than HBALS on a280 and lin318; this is an important boundary on the main-study result.

05 / ANALYSIS

Statistical evidence & ablation

Performance is reported with statistical context, and design choices are examined rather than treated as assumptions.

FRIEDMAN TEST · 6 METHODS55.024χ² statisticp = 1.29 × 10⁻¹⁰
AVERAGE RANK1.25HBALS · best among six methodsILS-2opt: 1.96
HOLM-ADJUSTED WILCOXON4 / 5Significant pairwise winsILS-2opt: p = 0.1294 · not significant
INDEPENDENT VERIFICATION124 / 124Identical experiment blocksTour lengths · evaluations · iterations
WHAT THE TESTS SAY

Strong on the main set, not universally dominant.

The Friedman test detects an overall difference among the six methods on the 12 main instances. Holm-adjusted Wilcoxon signed-rank tests on instance means show HBALS significantly ahead of GA-2opt, ACO-2opt, MS-2opt and plain BA (adjusted p = 0.00244 for each). The HBALS–ILS-2opt comparison is not significant (adjusted p = 0.1294): HBALS has the lower mean gap on 9 instances, while ILS has the lower mean gap on 3.

The larger set adds context: ILS-2opt has lower mean gaps than HBALS on a280 and lin318. These results support a competitive outcome on the main benchmark set, not a claim of universal superiority.

Final percentage-gap distributions for five methods on selected TSPLIB instances
Final-gap distributionsIndependent-run distributions for selected main benchmarks. Plain BA is omitted from this view because its much larger gaps would compress the local-search methods.
COMPONENT ABLATION · 4 INSTANCES

Which parts of HBALS matter?

Mean percentage gap across st70, kroA100, ch130 and d198 · 20 runs per variant.

HBALS component ablation plot comparing full HBALS with seven variants
Ablation studyLower mean gap is better. The full configuration is the reference row.
VariantMean gapΔ vs full

Descriptively, removing elite-site 2-opt raises mean gap from 0.275% to 0.818%; using adaptive neighbourhood raises it to 1.030%, and a neighbourhood size of three raises it to 1.687%. Removing selected-site 2-opt or segment reversal does not worsen the four-instance mean in this ablation. These are ablation-set observations, not a universal causal guarantee.

Anytime convergence curves from the HBALS v2 equal-budget experiments
Anytime performanceMean gap to best-known solutions over equal-budget progress on selected instances.
INTERPRETATION

Evidence with boundaries.

A good average rank is not proof that one method wins every instance. HBALS is competitive on the main group and shows a favourable mean gap, while ILS remains a statistically similar comparator and performs better on two of the three larger cases.

06 / SAVED EXPERIMENT DATA

Explore convergence by instance

This chart reads the saved Python experiment curves—not the live browser preview. Choose any of the 15 reported instances.

Saved run-level curves · v2

Each curve is the mean of saved run-level best-so-far curves, sampled at 1% increments of the same instance-specific evaluation budget. The y-axis is logarithmic.

07 / INTERACTIVE LAB

Run HBALS in your browser

An interactive JavaScript port of the final v2 search procedure. Select a TSPLIB instance or add your own points.

HBALS v2 · INTERACTIVE PREVIEWeil51
Iteration 0/80Best tour —
Choose a TSPLIB benchmark
426best-known length
—gap to BKS
0move evaluations
0 / 80 preview iterations

This browser implementation follows the final v2 configuration: 20 solutions, 3 elite sites, 9 selected sites, 8 scouts, one-swap perturbations and no adaptive neighbourhood. The preview uses a shorter, user-selected iteration cap for responsiveness. It is not a reproduction of the paper’s fixed-budget Python experiment. Click or tap the map to add a city.

Preparing the search…

  • City
  • Added city
  • Search marker
  • Best route
Two distinct views of the research

The browser lab is designed for exploration and visual understanding. The experiment explorer above reads saved Python averages and anytime curves from the completed v2 study. Use the research tables and repository for formal reported results.

08 / REPRODUCIBILITY

Code, data & verification

The research repository contains the implementation, source instances, per-run records, convergence arrays, analysis scripts and independent reference outputs.

VERIFY THE PORT

Independent run-by-run check

124/ 124

All supplied comparison blocks matched on tour lengths, evaluation counts and iteration counts between the author's Windows 11 run and the independent Linux reference run.

View comparison report ↗
REPOSITORY MAP

What is included in v2

v2/src/Numba algorithm implementations, runner, statistics and validation scripts
v2/data/21 TSPLIB EUC_2D files: 15 reported, 4 tuning-only and 2 unused
v2/results/csv/Run-level experiment records
v2/results/conv/Saved best-so-far convergence arrays
v2/results/tables/Main, large-instance, ablation and statistical tables
v2/results/figures/Publication-quality study figures
PREPRINT & CITATION

HBALS: A Hybrid Bees Algorithm with 2-opt Local Search for the Travelling Salesman Problem, Evaluated by Ablation and Equal-Budget Comparison

Khadiv, E. (2026). Zenodo preprint. DOI: 10.5281/zenodo.23621275.

@misc{khadiv2026hbals,
  author       = {Khadiv, Erfan},
  title        = {HBALS: A Hybrid Bees Algorithm with 2-opt Local Search for the Travelling Salesman Problem, Evaluated by Ablation and Equal-Budget Comparison},
  year         = {2026},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.23621275},
  url          = {https://doi.org/10.5281/zenodo.23621275}
}

This project website reports the supplied v2 study and preprint. The preprint has not been peer reviewed; journal submission does not imply acceptance. Benchmark results are specific to the included EUC_2D instances, implementations and evaluation protocol.