Starmie
A* algorithm implementation
▅██▅
▅▅▅ █▓█ █ ▅▅▅
█ ▀▀▅▅ █▓█ █ ▅▀▅▀ █
█▓▓ ▀▀▅▅ █▓█ █▅▀▅▀ ▓█
██▓▓ ▓█▓█ ▅▀▀▅ █▀ ▓▓█
█▓█▓▓ ▓█▓█ █▓ █ █ ▓▓▓█
█▓█▓▓ ▅▅█▓█ ▅▅█▓▓ █▅ ▀▅▅▅▅█▅▅▅
▅▅██▓███▓ ▀▅▅▀ ▅▅▅▅▅▅▀▅▀ ▓█ ▀▀▀▀▅
▅▅▀▀▀▀ ▀██▓ ▅▀▅▅ ▅▅▅▀▅ ▓█▓ █
▀█▅ ▀█▓ ▅▀ ▅▀▅▀ ▀ ▀▅▀█▓▓ ▅▀
▀█▓▅ ▅▀ ▅▀ ▅██▀▅████▅▀▅ ▓ █▓▓ ▅▀
█▓▓▅ ▅▅█ ▓ █▅▅ ████▀▀██▅ █▓▀█▓▓▀
█▓▓█▀▀ █ ███▓██▓▓ █▀█ █▓ ▀▀▅
▅▀██▓▓▓▓▓▓▓▓▓█ ███▓██▓▓▓████▓█▓▓▓▓█ ▀▀▅
▅▀ ▀██▀▀█▓▓▓▓▓ ▅▅▅█▅▀█████▀▅██ █▀ █
▅▀ ▅█▓▀ █▓▓ █ ▀███▀▅▅▅▅▅█▀█ ▅▀▓▓▓▓▓▅▀
█ ▓▓█▓█ ▓█ ▀▓▅ ▀▅████▓▀▅▀▅▀ █▓▓▓▀
▀▓▓▓▓█▓█ ▓▀ ▓▓ ▀▓▅▅▅▅▅▅▀▓▓ ▀▅ █▀
▀▀▓█▓█ █ ▅██▅▅▓▓▓ ▅▅██▓▓ █ █
█▓█ ▓█▅▅▀ ▀▓█▓▓ █▓▓▓ ▀▀▀ █
█▓▀ ▓▓▓ ▅▅████▓ ███▓▓▓▅▅ █
█ ▓▓▓▅▅▅▀▀████▓██▓█▀ ▀▀▀▀▀
▀▀▀▀▀ ▀█▓█▓▓▀
▀▀▀
Install
$ pip install starmie
Usage
- Define class and extends AStarProblem
- Define some methods
- Required:
get_start
is_goal
get_neighbors
- Recommended:
get_path_cost
estimate_heuristic_cost
- Required:
- Create object and call
solve()
For details, see test scripts.
Test
$ python -m unittest discover tests