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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file treesearchsolverpy-0.0.5.tar.gz.

File metadata

  • Download URL: treesearchsolverpy-0.0.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for treesearchsolverpy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 eb34a2ff7e34c5614fb7fcc8b3ba0f9a5df66e8c430493f55e6434af8844c399
MD5 18ac1dd59a905276e893e65f5b240772
BLAKE2b-256 6a885a80d455236a751d4d40f86d6f9aa24d12d6c6bec6890782a0db6f688f97

See more details on using hashes here.

File details

Details for the file treesearchsolverpy-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: treesearchsolverpy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for treesearchsolverpy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4013cf13caed75be34c9a8f2eaddf0d51956018df9dc0da962abba7457181b
MD5 3a3a2ebd54a5cb73c51163e6f836fa72
BLAKE2b-256 8277eca774fd7e9426ffe8e3e7bd2623c76544dbf09b4902b08f662ccef0f527

See more details on using hashes here.

Supported by

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