Evaluation Machines

Taken together, all programmable components of the evaluation function constitute an evaluation machine that describes the current state of the whole evaluation engine. Evaluation machines are the central data structures which the oracle and the evaluation infrastructure operate on. DARKTHOUGHT specifies them by the following EVAL MACHINE type declaration.

typedef struct {
    int (*material_balance)(const SIDE, const BOARD *const);

    int (*analyze_pawns)(const BOARD *const, PAWN_FACTS *const);

    int (*analyze_king)(const SIDE, const BOARD *const,
                                    const PAWN_FACTS *const);
    int (*analyze_race)(const SIDE, const BOARD *const,
                                    const PAWN_FACTS *const);
    int (*analyze_posn)(const SIDE, const BOARD *const,
                                    const PAWN_FACTS *const);
    int max_eval_score[2], max_posn_score[2];

    void *king_tables[2], *pawn_tables[2], *posn_tables[2];
    int king_tab_size[2], pawn_tab_size[2], posn_tab_size[2];

    int piece_on_square_table[6][64][2];

The five function variables material balance, analyze pawns, analyze king, analyze race, and analyze posn refer to the currently installed scoring plug-ins. The type identifiers BOARD, SIDE, and PAWN FACTS denote the internal representations of the chess board, of the side to move, and of the facts related to the bare Pawn constellation respectively. Please note that analyze pawns must compute the Pawn facts because all remaining analysis functions receive them as constant read-only parameters.

The vectors max eval score and max posn score contain the upper bound values as determined by the oracle and needed by the evaluation as well as the positional futility-pruning decisions for both sides. Similarly, the vectors king tables, pawn tables, and posn tables hold pointers to the parameter tables of the corresponding scoring functions for both sides. The actual sizes of the parameter tables are given by the respective element values of the vectors king tab size, pawn tab size, and posn tab size. Last but not least, the vector piece on square table contains the placement scores of all piece types on any square of the chess board for both sides as calculated by the oracle.

Created by Ernst A. Heinz, Thu Dec 16 23:28:11 EST 1999