Author: Michel Langeveld
Date: 23:42:40 11/24/01
Go up one level in this thread
On November 25, 2001 at 02:18:48, Ferdinand S. Mosca wrote:
>On November 24, 2001 at 16:09:08, Michel Langeveld wrote:
>
>>Just a donate from me for everyone who might be interested:
>>
>> #define PAWNGROUPS_PENALTY 30
>> #define PAWNISOLATED_PENALTY 30
>> #define PAWNPASSER_BONUS 80
>> #define PAWNDOUBLE_PENALTY 40
>> #define PAWNTRIPLE_PENALTY 110
>>
>> ///////////////////////////////////////////////////////////////////
>> //Pawn evaluation code by Michel Langeveld
>> ///////////////////////////////////////////////////////////////////
>> //conist of:
>> //-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 ( blackGroup == 0 || (i != 7 &&
>>evalStructure.blackPawnsPlace[i+1] == 0 ) )
>> {
>> score += PAWNPASSER_BONUS;
>> }
>> }
>>
>> //grouping rule and isolated pawns
>> if (whiteGroup == false)
>> {
>> whiteGroup = true;
>> whiteGroups++;
>> score -= PAWNGROUPS_PENALTY; //pawngroup bonus
>> whiteIsolated = true;
>> score -= PAWNISOLATED_PENALTY; //this pawn is isolated if nomore
>>follow
>> }
>> else
>> {
>> if (whiteIsolated)
>> {
>> whiteIsolated = false;
>> score += PAWNISOLATED_PENALTY;
>> }
>> }
>> }
>> else
>> {
>> whiteGroup = false;
>> whiteIsolated = false;
>> }
>>
>> if (evalStructure.blackPawnsPlace[i] > 0)
>> {
>> //double pawns
>> if (evalStructure.blackPawnsPlace[i] == 2) score += PAWNDOUBLE_PENALTY;
>> if (evalStructure.blackPawnsPlace[i] == 3) score += PAWNTRIPLE_PENALTY;
>>
>> //passer?
>> if (evalStructure.blackPawnsPlace[i] > 0 &&
>> evalStructure.whitePawnsPlace[i] == 0)
>> {
>> if ( whiteGroup == 0 ||
>> (i != 7 && evalStructure.whitePawnsPlace[i+1] == 0) )
>> {
>> score -= PAWNPASSER_BONUS;
>> }
>> }
>>
>> //grouping rule and isolated pawns
>> if (blackGroup == false)
>> {
>> blackGroup = true;
>> blackGroups++;
>> score += PAWNGROUPS_PENALTY; //pawngroup bonus
>> blackIsolated = true;
>> score += PAWNISOLATED_PENALTY; //this pawn is isolated if nomore
>>follow
>> }
>> else
>> {
>> if (blackIsolated)
>> {
>> blackIsolated = false;
>> score -= PAWNISOLATED_PENALTY;
>> }
>> }
>> }
>> else
>> {
>> blackGroup = false;
>> blackIsolated = false;
>> }
>> }
>
>Hello Michel,
>
>What PAWNGROUPS_PENALTY is all about? Thanks for the post.
>
>Regards,
>Dinan
The more pawngroups a side has the worse the position is.
You can better have 6 pawns in a row than 4 - 2 than 2 - 2 - 2.
This is the pawn grouping rule.
This page took 0.01 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.