Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Initiative in chess

Author: Ryan B.

Date: 03:16:39 11/18/05

Go up one level in this thread


On November 18, 2005 at 05:46:52, Daniel Shawul wrote:

>A question for chess experts.
>How important is to be the side to play? (in centi pawns if possible)
>I think it is very important in queen pawn endings (where the queen can
>continously give check), but less important in others. In Zugzwang postions like
>pawn endgames, it might be a mistake all in all.
>thanks
>daniel

I have not tried to tune this yet but I think in endgame's a value of 6 should
be about right.  For openings I think it would help to add to a counter the min
number of moves it would take to get the each pieces current square and give a
development bonus based on a pre-calculated table.  Here is an example of the
knight values to add the the counter based on square.

static int knight_tempo_bonus[ColourNb][SquareNb];

...

   // White knights
   knight_tempo_bonus[White][A1] = 3;
   knight_tempo_bonus[White][A2] = 2;
   knight_tempo_bonus[White][A3] = 1;
   knight_tempo_bonus[White][A4] = 2;
   knight_tempo_bonus[White][A5] = 3;
   knight_tempo_bonus[White][A6] = 4;
   knight_tempo_bonus[White][A7] = 3;
   knight_tempo_bonus[White][A8] = 4;

   knight_tempo_bonus[White][B1] = 0;
   knight_tempo_bonus[White][B2] = 3;
   knight_tempo_bonus[White][B3] = 2;
   knight_tempo_bonus[White][B4] = 3;
   knight_tempo_bonus[White][B5] = 3;
   knight_tempo_bonus[White][B6] = 3;
   knight_tempo_bonus[White][B7] = 4;
   knight_tempo_bonus[White][B8] = 4;

   knight_tempo_bonus[White][C1] = 2;
   knight_tempo_bonus[White][C2] = 2;
   knight_tempo_bonus[White][C3] = 1;
   knight_tempo_bonus[White][C4] = 2;
   knight_tempo_bonus[White][C5] = 3;
   knight_tempo_bonus[White][C6] = 4;
   knight_tempo_bonus[White][C7] = 4;
   knight_tempo_bonus[White][C8] = 4;

   knight_tempo_bonus[White][D1] = 2;
   knight_tempo_bonus[White][D2] = 1;
   knight_tempo_bonus[White][D3] = 3;
   knight_tempo_bonus[White][D4] = 2;
   knight_tempo_bonus[White][D5] = 2;
   knight_tempo_bonus[White][D6] = 3;
   knight_tempo_bonus[White][D7] = 3;
   knight_tempo_bonus[White][D8] = 4;

   knight_tempo_bonus[White][E1] = 2;
   knight_tempo_bonus[White][E2] = 1;
   knight_tempo_bonus[White][E3] = 3;
   knight_tempo_bonus[White][E4] = 2;
   knight_tempo_bonus[White][E5] = 2;
   knight_tempo_bonus[White][E6] = 3;
   knight_tempo_bonus[White][E7] = 3;
   knight_tempo_bonus[White][E8] = 4;

   knight_tempo_bonus[White][F1] = 2;
   knight_tempo_bonus[White][F2] = 2;
   knight_tempo_bonus[White][F3] = 1;
   knight_tempo_bonus[White][F4] = 2;
   knight_tempo_bonus[White][F5] = 3;
   knight_tempo_bonus[White][F6] = 4;
   knight_tempo_bonus[White][F7] = 4;
   knight_tempo_bonus[White][F8] = 4;

   knight_tempo_bonus[White][G1] = 0;
   knight_tempo_bonus[White][G2] = 3;
   knight_tempo_bonus[White][G3] = 2;
   knight_tempo_bonus[White][G4] = 3;
   knight_tempo_bonus[White][G5] = 3;
   knight_tempo_bonus[White][G6] = 3;
   knight_tempo_bonus[White][G7] = 4;
   knight_tempo_bonus[White][G8] = 4;

   knight_tempo_bonus[White][H1] = 3;
   knight_tempo_bonus[White][H2] = 2;
   knight_tempo_bonus[White][H3] = 1;
   knight_tempo_bonus[White][H4] = 2;
   knight_tempo_bonus[White][H5] = 3;
   knight_tempo_bonus[White][H6] = 4;
   knight_tempo_bonus[White][H7] = 3;
   knight_tempo_bonus[White][H8] = 4;


   // Black knights
   knight_tempo_bonus[Black][A8] = 3;
   knight_tempo_bonus[Black][A7] = 2;
   knight_tempo_bonus[Black][A6] = 1;
   knight_tempo_bonus[Black][A5] = 2;
   knight_tempo_bonus[Black][A4] = 3;
   knight_tempo_bonus[Black][A3] = 4;
   knight_tempo_bonus[Black][A2] = 3;
   knight_tempo_bonus[Black][A1] = 4;

   knight_tempo_bonus[Black][B8] = 0;
   knight_tempo_bonus[Black][B7] = 3;
   knight_tempo_bonus[Black][B6] = 2;
   knight_tempo_bonus[Black][B5] = 3;
   knight_tempo_bonus[Black][B4] = 3;
   knight_tempo_bonus[Black][B3] = 3;
   knight_tempo_bonus[Black][B2] = 4;
   knight_tempo_bonus[Black][B1] = 4;

   knight_tempo_bonus[Black][C8] = 2;
   knight_tempo_bonus[Black][C7] = 2;
   knight_tempo_bonus[Black][C6] = 1;
   knight_tempo_bonus[Black][C5] = 2;
   knight_tempo_bonus[Black][C4] = 3;
   knight_tempo_bonus[Black][C3] = 4;
   knight_tempo_bonus[Black][C2] = 4;
   knight_tempo_bonus[Black][C1] = 4;

   knight_tempo_bonus[Black][D8] = 2;
   knight_tempo_bonus[Black][D7] = 1;
   knight_tempo_bonus[Black][D6] = 3;
   knight_tempo_bonus[Black][D5] = 2;
   knight_tempo_bonus[Black][D4] = 2;
   knight_tempo_bonus[Black][D3] = 3;
   knight_tempo_bonus[Black][D2] = 3;
   knight_tempo_bonus[Black][D1] = 4;

   knight_tempo_bonus[Black][E8] = 2;
   knight_tempo_bonus[Black][E7] = 1;
   knight_tempo_bonus[Black][E6] = 3;
   knight_tempo_bonus[Black][E5] = 2;
   knight_tempo_bonus[Black][E4] = 2;
   knight_tempo_bonus[Black][E3] = 3;
   knight_tempo_bonus[Black][E2] = 3;
   knight_tempo_bonus[Black][E1] = 4;

   knight_tempo_bonus[Black][F8] = 2;
   knight_tempo_bonus[Black][F7] = 2;
   knight_tempo_bonus[Black][F6] = 1;
   knight_tempo_bonus[Black][F5] = 2;
   knight_tempo_bonus[Black][F4] = 3;
   knight_tempo_bonus[Black][F3] = 4;
   knight_tempo_bonus[Black][F2] = 4;
   knight_tempo_bonus[Black][F1] = 4;

   knight_tempo_bonus[Black][G8] = 0;
   knight_tempo_bonus[Black][G7] = 3;
   knight_tempo_bonus[Black][G6] = 2;
   knight_tempo_bonus[Black][G5] = 3;
   knight_tempo_bonus[Black][G4] = 3;
   knight_tempo_bonus[Black][G3] = 3;
   knight_tempo_bonus[Black][G2] = 4;
   knight_tempo_bonus[Black][G1] = 4;

   knight_tempo_bonus[Black][H8] = 3;
   knight_tempo_bonus[Black][H7] = 2;
   knight_tempo_bonus[Black][H6] = 1;
   knight_tempo_bonus[Black][H5] = 2;
   knight_tempo_bonus[Black][H4] = 3;
   knight_tempo_bonus[Black][H3] = 4;
   knight_tempo_bonus[Black][H2] = 3;
   knight_tempo_bonus[Black][H1] = 4;

Ryan



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.