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 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
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.1.1.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file heuristicsearch-0.1.1.tar.gz.
File metadata
- Download URL: heuristicsearch-0.1.1.tar.gz
- Upload date:
- Size: 4.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e8a455ef0167b4fe4876fd352e3a6f562ca7c0d60edd89d9c7cc4fa4081112b
|
|
| MD5 |
e4ec29059dbd888390d3a44d9360cb9c
|
|
| BLAKE2b-256 |
b2b66b9a8a733f2be089433d9223abbeb37160ec7883218ca1daad3ea3cc8a08
|
File details
Details for the file heuristicsearch-0.1.1-py3-none-any.whl.
File metadata
- Download URL: heuristicsearch-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66f74d8c6771012c4f86c78501f2a4fbaaf5cbe9f2ab0a48d6d8844b769743ab
|
|
| MD5 |
f865ab00e717c50dd539866ffc810712
|
|
| BLAKE2b-256 |
afa4c1893a495b42b4c47af75bfe261cc214d9631c7b03a6b19fc20a6a36bde2
|