This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So I'm trying to implement A* for an n x m grid. Each grid movement in NSEW is one unit.
The issue i'm coming across is that my f = g h is that any value approaching the end destination will be the same.
In the example of S(0,0) and E(1,5) using an manhatten heuristic. Start node g = 0 and h = (1-0) (5-0) = 6. In this f = 6.
If I move over to S(1,0) . g = previousG(0) distanceBetween(in this case it is always 1) g= 1, the h = (1-1) (5-0) = 5. In this f = 6
I feel like i've misunderstood something here or is there an Issue implementing A* in the way I am trying to here?
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnprogra...