finds.dev← search

// the find

N-Wouda/ALNS

★ 638 · Python · MIT · updated Feb 2025

Adaptive large neighbourhood search (and more!) in Python.

A clean Python implementation of Adaptive Large Neighbourhood Search, a metaheuristic for combinatorial optimization problems like TSP, VRP, and scheduling. You bring the destroy/repair operators for your specific problem; the library handles the adaptive weight updating, acceptance criteria, and stopping conditions. Published in JOSS, so it has gone through peer review.

Multiple acceptance criteria out of the box — simulated annealing, great deluge, record-to-record travel, late acceptance hill climbing — covering most of what you'd reach for in practice. The operator selection layer is properly separated: roulette wheel, segmented roulette wheel, and MAB-based selection via MABWiser are all plug-and-play. Test coverage is thorough with each acceptance and selection scheme having its own test file. Five worked Jupyter notebooks covering real problem classes means you can see exactly how the pieces fit before writing a line of your own code.

Last push was February 2025 and activity has slowed noticeably — open issues may sit. The library gives you the framework but absolutely nothing for constructing initial solutions or common destroy/repair operators; if you're new to ALNS you'll spend most of your time on the parts the library doesn't touch. Performance is pure Python with numpy, which is fine for moderate instances but will hurt on large-scale problems where a C++ solver would run circles around it. No parallelism support — each iteration is sequential, so wall-clock time scales poorly if your operators are expensive.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →