Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Futility Pruning (I think) Question

Author: Peter McKenzie

Date: 14:00:44 04/02/00

Go up one level in this thread


On April 02, 2000 at 16:11:18, Brian Richardson wrote:

>I have changed Tinker to update material values incrementally (instead of in the
>eval function each time).  This saved at most about 5%.  I did this to enable
>futility pruning (I think this is what it is called).
>
>In the q-search, the net material is found from the perspective of the side on
>move.  Then, BEFORE doing the usual:
>    x=eval();
>    if(x>=beta) return(beta);
>    if(x>alpha)alpha=x;
>    FindCaptureMoves(); ...
>
>I quickly check:
>    if ((x - 2*Pawn) >= beta) return(beta);
>assuming 2 pawns is about largest positional score (LPS). And then

This is known as 'lazy evaluation'.  The general idea is that you have a quick
evaluation (in your case material) which you use as an approximation to your
full evaluation.  If your quick eval. is far enough above beta, you know that
your full eval. would also be above beta.

Eventually you'll probably want to add some more terms to your quick eval which
will make lazy eval work even better.  I think most people implement it inside
eval by passing beta into eval.

>    if ((x + 5*Pawn) <= alpha) return(alpha);
>assuming that if winning a rook doesn't help more than alpha, just return.

This sounds unwise, what if you can win a queen?

>
>Next, in the loop trying each capture move, before actually making the capture
>move and calling x = -quiesce(-beta,-alpha), I see what the expected material
>gain would be (taking into account promotions and enpassant).  If that plus
>3 pawns is <= alpha then skip actually doing this capture, and try the next one.

This is futility pruning in the q-search.  Its a well accepted method, and saves
a bunch of nodes.

>In this case, I assume the LPS is about 3 pawns.  I know, it is not consistent,
>but when i tried 2 pawns here, the search results would change, and I really
>don't know what the LPS actually is.
>
>Together these two "improvements" yield about 15% faster search times to a given
>depth (in some cases >50%).
>
>So, my question is does this all seem "reasonable".  I know implementing a SEE
>would probably be better, but I'm not up to that yet.  I also tried some of
>these cuts in the normal search routine, but that seemed to hurt things.

you can do futility pruning in the last few ply of fullwidth but you need to be
a bit careful with it.  See Darkthought pages for a good article on it...

>
>Thanks again for any feedback.
>Brian



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.