https://github.com/suwadith/a-star-shortest-pathfinding-algorithm-square-grid-java
Java based solution to find the shortest path between 2 Grid Cells. [A* Shortest Pathfinding Algorithm]
https://github.com/suwadith/a-star-shortest-pathfinding-algorithm-square-grid-java
a-star java shortest-pathfinding-algorithm
Last synced: 5 months ago
JSON representation
Java based solution to find the shortest path between 2 Grid Cells. [A* Shortest Pathfinding Algorithm]
- Host: GitHub
- URL: https://github.com/suwadith/a-star-shortest-pathfinding-algorithm-square-grid-java
- Owner: Suwadith
- Created: 2017-04-01T11:00:03.000Z (over 8 years ago)
- Default Branch: FinalizedVersion
- Last Pushed: 2022-07-13T04:47:07.000Z (about 3 years ago)
- Last Synced: 2025-04-09T14:07:00.934Z (6 months ago)
- Topics: a-star, java, shortest-pathfinding-algorithm
- Language: Java
- Homepage:
- Size: 250 KB
- Stars: 5
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A-Star-Shortest-Pathfinding-Algorithm-Square-Grid-Java
Java based solution to find the shortest path's distance between 2 Grid Cells. [A* Shortest Pathfinding Algorithm]
### Paths and Values
```
Manhattan Path - Travels in vertical/horizontal directions (Vertical/Horizontal gCost = 1)
Chebyshev Path - Travels in both diagonal and vertical/horizontal directions (Vertical/Horizontal gCost = 1, Diagonal gCost = 1)
Euclidean Path - Travels in both diagonal and vertical/horizontal directions (Vertical/Horizontal gCost = 1, Diagonal gCost = 1.4)
```### Input
```
Grid size (NxN) => E.g: 20
Percolation ratio (0-1) => E.g: 0.8
x, y coordinates of the starting cell => E.g: 0, 0
x, y coordinates of the ending cell => E.g: 19, 19
```### Output
```
Total path gCost
Time taken to calculate the shortest path
Manhattan Path - Yellow line
Chebyshev Path - Squares filled in red color
Euclidean Path - Black line
```## Screenshots
**Grid Size: 20x20, Percolation Ratio: 0.8**
**Grid Size: 20x20, Percolation Ratio: 0.6**