Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

antichess
Class Evaluator  view Evaluator download Evaluator.java

java.lang.Object
  extended byantichess.Evaluator

public class Evaluator
extends java.lang.Object


Field Summary
private static int BISHOP
           
private static int[] bishop_pcsq
           
private static int BLACK
           
private static int BLOCKED_ISOLATED_PAWN_BONUS
           
private static int DOUBLED_PAWN_PENALTY
           
private static int[] flip
          private static final int[] king_pcsq= { -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -20, -20, -20, -20, -20, -20, -20, -20, 0, 20, 40, -20, 0, -20, 40, 20 };
private static int ISOLATED_PAWN_PENALTY
           
private static int KING
           
private static int KNIGHT
           
private static int[] knight_pcsq
           
private static int PASSED_PAWN_PENALTY
           
private static int PAWN
           
private static int[][] pawn_isolated
           
private static int[][] pawn_leastRow
           
private static int[] pawn_mat
           
private static int[] pawn_pcsq
           
private static int[] piece_mat
           
private static int[] piece_value
           
private static int[] piece_value1
           
private static int QUEEN
           
private static int[] queen_pcsq
           
private static int ROOK
           
private static int ROOK_ON_SEVENTH_PENALTY
           
private static int ROOK_OPEN_FILE_PENALTY
           
private static int ROOK_SEMI_OPEN_FILE_PENALTY
           
private static int SPECIAL_MOVE_BONUS
           
private static int WHITE
          This class assigns a numerical value to a board position for a particular player.
 
Constructor Summary
Evaluator()
           
 
Method Summary
private static int eval_black_pawn(Piece blackPawn)
           
private static int eval_white_pawn(Piece whitePawn)
           
static int evaluateBoard(Board board, int colorToMove, int evalQuality)
           
private static int returnSquareValue(Piece xpiece)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITE

private static final int WHITE
This class assigns a numerical value to a board position for a particular player. A positive score for a given player implies that the board is preferable for him to reach. Similarly, a negative score implies that the board is undesired. A score of 0 suggests that the board does not give an advantage or disadvantage for that specific player. Evaluator is immutable.

See Also:
Constant Field Values

BLACK

private static final int BLACK
See Also:
Constant Field Values

PAWN

private static final int PAWN
See Also:
Constant Field Values

ROOK

private static final int ROOK
See Also:
Constant Field Values

KNIGHT

private static final int KNIGHT
See Also:
Constant Field Values

BISHOP

private static final int BISHOP
See Also:
Constant Field Values

QUEEN

private static final int QUEEN
See Also:
Constant Field Values

KING

private static final int KING
See Also:
Constant Field Values

SPECIAL_MOVE_BONUS

private static final int SPECIAL_MOVE_BONUS
See Also:
Constant Field Values

ISOLATED_PAWN_PENALTY

private static final int ISOLATED_PAWN_PENALTY
See Also:
Constant Field Values

DOUBLED_PAWN_PENALTY

private static final int DOUBLED_PAWN_PENALTY
See Also:
Constant Field Values

ROOK_OPEN_FILE_PENALTY

private static final int ROOK_OPEN_FILE_PENALTY
See Also:
Constant Field Values

ROOK_SEMI_OPEN_FILE_PENALTY

private static final int ROOK_SEMI_OPEN_FILE_PENALTY
See Also:
Constant Field Values

ROOK_ON_SEVENTH_PENALTY

private static final int ROOK_ON_SEVENTH_PENALTY
See Also:
Constant Field Values

PASSED_PAWN_PENALTY

private static final int PASSED_PAWN_PENALTY
See Also:
Constant Field Values

BLOCKED_ISOLATED_PAWN_BONUS

private static final int BLOCKED_ISOLATED_PAWN_BONUS
See Also:
Constant Field Values

piece_value

private static final int[] piece_value

piece_value1

private static final int[] piece_value1

pawn_pcsq

private static final int[] pawn_pcsq

knight_pcsq

private static final int[] knight_pcsq

bishop_pcsq

private static final int[] bishop_pcsq

queen_pcsq

private static final int[] queen_pcsq

flip

private static final int[] flip
private static final int[] king_pcsq= { -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -20, -20, -20, -20, -20, -20, -20, -20, 0, 20, 40, -20, 0, -20, 40, 20 };


pawn_leastRow

private static int[][] pawn_leastRow

pawn_isolated

private static int[][] pawn_isolated

piece_mat

private static int[] piece_mat

pawn_mat

private static int[] pawn_mat
Constructor Detail

Evaluator

public Evaluator()
Method Detail

evaluateBoard

public static int evaluateBoard(Board board,
                                int colorToMove,
                                int evalQuality)

returnSquareValue

private static int returnSquareValue(Piece xpiece)

eval_white_pawn

private static int eval_white_pawn(Piece whitePawn)

eval_black_pawn

private static int eval_black_pawn(Piece blackPawn)