#optimization #solution #problem #approximate #find #algorithm


Find approximate solutions to your optimisation problem using metaheuristics algorithms

22 releases (8 stable)

Uses old Rust 2015

1.1.22 Jul 16, 2022
1.1.20 Feb 14, 2022
1.1.19 Dec 24, 2021
1.0.15 Jul 30, 2018
0.0.2 Jul 11, 2015

#601 in Algorithms

Download history 12/week @ 2024-01-12 19/week @ 2024-01-19 30/week @ 2024-01-26 11/week @ 2024-02-02 13/week @ 2024-02-09 26/week @ 2024-02-16 34/week @ 2024-02-23 25/week @ 2024-03-01 41/week @ 2024-03-08 77/week @ 2024-03-15 96/week @ 2024-03-22 131/week @ 2024-03-29 42/week @ 2024-04-05 25/week @ 2024-04-12 99/week @ 2024-04-19 57/week @ 2024-04-26

234 downloads per month
Used in travelling_salesman

GPL-3.0 license

87 lines


Find approximate solutions to your optimisation problem using metaheuristics algorithms

The aim of this crate is to host various Metaheuristics algorithms. Patches implementing useful algorithms most welcome.

The documentation for this crate can be found here.

What are Metaheuristics

Metaheuristics are a class of stochastic optimisation algorithms. These type of algorithms rely on randomness to jump around the search space, then sample where they land for possible solutions. In simple terms, metaheuristics are structured trial and error.

If you've got a trial and error problem, and individual trials can be compared and ranked against each other, Metaheuristics may be your most viable option at getting good results.

For more information, please see the Metaheuristics Wikipedia article, and Essentials of Metaheuristics.

How can I use this crate

By implementing the Metaheuristics trait, the algorithms within the following modules will be available to you. To see an example implementation, check out the Travelling Salesman Problem crate.


let solution = metaheuristics::hill_climbing::solve(&mut problem, runtime);


Please report any bugs or feature requests at:

Feel free to fork the repository and submit pull requests :)


Alfie John <alfie@alfie.wtf>



Copyright and License

Copyright (C) 2021 to Alfie John

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.


~18K SLoC