OSCR

Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP.

Code ↔ Paper

10 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 10 matches · 3 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § 3. Materials and Methods › 3.3. Compared Methods and Parameter Settings ↔ baselines/human_designed.py, lines 20–29 · score 0.70 · nearest neighbor weighting, inverse distance, Human designed, heuristics
  2. [2] § 2. Related Work and SOTA Positioning › 2.3. Evolutionary Hyper-Heuristics and LLM-Driven Automated Algorithm Design ↔ baselines/ghpp.py, lines 1–16 · score 0.57 · hyper heuristics, genetic programming, evolve, GHPP
  3. [3] § 2. Related Work and SOTA Positioning › 2.3. Evolutionary Hyper-Heuristics and LLM-Driven Automated Algorithm Design ↔ evolved_heuristics/tsp_evolved.py, lines 1–9 · score 0.57 · LLM driven reflective, reflective evolution, ReEvo, evolve, heuristics
  4. [4] § 3. Materials and Methods › 3.3. Compared Methods and Parameter Settings ↔ evolved_heuristics/tsp_evolved.py, lines 23–39 · score 0.55 · nearest neighbor, inverse distance, heuristics
  5. [5] § 3. Materials and Methods › 3.5. Computing Environment, Reproducibility, and Timing Protocol ↔ aco_solver/cvrp_aco.py, the whole file · a weak match · score 0.55 · PyTorch, stack, device, tensors, CPU, pheromone
  6. [6] § 3. Materials and Methods › 3.5. Computing Environment, Reproducibility, and Timing Protocol ↔ aco_solver/tsp_aco.py, the whole file · a weak match · score 0.54 · PyTorch, stack, device, tensors, CPU, pheromone
  7. [7] § 3. Materials and Methods › 3.2. Unified ACO Evaluation Framework ↔ aco_solver/cvrp_aco.py, the whole file · a weak match · score 0.53 · vector, masks, visited, customers, depot, Pheromone
  8. [8] § 2. Related Work and SOTA Positioning › 2.1. Traditional Heuristics and Exact Solving Methods ↔ aco_solver/tsp_aco.py, lines 1–6 · score 0.51 · ant colony, ACO solver, optimization, TSP
  9. [9] § 2. Related Work and SOTA Positioning › 2.2. Neural Combinatorial Optimization Methods ↔ visualization/report_builder.py, lines 199–262 · score 0.50 · neural networks, learn heuristic, GPU, DeepACO, modeling, NCO
  10. [10] § 2. Related Work and SOTA Positioning › 2.1. Traditional Heuristics and Exact Solving Methods ↔ aco_solver/cvrp_aco.py, lines 1–6 · score 0.50 · ant colony, ACO solver, optimization

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 118 lines · 4.8 KB · no license · 3 matches

  1. """
  2. CVRP Ant Colony Optimization solver.
  3. Adapted from problems/cvrp_aco/aco.py for standalone use in Experiment.
  4. """
  5. import torch
  6. from torch.distributions import Categorical
  7. class ACO:
  8. def __init__(self, distances, demand, heuristic, capacity,
  9. n_ants=30, decay=0.9, alpha=1, beta=1, device='cpu'):
  10. """
  11. Args:
  12. distances: (n, n) distance matrix (includes depot at index 0)
  13. demand: (n,) demand vector (depot demand = 0)
  14. heuristic: (n, n) heuristic matrix
  15. capacity: vehicle capacity
  16. """
  17. self.problem_size = len(distances)
  18. self.distances = torch.tensor(distances, dtype=torch.float32, device=device) \
  19. if not isinstance(distances, torch.Tensor) else distances.to(device)
  20. self.demand = torch.tensor(demand, dtype=torch.float32, device=device) \
  21. if not isinstance(demand, torch.Tensor) else demand.to(device)
  22. self.capacity = capacity
  23. self.n_ants = n_ants
  24. self.decay = decay
  25. self.alpha = alpha
  26. self.beta = beta
  27. self.pheromone = torch.ones_like(self.distances)
  28. self.heuristic = torch.tensor(heuristic, dtype=torch.float32, device=device) \
  29. if not isinstance(heuristic, torch.Tensor) else heuristic.to(device)
  30. self.shortest_path = None
  31. self.lowest_cost = float('inf')
  32. self.device = device
  33. @torch.no_grad()
  34. def run(self, n_iterations):
  35. for _ in range(n_iterations):
  36. paths = self.gen_path()
  37. costs = self.gen_path_costs(paths)
  38. best_cost, best_idx = costs.min(dim=0)
  39. if best_cost < self.lowest_cost:
  40. self.shortest_path = paths[:, best_idx]
  41. self.lowest_cost = best_cost
  42. self.update_pheromone(paths, costs)
  43. return self.lowest_cost
  44. @torch.no_grad()
  45. def update_pheromone(self, paths, costs):
  46. self.pheromone = self.pheromone * self.decay
  47. for i in range(self.n_ants):
  48. path = paths[:, i]
  49. cost = costs[i]
  50. self.pheromone[path[:-1], torch.roll(path, shifts=-1)[:-1]] += 1.0 / cost
  51. self.pheromone[self.pheromone < 1e-10] = 1e-10
  52. @torch.no_grad()
  53. def gen_path_costs(self, paths):
  54. u = paths.permute(1, 0) # (n_ants, seq_len)
  55. v = torch.roll(u, shifts=-1, dims=1)
  56. return torch.sum(self.distances[u[:, :-1], v[:, :-1]], dim=1)
  57. def gen_path(self):
  58. actions = torch.zeros((self.n_ants,), dtype=torch.long, device=self.device)
  59. visit_mask = torch.ones(size=(self.n_ants, self.problem_size), device=self.device)
  60. visit_mask = self.update_visit_mask(visit_mask, actions)
  61. used_capacity = torch.zeros(size=(self.n_ants,), device=self.device)
  62. used_capacity, capacity_mask = self.update_capacity_mask(actions, used_capacity)
  63. paths_list = [actions]
  64. done = self.check_done(visit_mask, actions)
  65. while not done:
  66. actions = self.pick_move(actions, visit_mask, capacity_mask)
  67. paths_list.append(actions)
  68. visit_mask = self.update_visit_mask(visit_mask, actions)
  69. used_capacity, capacity_mask = self.update_capacity_mask(actions, used_capacity)
  70. done = self.check_done(visit_mask, actions)
  71. return torch.stack(paths_list)
  72. def pick_move(self, prev, visit_mask, capacity_mask):
  73. pheromone = self.pheromone[prev]
  74. heuristic = self.heuristic[prev]
  75. dist = ((pheromone ** self.alpha) * (heuristic ** self.beta)
  76. * visit_mask * capacity_mask)
  77. dist = dist.clamp(min=1e-30)
  78. cat = Categorical(dist)
  79. actions = cat.sample()
  80. return actions
  81. def update_visit_mask(self, visit_mask, actions):
  82. visit_mask = visit_mask.clone()
  83. visit_mask[torch.arange(self.n_ants, device=self.device), actions] = 0
  84. visit_mask[:, 0] = 1 # depot can always be revisited
  85. # Exception: cannot revisit depot if there are still unvisited customers
  86. visit_mask[(actions == 0) * (visit_mask[:, 1:] != 0).any(dim=1), 0] = 0
  87. return visit_mask
  88. def update_capacity_mask(self, cur_nodes, used_capacity):
  89. capacity_mask = torch.ones(size=(self.n_ants, self.problem_size), device=self.device)
  90. used_capacity = used_capacity.clone()
  91. used_capacity[cur_nodes == 0] = 0
  92. used_capacity = used_capacity + self.demand[cur_nodes]
  93. remaining = self.capacity - used_capacity
  94. remaining_repeat = remaining.unsqueeze(-1).repeat(1, self.problem_size)
  95. demand_repeat = self.demand.unsqueeze(0).repeat(self.n_ants, 1)
  96. capacity_mask[demand_repeat > remaining_repeat] = 0
  97. return used_capacity, capacity_mask
  98. def check_done(self, visit_mask, actions):
  99. return (visit_mask[:, 1:] == 0).all() and (actions == 0).all()

