Class KMinDist

java.lang.Object
ubc.team09.eval.KMinDist
All Implemented Interfaces:
HeuristicMethod

public class KMinDist extends Object implements HeuristicMethod
This evaluation is identical to QMinDist, except that this one claims territory for each color if they would need fewer King moves to reach it, rather than the traditional distance calculation using queen moves.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    evaluate(State state)
    Returns a number in the range of (-∞, +∞) where lower values indicate a more favorable position for Black, and greater values indicate a more favorable position for White.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KMinDist

      public KMinDist()
  • Method Details

    • evaluate

      public double evaluate(State state)
      Description copied from interface: HeuristicMethod
      Returns a number in the range of (-∞, +∞) where lower values indicate a more favorable position for Black, and greater values indicate a more favorable position for White.
      Specified by:
      evaluate in interface HeuristicMethod
      Parameters:
      state - The board state to evaluate.