- Reaction score
- 1,675
I'm thinking of understanding the requirements for implementing an A star algorithm. It's like this bane of my programming talent, I need to overcome that, otherwise I'm not improving myself.
tag: A-star, Astar, astar, A*, algorithm
The best way to describe this question:
I know that for an A-star algorithm, I need to have an open set (with the starting node included, this set is for checking on nodes that are potential nodes to be added to the closed set) and an closed set (this set is for gathering potential nodes and find the shortest path that beelines from the start to the goal). Other than these two objects, I don't know what the rest of the objects are used for.
According to the Wikipedia article, there is supposed to be a Map object used. What does this Map object refer to in the code? What is the equivalent in C++? In Java?
And then there's this heuristic cost estimate. I do know that for every small area from the starting node to the finishing node, each node have a value set to it that calculates which nodes, when added to the closed set, will make the total heuristic score count be the lowest of them all, and the relevant nodes will be called as the shortest path. And that there are two heuristic scorekeepers. What are they?
Where do you start initializing the heuristic score just when the A star algorithm starts kicking in at the beginning?
My Chinese text Algorithm book just doesn't cut it without translating to English.
EDIT: Working Astar algorithm in Java
tag: A-star, Astar, astar, A*, algorithm
The best way to describe this question:
I know that for an A-star algorithm, I need to have an open set (with the starting node included, this set is for checking on nodes that are potential nodes to be added to the closed set) and an closed set (this set is for gathering potential nodes and find the shortest path that beelines from the start to the goal). Other than these two objects, I don't know what the rest of the objects are used for.
According to the Wikipedia article, there is supposed to be a Map object used. What does this Map object refer to in the code? What is the equivalent in C++? In Java?
And then there's this heuristic cost estimate. I do know that for every small area from the starting node to the finishing node, each node have a value set to it that calculates which nodes, when added to the closed set, will make the total heuristic score count be the lowest of them all, and the relevant nodes will be called as the shortest path. And that there are two heuristic scorekeepers. What are they?
Where do you start initializing the heuristic score just when the A star algorithm starts kicking in at the beginning?
My Chinese text Algorithm book just doesn't cut it without translating to English.
EDIT: Working Astar algorithm in Java