private double traverseCost(Node node, Node newNode, Agent agent) {
		if (agent == null) { // default agent
			Location loc1 = node.location, loc2 = newNode.location;
			int dx = Math.abs(loc1.x - loc2.x), dy = Math.abs(loc1.y - loc2.y);
			return costs[grid[newNode.location.x][newNode.location.y]] + 0.1
					* (dx + dy - 1);
		} else {
			return 1;
		}
	}