Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Where is the special code for KRP vs KR in Crafty?

Author: Matthias Gemuh

Date: 04:56:22 02/07/04

Go up one level in this thread


On February 07, 2004 at 00:07:08, Mike Byrne wrote:

>On February 06, 2004 at 23:35:53, Uri Blass wrote:
>
>>I did not find that code in evaluate.c of Crafty19.9
>>
>>Uri
>
>I think it's this code
>
>/*
> ************************************************************
> *                                                          *
> *   white king.                                            *
> *                                                          *
> *   first, check for where the king should be if this is   *
> *   an endgame.  ie with pawns on one wing, the king needs *
> *   to be on that wing.  with pawns on both wings, the     *
> *   king belongs in the center.                            *
> *                                                          *
> ************************************************************
> */
>  if (tree->endgame) {
>    if ((tree->all_pawns & mask_efgh) && (tree->all_pawns & mask_abcd))
>      score += kval_wn[WhiteKingSQ];
>    else if (tree->all_pawns & mask_efgh)
>      score += kval_wk[WhiteKingSQ];
>    else if (tree->all_pawns & mask_abcd)
>      score += kval_wq[WhiteKingSQ];
>  }
>
>there is also something for black king  ..olly a guess on my part ...Bob can
>fill in the details,




I don't see the rooks !




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.