Author: Robert Hyatt
Date: 06:22:02 02/24/98
Go up one level in this thread
On February 24, 1998 at 02:43:00, John Scalo wrote:
>What is the most effective way to incorporate a trade-down bonus into a
>chess program?
>
>I'm realizing the need for this after playing a game with my program
>where it was up two pawns, but we each had both rooks and some pawns. It
>could have traded rooks on several occasions but instead tried to nickel
>and dime me in the position. While it was doing that, I snuck the rooks
>up near the king and managed a draw by rep. I could not never done this
>with just one rook.
>
>Apparently the Chess 4.5 algorithm was
>
>material advantage = MIN(2400, MD) + MD*PA*(8000-MT)/(6400*(PA+1))
>
>where
>MD = material difference
>PA = number of pawns on the winning side
>MT = total material on the board
>
>and this adheres to the "trade pieces not pawns when you're ahead"
>strategy.
>
>But surely this has evolved since then?
>
>Thank
The approach I used in Cray Blitz (and Crafty) was similar in concept,
different in implementation. I have an array that is indexed by the
current material (total) on the board. If one side is a pawn or more
ahead, this index is added. If it is behind, this index is subtracted.
By "material" I mean pieces only. I do the opposite for pawns, so that
If I am ahead, I trade pieces but avoid trading pawns and vice-versa.
The
nice thing about using this array is you can do this from move 1, so
that
hash table inconsistentices that are based on specific paths do not
happen.
IE:
if (total_material >= 1.00)
score+=trade_bonus[material]-trade_bonus[pawns];
else if (total_material <= -1.00)
score-=trade_bonus[material]+trade_bonus[pawns];
then you simply set up trade bonus to steadily produce larger values
as the index shrinks, representing a bonus for removing pieces and a
penalty for removing pawns.
material=total material (pieces only)
pawns=total pawns on board
There are other ways. Just look out for solutions that are dependent on
the number of captures in the search path, as that can produce search
inconsistencies due to hashing...
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.