Exemple #1
0
 /**
  * @brief Calculate the heuristic value of the action
  * @return The heuristic value
  */
 public override float CalculateHeuristic()
 {
     return(weights.originOccupation * origin.GetOccupationRate() +
            weights.destinyOccupation * destiny.GetOccupationRate() +
            weights.distanceToGoalFromOrigin * (origin.GetDistanceToExitRoom() + origin.GetOwnerRoom().GetDistanceToGoal()) +
            weights.distanceToGoalFromDestiny * (destiny.GetDistanceToExitRoom() + destiny.GetOwnerRoom().GetDistanceToGoal()) +
            weights.chanceToRevealPositionOrigin * origin.GetChanceToRevealPosition() +
            weights.chanceToRevealPositionDestiny * destiny.GetChanceToRevealPosition());
 }
Exemple #2
0
 /**
  * @brief Calculate the heuristic value of the action
  * @return The heuristic value
  */
 public override float CalculateHeuristic()
 {
     return(weights.destinyOccupation * destiny.GetOccupationRate() +
            weights.chanceToRevealPositionDestiny * destiny.GetChanceToRevealPosition());
 }