Of course.hgm wrote:Sure, I wasn't planning to change.Sven Schüle wrote:So let's say: you do it your way and I do it my way, and everything's fine
But it would be helpful to the OP to see the pseudo-code of how you do it, so that everyone can judge for himself if and how that simplifies things.
Code: Select all
int fullSearch(...)
{
CHECK_TIMEOUT(...)
if (IS_DRAW() {
// fifty moves rule, insufficient material, repetition draw
return 0;
}
// At this point I would insert EGT probing - currently Jumbo does not use EGT yet.
// If no EGT is available then I can only try to detect some drawn endgames like:
// - KNN vs. K
// - K + minor vs. K + minor
// - KBP vs. K with wrong-colored bishop
// - KQ vs. KP with pawn on a2/c2/f2/h2
// This could either be done inside evaluate() or in a special function that is
// implemented "close to the evaluation function" and is called at this point.
// I did the latter in my older engine KnockOut. But that is quite dangerous since
// you must be absolutely sure not to return a draw score for a position that can
// be won. For this reason my current engine Jumbo detects these types of position
// within the evaluation function and only scales down the score appropriately but
// does not turn the current node into a terminal node.
MATE_DISTANCE_PRUNING(...)
TT_PROBE(...)
staticEval = evaluate(...)
RAZORING(...)
FUTILITY_PRUNING(...)
NULL_MOVE(...)
IID(...)
GENERATE_MOVES(...)
MOVE_LOOP(...)
}