Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about evaluation and branch factor

Author: Tord Romstad

Date: 11:24:56 11/20/03

Go up one level in this thread


On November 20, 2003 at 12:28:57, Marcus Prewarski wrote:

>I've been completely rewriting the evaluation function of my engine
>DrunkenMaster (not a strong one) because I was tired of seeing it make some
>really ugly moves and I want to give it better knowledge of king safety and pins
>and better passed pawn evals.  When I watch it play 5 minute games against an
>earlier version it seems like the evaulation is better overall.  However it
>seems like these evaluation changes have made the branch factor a bit worse in
>several test postions I have.  And it performs worse in WAC test suites which
>seems to agree with my observations.  I would think that improving my evaluation
>function would improve the search branch factor if anything.  So my question is
>does this mean that my newer evaluation function is actually worse in most cases
>than my old one or could it be something else like my move ordering is bad to
>begin with?

In addition to the points made by other people in this discussion, I would
like to mention that a sophisticated evaluation function also gives you some
new and interesting ways to reduce your branching factor and improve the
tactical speed of your engine.

First of all, in your evaluation function you can do lots of stuff
besides just returning a value.  You can also detect and store information
like hanging or pinned pieces, mate threats, advanced passed pawns and so
on.

The information computed by your evaluation function can then be used to
guide the search in numerous ways.  The most obvious possibility is to
use the information to improve the move ordering.  You could, for instance,
assign a bonus to moves which moves a hanging piece to safety, defends
a hanging piece, increases the pressure on the opponent's king, attacks
a pinned piece and so on.  In Gothmog, I have found such evaluation-based
move ordering to be more effective than the history heuristic.

Another possibility is to use the information collected to reduce the
number of unsuccessful nullmove searches.  It might be a good idea to
avoid the nullmove search if the side to move has a big hanging piece,
the opponent has an unblocked passed pawn on the 7th rank, or if the
evaluation function detected a mate threat for either side.

There are also numerous more risky tricks to try.  If you compare the
various components of the evaluation function (king safety, passed pawns,
mobility, pinned or hanging pieces, weak squares and so on) before and after
a move is made, you have a good basis for making extension, reduction or
pruning decisions.  You can extend moves which dramatically increases
the pressure on the opponent's king or your passed pawn score.  If the
opponent has a valuable hanging piece, you could try to reduce the
search depth which are not captures, checks, passed pawn pushes, mate
threats or dangerous-looking in other ways.  At nodes where the evaluation
function returns a winning score for the side to move and the opponent
does not appear to have any dangerous threats, you can reduce the depth
or prune the entire sub-tree.

All of these tricks are risky, but they get more reliable when your
evaluation function grows more sophisticated.  By using the evaluation
function to guide the search, I think it is possible to write a program
which is tactically very fast despite having a low NPS count.  My guess
is that this is how Hiarcs and The King work, and it is also the approach
I try to follow in Gothmog.

Tord



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.