Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP.
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] § 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. 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § 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
- """
- CVRP Ant Colony Optimization solver.
- Adapted from problems/cvrp_aco/aco.py for standalone use in Experiment.
- """
- import torch
- from torch.distributions import Categorical
- class ACO:
- def __init__(self, distances, demand, heuristic, capacity,
- n_ants=30, decay=0.9, alpha=1, beta=1, device='cpu'):
- """
- Args:
- distances: (n, n) distance matrix (includes depot at index 0)
- demand: (n,) demand vector (depot demand = 0)
- heuristic: (n, n) heuristic matrix
- capacity: vehicle capacity
- """
- self.problem_size = len(distances)
- self.distances = torch.tensor(distances, dtype=torch.float32, device=device) \
- if not isinstance(distances, torch.Tensor) else distances.to(device)
- self.demand = torch.tensor(demand, dtype=torch.float32, device=device) \
- if not isinstance(demand, torch.Tensor) else demand.to(device)
- self.capacity = capacity
- self.n_ants = n_ants
- self.decay = decay
- self.alpha = alpha
- self.beta = beta
- self.pheromone = torch.ones_like(self.distances)
- self.heuristic = torch.tensor(heuristic, dtype=torch.float32, device=device) \
- if not isinstance(heuristic, torch.Tensor) else heuristic.to(device)
- self.shortest_path = None
- self.lowest_cost = float('inf')
- self.device = device
- @torch.no_grad()
- def run(self, n_iterations):
- for _ in range(n_iterations):
- paths = self.gen_path()
- costs = self.gen_path_costs(paths)
- best_cost, best_idx = costs.min(dim=0)
- if best_cost < self.lowest_cost:
- self.shortest_path = paths[:, best_idx]
- self.lowest_cost = best_cost
- self.update_pheromone(paths, costs)
- return self.lowest_cost
- @torch.no_grad()
- def update_pheromone(self, paths, costs):
- self.pheromone = self.pheromone * self.decay
- for i in range(self.n_ants):
- path = paths[:, i]
- cost = costs[i]
- self.pheromone[path[:-1], torch.roll(path, shifts=-1)[:-1]] += 1.0 / cost
- self.pheromone[self.pheromone < 1e-10] = 1e-10
- @torch.no_grad()
- def gen_path_costs(self, paths):
- u = paths.permute(1, 0) # (n_ants, seq_len)
- v = torch.roll(u, shifts=-1, dims=1)
- return torch.sum(self.distances[u[:, :-1], v[:, :-1]], dim=1)
- def gen_path(self):
- actions = torch.zeros((self.n_ants,), dtype=torch.long, device=self.device)
- visit_mask = torch.ones(size=(self.n_ants, self.problem_size), device=self.device)
- visit_mask = self.update_visit_mask(visit_mask, actions)
- used_capacity = torch.zeros(size=(self.n_ants,), device=self.device)
- used_capacity, capacity_mask = self.update_capacity_mask(actions, used_capacity)
- paths_list = [actions]
- done = self.check_done(visit_mask, actions)
- while not done:
- actions = self.pick_move(actions, visit_mask, capacity_mask)
- paths_list.append(actions)
- visit_mask = self.update_visit_mask(visit_mask, actions)
- used_capacity, capacity_mask = self.update_capacity_mask(actions, used_capacity)
- done = self.check_done(visit_mask, actions)
- return torch.stack(paths_list)
- def pick_move(self, prev, visit_mask, capacity_mask):
- pheromone = self.pheromone[prev]
- heuristic = self.heuristic[prev]
- dist = ((pheromone ** self.alpha) * (heuristic ** self.beta)
- * visit_mask * capacity_mask)
- dist = dist.clamp(min=1e-30)
- cat = Categorical(dist)
- actions = cat.sample()
- return actions
- def update_visit_mask(self, visit_mask, actions):
- visit_mask = visit_mask.clone()
- visit_mask[torch.arange(self.n_ants, device=self.device), actions] = 0
- visit_mask[:, 0] = 1 # depot can always be revisited
- # Exception: cannot revisit depot if there are still unvisited customers
- visit_mask[(actions == 0) * (visit_mask[:, 1:] != 0).any(dim=1), 0] = 0
- return visit_mask
- def update_capacity_mask(self, cur_nodes, used_capacity):
- capacity_mask = torch.ones(size=(self.n_ants, self.problem_size), device=self.device)
- used_capacity = used_capacity.clone()
- used_capacity[cur_nodes == 0] = 0
- used_capacity = used_capacity + self.demand[cur_nodes]
- remaining = self.capacity - used_capacity
- remaining_repeat = remaining.unsqueeze(-1).repeat(1, self.problem_size)
- demand_repeat = self.demand.unsqueeze(0).repeat(self.n_ants, 1)
- capacity_mask[demand_repeat > remaining_repeat] = 0
- return used_capacity, capacity_mask
- def check_done(self, visit_mask, actions):
- return (visit_mask[:, 1:] == 0).all() and (actions == 0).all()
cvrp_aco.py at commit cc02b2d, no license · at the source
Overview
- School of Finance, Jiangxi University of Finance and Economics, Nanchang 330013, China
- Software College, Northeastern University, Shenyang 110169, China
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
cc02b2d11b4dc455145f8509f8f41d8b7b2ca71f, 24 June 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
27 files
- __init__.py, Python, 15 lines
- __main__.py, Python, 13 lines
- aco_solver/
__init__.py , Python, 1 line - aco_solver/
cvrp_aco.py , Python, 118 lines, 3 matches - aco_solver/
tsp_aco.py , Python, 100 lines, 2 matches - baselines/
__init__.py , Python, 1 line - baselines/
ael_adapter.py , Python, 132 lines - baselines/
deep_aco.py , Python, 274 lines - baselines/
ghpp.py , Python, 472 lines, 1 match - baselines/
human_designed.py , Python, 128 lines, 1 match - baselines/
reevo_adapter.py , Python, 199 lines - data/
__init__.py , Python, 1 line - data/
generator.py , Python, 171 lines - evaluation/
__init__.py , Python, 1 line - evaluation/
cost_tracker.py , Python, 124 lines - evaluation/
evaluator.py , Python, 193 lines - evaluation/
metrics.py , Python, 209 lines - evolved_heuristics/
__init__.py , Python, 1 line - evolved_heuristics/
cvrp_evolved.py , Python, 113 lines - evolved_heuristics/
tsp_evolved.py , Python, 101 lines, 2 matches - main_experiment.py, Python, 729 lines
- run.py, Python, 22 lines
- visualization/
__init__.py , Python, 1 line - visualization/
plotter.py , Python, 300 lines - visualization/
report_builder.py , Python, 262 lines, 1 match - visualization/
table_generator.py , Python, 180 lines - README.md, Text, 102 lines
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://
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://
BibTeX
@article{wu2026evolution
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/
url = {https://
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/
VL - 11
IS - 7
SP - 516
SN - 2313-7673
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3390/
"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":
"volume": "11",
"issue": "7",
"page": "516",
"DOI": "10.3390/
"PMID": "42505549",
"PMCID": "PMC13406755",
"ISSN": "2313-7673",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://
"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: NatureIn 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 reportsIn 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 genomicsIn 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 communicationsIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 26 scripts, and 10 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:98dd22ec45f1a415…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