cvrp_aco.py at commit cc02b2d, no license · at the source

Overview

Authors: Haoyuan Wu1, You Wu2
ORCID iDs: Haoyuan Wu
  1. School of Finance, Jiangxi University of Finance and Economics, Nanchang 330013, China
  2. Software College, Northeastern University, Shenyang 110169, China
Journal: Biomimetics (Basel, Switzerland), volume 11, issue 7, article 516
Dates: received 22 June 2026; accepted 19 July 2026; published online 22 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3390/biomimetics11070516 · PMID 42505549 · PMCID PMC13406755 · OpenAlex W7170096698
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), methods / tools (subfield)
Methods: Spectral & time-frequency, Statistics, Machine learning
Keywords: biomimetics, stigmergy, evolutionary computation, genetic programming hyper-heuristics, ant colony optimization, swarm intelligence, large language models
Topic: Slime Mold and Myxomycetes Research (Biomedical Engineering, Engineering), according to OpenAlex
Citations: not cited yet (Europe PMC); 34 references in the paper

Abstract

Biomimetic optimization transfers biological information-processing mechanisms into computational systems. Ant colony optimization (ACO) is a canonical example: artificial ants functionally abstract pheromone-mediated stigmergy, decentralized exploration, trail decay through algorithmic evaporation, and adaptive path reinforcement. Building on this functional biological analogue, we present a controlled cross-paradigm evaluation of routing-heuristic generation. A standardized interface embeds human-designed rules, the genetic programming hyper-heuristic GHPP, a resource-constrained DeepACO-MLP proxy, and an offline ReEvo-style proxy into the same ACO solver. The methods are evaluated on held-out TSP and CVRP instances in terms of solution quality, reported generation or training cost, interpretability, and cross-scale behavior under a matched distribution. GHPP yields the shortest routes at all tested scales; the ReEvo-offline proxy and strong human-designed rules generally form a second tier, whereas the resource-constrained neural proxy degrades markedly as problem size increases. These results do not establish an intrinsic ranking of full-capability paradigms. Instead, they show that method selection depends on the operating constraint and on evidence provenance: longer locally measured offline search favors GHPP, while auditable explicit rules characterize the human and ReEvo-offline proxies. By holding the ant-inspired execution mechanism fixed and varying the source of heuristic information, the benchmark clarifies how evolutionary, neural, and LLM-style design strategies interact with a common biomimetic substrate.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 10 matches between paragraphs and lines of code.

