Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Really wierd idea: Pawn value as a function of position...

Author: Dusan Dobes

Date: 02:31:47 08/04/99

Go up one level in this thread


On August 03, 1999 at 23:41:44, Dann Corbit wrote:

>It appears Phalanx XXI has something remotely similar, with this piece of code
>from endgame.c:

Note that this piece of code only evaluates kings+pawns endgames, there are
no other pieces on the board. Thats why the bonus is so high in the case
"out of enemy's king square".

>
>/*** BEGIN: passed pawn evaluation ***/
>
>     i -= step;      /* the queening square */
>     togo = blocks + abs (s - i) / 10;   /* steps to queen */
>     b = bonus (passed[togo]);
>     result += b;
>
>     /* protected passer -> more bonus */
>     if (protected)
>      result += b + b;
>
>     /* out of enemy's king square */
>     stepstosquare = (int) (dist[xkp * 120 + i].max) - togo + (Color == color);
>
>     if (stepstosquare > 1)
>      {
>       result += b + b;
>       if (togo < best)
>        best = togo;
>      }
>
>     /* distance from enemy king */
>     b = dist[xkp * 120 + s + step].max * (12 - togo);
>     result += bonus (b);
>
>/*** END: passed pawn evaluation ***/



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.