Tuning piece-pawn interactions

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Tuning piece-pawn interactions

Post by jwes »

I want to include piece-pawn interactions in my evaluation for cases where mobility is not sufficient, e.g. WN on d5 is stronger if black can't move a pawn to c6. This seems like a good idea, but I can't think of a good way to tune it.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Tuning piece-pawn interactions

Post by cdani »

I have such semi outposted stuff in Andscacs.

First I use an array of bitboards that contains the attacks of pawns to see in a single instruction if there is a pawn that can attack the knight:

Bitboard CanAttack = Pawns(oppo) & PawnAttackSpan[me][c];

Then for each bit on CannAttack I see if there is an own pawn that blocks the advance of this opponent pawn. This own pawn must also be defended by other own pawn or if not, should be not possibly attacked now or in the future by another different opponent pawn.

Then I apply different combinations of bonus depending of the solidity of the semioutpost, if it's the case.

Is really elaborated, but was necessary to be sure that makes sense, and was a little win. This plus some other stuff is cached for the next time the evaluation arrives to the same knight after the next moves, if the pawn structure and knight position does not change.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Tuning piece-pawn interactions

Post by jwes »

cdani wrote:I have such semi outposted stuff in Andscacs.

First I use an array of bitboards that contains the attacks of pawns to see in a single instruction if there is a pawn that can attack the knight:

Bitboard CanAttack = Pawns(oppo) & PawnAttackSpan[me][c];

Then for each bit on CannAttack I see if there is an own pawn that blocks the advance of this opponent pawn. This own pawn must also be defended by other own pawn or if not, should be not possibly attacked now or in the future by another different opponent pawn.

Then I apply different combinations of bonus depending of the solidity of the semioutpost, if it's the case.

Is really elaborated, but was necessary to be sure that makes sense, and was a little win. This plus some other stuff is cached for the next time the evaluation arrives to the same knight after the next moves, if the pawn structure and knight position does not change.
But how do you tune the bonus?
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Tuning piece-pawn interactions

Post by cdani »

jwes wrote: But how do you tune the bonus?
Ah! Just by hand. First I put some value. Now that I have implemented Texel tuning, maybe I try with it. Then a lot of games at short and long time control, to see if at long time control is good and equal or better than at short time control, and that's it.

Then maybe I try to modify the value +1, or -1, or whatever.