From e21bd51cf9932ca2c81e024ec4d708f988e2e68a Mon Sep 17 00:00:00 2001 From: Jsor Date: Wed, 24 Jul 2013 07:58:54 -0700 Subject: [PATCH] Updated comments a tad --- graph.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.go b/graph.go index 717867f2..cac9d0a5 100644 --- a/graph.go +++ b/graph.go @@ -120,7 +120,7 @@ func UniformCost(a, b int) float64 { // // A heuristic is admissible if, for any node in the graph, the heuristic estimate of the cost between the node and the goal is less than or equal to the true cost. // -// Performance may be improved by providing a consistent heuristic (though one is not needed to find the optimal path), a heuristic is consistent if its value for a given node is less than the +// Performance may be improved by providing a consistent heuristic (though one is not needed to find the optimal path), a heuristic is consistent if its value for a given node is less than (or equal to) the // actual cost of reaching its neighbors + the heuristic estimate for the neighbor itself. You can force consistency by making your HeuristicCost function // return max(NonConsistentHeuristicCost(neighbor,goal), NonConsistentHeuristicCost(self,goal) - Cost(self,neighbor)). If there are multiple neighbors, take the max of all of them. //