From 2e63ac41d9b22e4ee0a62f2bd29974e43e2071a1 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 19 Sep 2018 19:34:05 -0700 Subject: [PATCH] possibly fix oscillation problem with a large goal composite --- src/main/java/baritone/pathing/calc/AStarPathFinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/calc/AStarPathFinder.java b/src/main/java/baritone/pathing/calc/AStarPathFinder.java index 6c5865ca..73ca28f6 100644 --- a/src/main/java/baritone/pathing/calc/AStarPathFinder.java +++ b/src/main/java/baritone/pathing/calc/AStarPathFinder.java @@ -68,7 +68,8 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper { bestSoFar = new PathNode[COEFFICIENTS.length];//keep track of the best node by the metric of (estimatedCostToGoal + cost / COEFFICIENTS[i]) double[] bestHeuristicSoFar = new double[COEFFICIENTS.length]; for (int i = 0; i < bestHeuristicSoFar.length; i++) { - bestHeuristicSoFar[i] = Double.MAX_VALUE; + bestHeuristicSoFar[i] = startNode.estimatedCostToGoal; + bestSoFar[i] = startNode; } CalculationContext calcContext = new CalculationContext(); HashSet favored = favoredPositions.orElse(null);