Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question: Evaluation( )

Author: Daniel Clausen

Date: 02:47:30 01/29/00

Go up one level in this thread


Hi

On January 29, 2000 at 00:47:06, TEERAPONG TOVIRAT wrote:

>Hi ,
>How to encourage the program to do some exchanges of pieces
>when materials are ahead and avoid when behind ?
>I tried to add bonus for it  for example ...
> Bonus_for_ex[num_pieces[tomove]][num_pieces[!tomove]]
>and Bonus…[10][9]<Bonus[9][8]<Bonus[7][6]

You probably don't want to give a bonus based on the number of
pieces for both sides, but more on the difference in material value.

Consider this:

   whiteMaterial = sum(value of each white piece)
   blackMaterial = sum(value of each black piece)

   materialDifference = whiteMaterial - blackMaterial

   exchangeBonus = materialDifference / MAGIC_FACTOR

For example if white is a rook ahead, the materialDifference will
be +500. (if 500 is the value of a rook). If the MAGIC_FACTOR
is 10, you'd give a bonus of 50 points (approx 1/2 pawn) for
exchanging pieces.

Note that if black is ahead in material then the exchangeBonus
would be negative.

This formula is extremely simple since it doesnt' consider what
type of pieces are traded and so on. For example if you're ahead
in material you usually trade non-pawn pieces to simplify the
position. But you don't trade pawns since they wanna become
queens. :)

I hope you got the idea. (and I hope I understood your question)
Of course you can always download some sources of public programs
such as Crafty or EXChess to get an idea what these programs do in
this respect.


>Still have a lot of problems.

Know that feeling. ;)

Kind regards,
 -sargon



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.