Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: My pawn evaluation code (Bugfix)

Author: Tony Werten

Date: 02:56:52 11/27/01

Go up one level in this thread


On November 27, 2001 at 04:55:14, Tony Werten wrote:

>On November 26, 2001 at 17:55:23, Michel Langeveld wrote:
>
>>On November 25, 2001 at 15:07:16, Tony Werten wrote:
>>
>>>On November 25, 2001 at 11:30:51, Michel Langeveld wrote:
>>>
>>>>Fixed some errors in the passer code...
>>>>
>>>>   //grouping rule
>>>>   //isolated pawns
>>>>   //passers
>>>>   //double and triple pawns
>>>>   bool whiteGroup = false;
>>>>   bool blackGroup = false;
>>>>   int whiteGroups = 0;
>>>>   int blackGroups = 0;
>>>>   bool whiteIsolated = false;
>>>>   bool blackIsolated = false;
>>>>
>>>>   for (int i=0; i<8; i++)
>>>>   {
>>>>      if (evalStructure.whitePawnsPlace[i] > 0)
>>>>      {
>>>>
>>>>         //double pawns
>>>>         if (evalStructure.whitePawnsPlace[i] == 2)
>>>>         {
>>>>              score -= PAWNDOUBLE_PENALTY;
>>>>         }
>>>>         if (evalStructure.whitePawnsPlace[i] == 3)
>>>>         {
>>>>            score -= PAWNTRIPLE_PENALTY;
>>>>         }
>>>>
>>>>         //passer?
>>>>         if (evalStructure.blackPawnsPlace[i] == 0)
>>>>         {
>>>>            if (
>>>>                 (i != 0 &&
>>>>                  evalStructure.blackPawnsPlace[i-1] == 0 &&
>>>
>>>connected passed pawns don't pass this test
>>>
>>>>                  evalStructure.whitePawnsPlace[i-1] > 0 &&
>>>>                  evalStructure.blackPawnsPlace[i-2] == 0) ||
>>>
>>>How are passed pawns and not having a pawn 2 files away related ? BTW i-2 can
>>>become -1 here, hope your array runs from -1 to 8.
>>
>>I also evaluate pawns 2 further than the current pawn because I had big problems
>>with evaluation the following pawn structure.
>>
>> 8/pppp4/8/8/8/8/P1PP4/8 w - - 0 1
>>
>>How many passed pawns does white have....?
>
>0
>
>White has a passed pawn when: (board seen from white)
>
>white has a pawn on current line
>AND
>(black does not have a pawn on current line OR                    *1
> blackpawn_rank[current_line] < whitepawn_rank[current_line])     *1
>AND
>(current_line=0  OR
> black does have pawn on [current_line-1] OR
           ^^^
oops,      not
> blackpawn_rank[current_line-1]<=whitepawn_rank[current_line])
>AND
>(current_line=7  OR
> black does have pawn on [current_line+1] OR
           ^^^
           not

> blackpawn_rank[current_line+1]<=whitepawn_rank[current_line])
>
>In your diagram none of the 3 pawns pass *1
>
>>
>>p.s.1 yes there's a bounce problem in my code. I programmed it in by purpose to
>>gain some extra speed. But fixed it later again.
>>p.s.2 I'm not sure what you meant by the connected passed pawns comment. Can you
>>give an example?
>
>I'm not sure how many passed pawns your evaluation finds here.
>
>[D] 7k/8/8/8/8/8/2PP4/7K w - - 0 1
>
>Tony
>
>>
>>Thanks for your comments.
>>
>>Regards,
>>
>>Michel



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.