Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: My pawn evaluation code (Bugfix)

Author: Michel Langeveld

Date: 13:21:37 11/27/01

Go up one level in this thread


On November 27, 2001 at 05:56:52, Tony Werten wrote:

>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:
>>>>
[snipped a lot of nice words]

Yes, this code is better yes. Also I like the idea of handling double pawns as
passer candidates. But ofcourse this is just a sub optimal algoritm of
evaluating pawns. For evaluation a real pawn structure evaluation also weak
pawns must be considered. Weak pawns (In Dutch: zwakke pionnen) are pawns which
can't be defended anymore by it's own pawns. There's also a term backward pawns
(In Dutch: Achtergebleven pionnen). And not all backwards pawns are weak.

About the code:

Isn't this the same and shorter (sorry if not I'm very tired now)?

if (whitepawn_rank[currentline] > blackpawnrank[current_line] &&
(
   current_line = 0 ||
   blackpawn_rank[current_line-1]<whitepawn_rank[current_line])
)
&&
(
   current_line = 7 ||
   blackpawnrank[current_line+1]<whitepawn_rank[current_line])
)
{
   //passer found
}

Now I think longer I think in this position
[D] 7k/p1pp4/8/8/8/8/PPPP4/7K w - -

White thinks that the A pawn is a passer. This is incorrect.

>>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])

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.