Or what is it not.
Has two rooks and a queen on seventh row something to do with king safety ?
If so what about a rook on seventh row ?
Or a bishop on a diagonal a1-h8 when king on g7 ?
Or knight moving to h1 to get to f5 where it attacks g7 and h6 ?
What is king safety?
Moderator: Ras
-
hgm
- Posts: 28457
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: What is king safety?
A bonus for Rook on 7th when King is on 8th is a useful eval term, but usually it is considered part of Rook evaluation, not King safety.
Terms that are usually referred to as King safety are Pawn shield, and 'King seige', a non-linear function of the number and value of the pieces attacking squares adjacent to the King.
E.g. in CrazyWa I add a bonus that is the product of the number of attacked empty squares adjacent to the enemy King, and the total value of pieces in hand that could be dropped there, which can run up to 900 centi-Pawn.
Terms that are usually referred to as King safety are Pawn shield, and 'King seige', a non-linear function of the number and value of the pieces attacking squares adjacent to the King.
E.g. in CrazyWa I add a bonus that is the product of the number of attacked empty squares adjacent to the enemy King, and the total value of pieces in hand that could be dropped there, which can run up to 900 centi-Pawn.
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: What is king safety?
So two rooks and a queen on seventh row has not much to do with king safety.
-
cdani
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: What is king safety?
They add to king safety if they affect near the king.Henk wrote:So two rooks and a queen on seventh row has not much to do with king safety.
Daniel José -
http://www.andscacs.com
-
Henk
- Posts: 7251
- Joined: Mon May 27, 2013 10:31 am
Re: What is king safety?
Then you count them twice (king safety, rook evaluation(BonusOnRow{7, 8})).cdani wrote:They add to king safety if they affect near the king.Henk wrote:So two rooks and a queen on seventh row has not much to do with king safety.
-
Daniel Anulliero
- Posts: 773
- Joined: Fri Jan 04, 2013 4:55 pm
- Location: Nice
Re: What is king safety?
That's why we must choose the bonuses not too high to avoid some material overflowHenk wrote:Then you count them twice (king safety, rook evaluation(BonusOnRow{7, 8})).cdani wrote:They add to king safety if they affect near the king.Henk wrote:So two rooks and a queen on seventh row has not much to do with king safety.
-
Ed Trice
- Posts: 100
- Joined: Fri Sep 19, 2014 5:03 am
Re: What is king safety?
Don't think of it in terms of fixed square locations. Everything is a function of where the king is, which is a variable.Henk wrote:Or what is it not.
Has two rooks and a queen on seventh row something to do with king safety ?
If so what about a rook on seventh row ?
Or a bishop on a diagonal a1-h8 when king on g7 ?
Or knight moving to h1 to get to f5 where it attacks g7 and h6 ?
Put the king at the center of a bull's eye.
The more piece attacks on the bull's eye, the higher the bonus.
These bonuses still work when not attacking the king directly, but squares near the king.
The bonuses fade quickly the further they are from the king.
Proper encoding of these values has a remarkable effect on a program's play. It will naturally develop pawn shields to keep enemy pieces from being able to get close to your king while landing attacks closer and closer to your opponent.
But, giving too many points can be bad also. You end up sacrificing a pawn or two just to create a temporary incursion that can be repelled easily. Afterwards, you're down material without an attack.