hamidds / Astar-Search

A-star Search on a matrix.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Astar-Search

A-star Search on a matrix with a cool console output.

Usage

  1. place your grid in matrix.txt. (Grid should be 10*10).
    • Person cell should be P, Goal cell should be G, 1 for invalid cells, an 0 for valid cells.
  2. Run astar.py!

Example

  • my grid:
    • 6 is my cell.
    • 5 is goal cell.
    • 1s are walls.
    • 0s are valid cells.

Grid

  • answer grid:
    • The blue path is the answer.
    • The cell's coordinates also will be printed.

Answer_grid

About

A-star Search on a matrix.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%