Class UtilityFunction

java.lang.Object
net.royalur.agent.utility.UtilityFunction
Direct Known Subclasses:
PiecesAdvancedUtilityFn

public abstract class UtilityFunction extends Object
A function that is used to score game states.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Scores the state of the game numerically, where a positive value represents that the current player is advantaged, and a negative value represents that the waiting player is advantaged.
    abstract float
    Scores the state of the game numerically, where a positive value represents that light is advantaged, and a negative value represents that dark is advantaged.

    Methods inherited from class java.lang.Object

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

    • UtilityFunction

      public UtilityFunction()
  • Method Details

    • scoreGameStateForLight

      public abstract float scoreGameStateForLight(FastSimpleGame game)
      Scores the state of the game numerically, where a positive value represents that light is advantaged, and a negative value represents that dark is advantaged.
      Parameters:
      game - The game to evaluate.
      Returns:
      A utility value for light in the given state.
    • scoreGame

      public float scoreGame(FastSimpleGame game)
      Scores the state of the game numerically, where a positive value represents that the current player is advantaged, and a negative value represents that the waiting player is advantaged.
      Parameters:
      game - The game to evaluate.
      Returns:
      A utility value for the current player of the game.