Socket
Socket
Sign inDemoInstall

treesearchsolverpy

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    treesearchsolverpy

A solver based on Heuristic Tree Search


Maintainers
1

Readme

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.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc