Class MoveEvaluator


  • public class MoveEvaluator
    extends java.lang.Object
    Evaluates the value a recent move. It does this by comparing the change in worth of the line patterns vertically, horizontally, and diagonally through the new move's position.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setValueDifferencerFactory​(ValueDifferencerFactory differencerFactory)
      Used for testing to inject something that will create mock differencers.
      int worth​(GoMokuBoard board, TwoPlayerMove lastMove, com.barrybecker4.optimization.parameter.ParameterArray weights)
      Statically evaluate the board position from player1's point of view.
      • Methods inherited from class java.lang.Object

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

      • MoveEvaluator

        public MoveEvaluator​(Patterns patterns)
        Constructor
    • Method Detail

      • setValueDifferencerFactory

        public void setValueDifferencerFactory​(ValueDifferencerFactory differencerFactory)
        Used for testing to inject something that will create mock differencers.
      • worth

        public int worth​(GoMokuBoard board,
                         TwoPlayerMove lastMove,
                         com.barrybecker4.optimization.parameter.ParameterArray weights)
        Statically evaluate the board position from player1's point of view. Larger values are good for player1.
        Returns:
        the lastMove's value modified by the value add of the new move. a large positive value means that the move is good from player1's viewpoint.