A solver based on heuristic tree search.
This is the Python3 version of the C++ package fontanf/treesearchsolver.
The goal of this repository is to provide a simple framework to quickly implement algorithms based on heuristic tree search.
Solving a problem only requires a couple hundred lines of code (see examples).
Algorithms:
- Greedy
greedy
- Best First Search
best_first_search
- Iterative Beam Search
iterative_beam_search
Install
pip3 install treesearchsolverpy
Running an example:
mkdir -p data/travellingsalesman/instance
python3 -m examples.travellingsalesman -a generator -i data/travellingsalesman/instance
python3 -m examples.travellingsalesman -a iterative_beam_search -i data/travellingsalesman/instance_50.json
Update:
pip3 install --upgrade treesearchsolverpy
See examples.