Computer Chess Club Archives


Search

Terms

Messages

Subject: Lazy eval enhanced

Author: Alvaro Jose Povoa Cardoso

Date: 03:33:26 07/15/05


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?

Best regards,
Alvaro Cardoso



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.