Skip to content

Commit

Permalink
clarify astar heuristic rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 15, 2024
1 parent d18d3a3 commit 3de044a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/primitive/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2440,6 +2440,8 @@ primitive!(
/// - An array of the neighboring nodes must always be returned.
/// - An array of costs may be returned above the nodes array on the stack. If ommitted, all costs are assumed to be 1.
/// The second function should return a heuristic cost to reach the goal node.
/// - The heuristic may return a value [less or equal] the actual cost
/// - It must *never* overestimate the cost, or the algorithm may not find the shortest path
/// The third function should return whether or not the goal node has been reached.
///
/// When called, [astar] will pop any additional arguments its functions need from the stack.
Expand Down

0 comments on commit 3de044a

Please sign in to comment.