Pawn Shelter

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Pawn Shelter

Post by outAtime »

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: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Pawn Shelter

Post by Sven »

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