Class MoveEvaluator
- java.lang.Object
-
- com.barrybecker4.game.twoplayer.gomoku.analysis.MoveEvaluator
-
public class MoveEvaluator extends java.lang.ObjectEvaluates 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.
-
-
Constructor Summary
Constructors Constructor Description MoveEvaluator(Patterns patterns)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetValueDifferencerFactory(ValueDifferencerFactory differencerFactory)Used for testing to inject something that will create mock differencers.intworth(GoMokuBoard board, TwoPlayerMove lastMove, com.barrybecker4.optimization.parameter.ParameterArray weights)Statically evaluate the board position from player1's point of view.
-
-
-
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.
-
-