starmie

A* algorithm implementation


License
MIT
Install
pip install starmie==1.0

Documentation

Starmie

A* algorithm implementation

                      ▅██▅
       ▅▅▅           █▓█  █      ▅▅▅
       █  ▀▀▅▅      █▓█    █   ▅▀▅▀ █
       █▓▓    ▀▀▅▅ █▓█      █▅▀▅▀  ▓█
       ██▓▓      ▓█▓█   ▅▀▀▅ █▀   ▓▓█
       █▓█▓▓    ▓█▓█    █▓ █  █  ▓▓▓█
        █▓█▓▓ ▅▅█▓█  ▅▅█▓▓  █▅ ▀▅▅▅▅█▅▅▅
      ▅▅██▓███▓  ▀▅▅▀   ▅▅▅▅▅▅▀▅▀  ▓█   ▀▀▀▀▅
 ▅▅▀▀▀▀     ▀██▓      ▅▀▅▅ ▅▅▅▀▅  ▓█▓       █
▀█▅           ▀█▓   ▅▀ ▅▀▅▀   ▀ ▀▅▀█▓▓    ▅▀
  ▀█▓▅        ▅▀  ▅▀ ▅██▀▅████▅▀▅ ▓ █▓▓  ▅▀
    █▓▓▅   ▅▅█    ▓ █▅▅ ████▀▀██▅ █▓▀█▓▓▀
     █▓▓█▀▀       █ ███▓██▓▓  █▀█ █▓  ▀▀▅
     ▅▀██▓▓▓▓▓▓▓▓▓█ ███▓██▓▓▓████▓█▓▓▓▓█   ▀▀▅
   ▅▀   ▀██▀▀█▓▓▓▓▓ ▅▅▅█▅▀█████▀▅██ █▀     █
 ▅▀    ▅█▓▀   █▓▓  █ ▀███▀▅▅▅▅▅█▀█ ▅▀▓▓▓▓▓▅▀
█    ▓▓█▓█    ▓█   ▀▓▅ ▀▅████▓▀▅▀▅▀  █▓▓▓▀
 ▀▓▓▓▓█▓█     ▓▀   ▓▓ ▀▓▅▅▅▅▅▅▀▓▓ ▀▅  █▀
   ▀▀▓█▓█    █   ▅██▅▅▓▓▓   ▅▅██▓▓ █  █
     █▓█    ▓█▅▅▀   ▀▓█▓▓  █▓▓▓  ▀▀▀   █
     █▓▀   ▓▓▓    ▅▅████▓ ███▓▓▓▅▅     █
      █   ▓▓▓▅▅▅▀▀████▓██▓█▀      ▀▀▀▀▀
       ▀▀▀▀▀       ▀█▓█▓▓▀
                   ▀▀▀

Install

$ pip install starmie

Usage

  1. Define class and extends AStarProblem
  2. Define some methods
    • Required: get_start is_goal get_neighbors
    • Recommended: get_path_cost estimate_heuristic_cost
  3. Create object and call solve()

For details, see test scripts.

Test

$ python -m unittest discover tests