HaoyuanWu-A/NCO

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: cc02b2d11b4dc455145f8509f8f41d8b7b2ca71f, 24 June 2026
Languages: Python (26)
Size: 83 files, 26 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README, environment (pyproject.toml), documentation
Not found: license file, CITATION.cff, tests, continuous integration
Tools: NumPy (13 files), SciPy (5 files), PyTorch (4 files), Matplotlib (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
27 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 26 scripts, each with its path and the digest of its content;
  • 10 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data Availability Statement

Source code, configurations, generated datasets, archived summary results, and figure assets are available at https://github.com/HaoyuanWu-A/NCO (accessed on 24 June 2026, archived revision audited at commit cc02b2d11b4dc455145f8509f8f41d8b7b2ca71f).

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 7 keywords, 1 funder, 18 references.

Cite

This paper

Wu, H., & Wu, Y. (2026). Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP. Biomimetics (Basel, Switzerland), 11(7), 516. https://doi.org/10.3390/biomimetics11070516

BibTeX

@article{wu2026evolutionary,
author = {Wu, Haoyuan and Wu, You},
title = {{Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP}},
journal = {Biomimetics (Basel, Switzerland)},
year = {2026},
month = jul,
volume = {11},
number = {7},
pages = {516},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {2313-7673},
doi = {10.3390/biomimetics11070516},
url = {https://doi.org/10.3390/biomimetics11070516},
pmid = {42505549},
pmcid = {PMC13406755}
}

RIS

TY - JOUR
AU - Wu, Haoyuan
AU - Wu, You
TI - Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP
T2 - Biomimetics (Basel, Switzerland)
J2 - Biomimetics (Basel)
PY - 2026
DA - 2026/07/22
VL - 11
IS - 7
SP - 516
SN - 2313-7673
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/biomimetics11070516
UR - https://doi.org/10.3390/biomimetics11070516
LA - en
ER -

CSL-JSON

{
"id": "10.3390/biomimetics11070516",
"type": "article-journal",
"title": "Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP",
"container-title": "Biomimetics (Basel, Switzerland)",
"author": [
{
"family": "Wu",
"given": "Haoyuan"
},
{
"family": "Wu",
"given": "You"
}
],
"container-title-short": "Biomimetics (Basel)",
"volume": "11",
"issue": "7",
"page": "516",
"DOI": "10.3390/biomimetics11070516",
"PMID": "42505549",
"PMCID": "PMC13406755",
"ISSN": "2313-7673",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://doi.org/10.3390/biomimetics11070516",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
22
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41586-026-10658-6 [code]
An AI system to help scientists write expert-level empirical software.
Journal: Nature
In common: PyTorch, scikit-learn, SciPy, 2 other tools, methods / tools, 1 reference
[2] doi:10.1038/s41598-026-45824-3 [code]
Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks.
Journal: Scientific reports
In common: PyTorch, scikit-learn, SciPy, 2 other tools, methods / tools, 1 reference
[3] doi:10.1016/j.xgen.2026.101217 [code]
ProtoCloud: A prototypical self-explaining model for single-cell analysis.
Journal: Cell genomics
In common: PyTorch, scikit-learn, SciPy, 2 other tools, 1 reference
[4] doi:10.1038/s41467-026-74299-z [code]
Discovering multiscale deep formulas in complex systems via neural-guided lambda calculus.
Journal: Nature communications
In common: PyTorch, scikit-learn, SciPy, 2 other tools, 1 reference
[5] doi:10.3390/biomimetics11040288 [code]
BioLAMR: A Biomimetically Inspired Large Language Model Adaptation Framework for Automatic Modulation Recognition.
Journal: Biomimetics (Basel, Switzerland)
In common: PyTorch, scikit-learn, Matplotlib, 1 other tool, methods / tools, 1 reference
[6] doi:10.3390/s26134045
Brain Signal for Secure EEG Biometric Authentication: A Comprehensive Survey.
Journal: Sensors (Basel, Switzerland)
In common: methods / tools, 1 reference
[7] doi:10.3390/bioengineering13080917 [code]
Pilot Study Employing a Machine Learning Approach as a Potential Method for Predicting Parkinson's Disease Using Voice as a Digital Biomarker and the SHAP Approach for Feature Engineering.
Journal: Bioengineering (Basel, Switzerland)
In common: 1 reference
[8] doi:10.3390/bioengineering13070794
Mamba-Bi-LSTM with SHAP-Guided Iterative Refinement for Multimodal ARDS Diagnosis: A Dual-System Framework.
Journal: Bioengineering (Basel, Switzerland)
In common: 1 reference

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.