if( !(goal instanceof SimpleDestinationGoal) ) {
throw new EncogError("Goal must be SimpleDistanceGoal.");
}
SimpleDestinationGoal sdg = (SimpleDestinationGoal)goal;
EuclideanNode endingNode = (EuclideanNode)sdg.getGoalDestination();
return EuclideanNode.distance(
(EuclideanNode)startingNode,
endingNode);
}