paiml/aprender-tsp-poc
0
aprender-tsp POC Models
Pre-trained TSP (Traveling Salesman Problem) optimization models using Ant Colony Optimization, built with aprender-tsp.
Models Included
All models achieve < 5% gap from TSPLIB optimal solutions.
Quick Start
# Install aprender-tsp
cargo install aprender-tsp
# Download a model
huggingface-cli download paiml/aprender-tsp-poc berlin52-aco.apr
# Solve a new instance using the model
aprender-tsp solve -m berlin52-aco.apr your-instance.tsp
# View model info
aprender-tsp info berlin52-aco.apr
# Benchmark against known optimal
aprender-tsp benchmark berlin52-aco.apr --instances berlin52.tspTraining Parameters
All models trained with identical ACO parameters for reproducibility:
Instance Sources
Models are trained on standard TSPLIB benchmark instances:
- berlin52: 52 locations in Berlin, Germany (Groetschel)
- att48: 48 state capitals of the contiguous USA (Padberg/Rinaldi)
- eil51: 51-city problem (Christofides/Eilon)
Reference: TSPLIB
File Format
Models use the .apr binary format:
- Magic bytes:
APR\0 - Version: 1
- CRC32 checksum for integrity
- Compact size: ~77 bytes per model
Solution Quality Tiers
Train Your Own
# Train on your instance
aprender-tsp train your-instance.tsp -o your-model.apr --algorithm aco --iterations 2000 --seed 42
# Or use other algorithms
aprender-tsp train your-instance.tsp -o model.apr --algorithm tabu # Tabu Search (2-opt)
aprender-tsp train your-instance.tsp -o model.apr --algorithm ga # Genetic Algorithm
aprender-tsp train your-instance.tsp -o model.apr --algorithm hybrid # GA + Tabu + ACOCitation
@software{aprender,
title = {Aprender: Machine Learning in Pure Rust},
author = {PAIML},
url = {https://github.com/paiml/aprender},
year = {2025}
}License
MIT License - see LICENSE file.
