Pawn Shelter

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 2:08 pm
Location: Canada

Re: Pawn Shelter

Post by outAtime » Sun May 29, 2011 11:31 am

By the way, it does appear to be a few cases for doing shelter or not.
I have settled on:

Code: Select all

if (bq > 0 && br > 0 && (white_castled || moved[30])) { 
calculate shelter...
}
So for now I'm doing it if there is a queen+rook (also now in endgame where pieces <5 but still queen + rook), if the king is castled, or has moved (cant castle, caught in center or somewhere). I suppose I could also add :
OR moved_queen_rook AND moved_king_rook....
outAtime

Sven
Posts: 3966
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: Pawn Shelter

Post by Sven » Sun May 29, 2011 12:45 pm

Another approach could be to smoothly scale all king-safety related terms (shelter as well as others) depending on the existing material of the opponent. This would avoid the dangerous effect of jumping evaluations just by one trading move. In the given position it would also treat king safety slightly more important for white (since black has an additional piece) than for black. Furthermore, king safety might also include a notion of how well the king is defended by friendly pieces, which would also help in your example position.

Sven

Post Reply