Skip to main content

A solver based on Heuristic Tree Search

Project description

Tree Search Solver (Python)

A solver based on heuristic tree search.

This is the Python3 version of the C++ package fontanf/treesearchsolver.

treesearch

image source

Description

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

Examples

Travelling Salesman Problem

Usage, running examples from command line

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

Usage, Python library

See examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treesearchsolverpy-0.0.5.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

treesearchsolverpy-0.0.5-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page