Author: Dan Honeycutt
Date: 15:01:26 06/09/04
Others might enjoy this example of stupidity. I'm in QSearch looking for
captures to search that will get me to alpha. pm1 is the start of my moves and
pm2 is the next start position (one beyond the end of my moves). My code:
need_to_win = 0;
if (stand_pat < alpha) need_to_win = alpha - stand_pat;
while (pm1 < pm2) {
if (value(pm1->victim) < need_to_win) {
//no hope for this move
pm2--;
*pm1 = *pm2;
continue;
}
if (value(pm1->victim) - value(pm1->attackor) >= need_to_win) {
//sure winner
pm1++;
continue;
}
//no answer from MVV/LVA - try SEE
if (SEE(pm1) >= need_to_win) pm1++;
else pm2--;
}
I go to the trouble to do the static exchange evaluation - if the move is no
good I keep it and throw away all the rest!
Dan H.
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.