Author: Robert Hyatt
Date: 11:13:16 07/15/05
Go up one level in this thread
On July 15, 2005 at 06:50:42, Gian-Carlo Pascutto wrote: >On July 15, 2005 at 06:33:26, Alvaro Jose Povoa Cardoso wrote: > >>Hi, actually this is not lazy eval but rather a complement to it. >>Suppose we structure our eval function in the way of having the fastest >>computing terms near the top of the function and the most time expensive to >>compute at the end of the function. >>Let's say that at the middle we try to bail out sooner in order to avoid those >>costly terms. >>We do this by comparing the current score with the alpha and beta bounds: >>(score is the acumulated eval terms to this point) >> >> temp_score = (wtm) ? score : -score; >> >> if (temp_score <= alpha) >> return (alpha); >> if (temp_score >= beta) >> return (beta); >> >>or maybe return the score itself: >> >> temp_score = (wtm) ? score : -score; >> >> if (temp_score <= alpha) >> return (temp_score); >> if (temp_score >= beta) >> return (temp_score); >> >>My question is: Is this a correct thing to do? >>If so, is it free of any dangers? > >It's completely wrong. > >There's no guarantee that because the score is now below alpha that any >subsequent evaluation won't change that. That's why one uses margins. > >Also note that since alpha == beta + 1 (almost always), you didn't do anything >but throw out all evaluation after that check! > >-- >GCP There is a way for this to work. We did it in Cray Blitz and I believe Bruce did it in Ferret. For each piece, it is easy to compute the largest/smallest positional score it can contribute. This can be incrementally updated so that when you are ready to do a lazy eval exit, you can know exactly how wide this "window" needs to be without guessing. Of course second-order eval terms cause a problem...
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.