Esempio n. 1
0
/*
 * The evaluation function of the engine
 *
 * Returns the evaluation of the board for the parameter 'color'
 */
Mark eval(Board board, Color color)
{
	Mark finalMark;
	Mark materialMark;
	Mark centerControlMark;

	materialMark = evalMaterial(board, color);
	centerControlMark = evalCenterControl(board, color);
	finalMark = MATERIAL_COEF * materialMark + centerControlMark * CENTER_CONTROL_COEF;

	return finalMark;
}
Esempio n. 2
0
File: eval.cpp Progetto: mkd/chess0x
// Evaluate the current board position taking into account both material and
// position.
//
// @return an integer with a positive number for the White leading, negative
//         number for the Black leading and 0 for an equal situation. The
//         numbers is in centipawns, so it should be divided by 100 when
//         presented to the end user.
int eval()
{
    return evalMaterial() + evalPosition();
}