Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is there program, which evaluates this as draw?

Author: Gerd Isenberg

Date: 10:12:43 11/08/01

Go up one level in this thread


IsiChess uses an Eval-Dispatcher simlilar to Heinz's Interior Node Recognizers.
There is an eval function for KBP-KB, where both sides have at least one bishop
and one side has no pawns. The following statements may help in these endings
with unequal colored bishops, and pretty fast:

...
const BitBoard WHITESQBB = 0xaa55aa55aa55aa55;

__forceinline BOOL _fastcall BitCountIsOne(BitBoard bb)
{
	return bb && ( bb & (bb - 1) ) == 0;
}

...

int CSearchTree::Eva_KBP_KB(..., CNode &node)
{
	....
	int mb = node.MaterialBalance();
	....

	int evaPawn   = PawnEvaluate(...);
	int evaBishop = BishopEvaluate(...);
	int evaKing   = KingEvaluateActivity(...);

	// unequal colored bishops ?
	if ( node.BishopCount() == 2
        &&   BitCountIsOne(node.GetBishopBB() & WHITESQBB) )
		return evaPawn/16 + evaBishop/8 + 2*evaKing + 2*mb/3;

	return evaPawn + evaBishop + evaKing + mb;
}


Regards, Gerd



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.