Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Java based solution to find the shortest path between 2 Grid Cells. [A* Shortest Pathfinding Algorithm]

NotificationsYou must be signed in to change notification settings

Suwadith/A-Star-Shortest-Pathfinding-Algorithm-Square-Grid-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: 20Percolation ratio (0-1) => E.g: 0.8x, y  coordinates of the starting cell => E.g: 0, 0x, y  coordinates of the ending cell => E.g: 19, 19

Output

Total path gCost Time taken to calculate the shortest pathManhattan Path - Yellow lineChebyshev Path - Squares filled in red colorEuclidean Path - Black line

Screenshots

Grid Size: 20x20, Percolation Ratio: 0.8

Grid Size: 20x20, Percolation Ratio: 0.6

About

Java based solution to find the shortest path between 2 Grid Cells. [A* Shortest Pathfinding Algorithm]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp