Skip to main content

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 heuristicsearch.a_star_search import AStar
from heuristicsearch.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

Metadata

Release files for heuristicsearch 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heuristicsearch 0.1.1
File Size Uploaded
heuristicsearch-0.1.1.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for heuristicsearch 0.1.1
File Interpreter ABI Platform
heuristicsearch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / heuristicsearch-0.1.1.tar.gz

Download URL heuristicsearch-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e8a455ef0167b4fe4876fd352e3a6f562ca7c0d60edd89d9c7cc4fa4081112b
BLAKE2b-256 checksum
How to use checksums
b2b66b9a8a733f2be089433d9223abbeb37160ec7883218ca1daad3ea3cc8a08
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / heuristicsearch-0.1.1-py3-none-any.whl

Download URL heuristicsearch-0.1.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66f74d8c6771012c4f86c78501f2a4fbaaf5cbe9f2ab0a48d6d8844b769743ab
BLAKE2b-256 checksum
How to use checksums
afa4c1893a495b42b4c47af75bfe261cc214d9631c7b03a6b19fc20a6a36bde2
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page