Skip to main content

Heuristic Searches

Project description

Heuristic Searches

This module contains functions to perform a* search and ao* search algorithms

Installation

Run the following command to install:

    pip install heuristicsearch

Useage

from a_star_search import AStar
from ao_star import AOStar
# object creation Astar(adjacency_list -> dictionary, heuristic_values -> dicitonary)
# call the apply_a_star method to find the shortest path
adjacency_list = {
    'A': [('B', 1), ('C', 3), ('D', 7)],
    'B': [('D', 5)],
    'C': [('D', 12)]
}

heuristics = {'A':1, 'B':1, 'C':1, 'D':1}

graph1 = AStar(adjacency_list, heuristics)
graph1.apply_a_star(start='A',stop='B')
# similar approach for AOStar
# object creation AOStar(adjacency_list -> dictionary, heuristic_values -> dicitonary, startNode)
# call apply_AOStar method

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

heuristicsearch-0.0.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

heuristicsearch-0.0.4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file heuristicsearch-0.0.4.tar.gz.

File metadata

  • Download URL: heuristicsearch-0.0.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for heuristicsearch-0.0.4.tar.gz
Algorithm Hash digest
SHA256 76d58820201ec6c1d85f8c1053d758a87f179b2d64d5a90ee53b6d228f10474a
MD5 dbed3ebcb514bd039864f604ca8ad3ed
BLAKE2b-256 34df848b291f65b42e9b642b5338a28f4617bc720e8b5a6d9d03743b453bff4c

See more details on using hashes here.

File details

Details for the file heuristicsearch-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: heuristicsearch-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for heuristicsearch-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fac4a41bc2263720d97403cd08faa7c5a0b86a115ed591f6fcb85518c7c25500
MD5 8c4a1dda59892a089da3a43f6b9af37a
BLAKE2b-256 da42a0eede1406cb77b0f409894443feea8edd3f69cb3ed4fe3c2a9bc87eccd9

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