Explore - JamesBremner/PathFinder GitHub Wiki
This option finds a minimum cost path from a source node to a destination through costed links in a square 2D grid, when the link cost is only discovered when the link is reached
Input
format
The first line specifies the calculation required. It must contain
format explore
Dimension
Column | Description |
---|---|
1 | d |
2 | size of square 2D grid to construct |
Blocks
Column | Description |
---|---|
1 | b |
2 | blocked cell column |
3 | blocked cell row |
Start
Column | Description |
---|---|
1 | s |
2 | start cell column |
3 | start cell row |
End
Column | Description |
---|---|
1 | e |
2 | end cell column |
3 | end cell row |
Example
format explore
d 5
b 2 1
b 2 2
b 2 3
s 0 4
e 4 0
Algorithm
Finds path using the A* algorithm.