Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Lazy Eval? And thanx to JL

Author: Stuart Cracraft

Date: 15:58:27 02/03/98

Go up one level in this thread


On February 03, 1998 at 17:44:40, Ed Parry wrote:

>Hi Guys!
>
>I have seen LAZY EVAL referenced here and RGCC a few times and am not
>sure what it is. Could someone give a brief explanation please?
>

Lazy evaluation is a bet that future searching is not necessary because
some marginal number often the worst positional score (not counting
material so far) seen so far in the search puts the sum of material
and it or the difference of material and it better than or equal to
beta or less than or equal to alpha respectively.

Another way, perhaps in addition to the above, is "smart evaluation".
Take the largest positional terms that are easiest to evaluate and
calculate them first, continuing to compute if the sum of them so far
plus the material score is enough to cause a similar cutoff, otherwise
continuing on to the smaller positional terms that are harder to
compute.

Lazy evaluation can get you into trouble, like the null move can,
so I'd recommend care. Here's a code fragment from my program that
is currently in use (but not necessarily permanently.)

Evaluate (alpha, beta)
{:
   /* Try a fast evaluation */
   mtl = MATERIAL;
   if (mtl + worstscore[side] >= beta)
      return (mtl + worstscore[side]);
   else if (mtl - worstscore[side] <= alpha)
      return (mtl - worstscore[side]);
:
}

Worstscore is kept for each side and simply is the
most negative positional score yet seen, that is, the
score excluding the material.

--Stuart



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.