Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
Distance to King
Moderator: Ras
-
aberent
Re: Distance to King
Thank you 
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Distance to King
Lots of places. Are too many pieces close to my king? Is the king too far away from a passed pawn or its queening square? Etc...aberent wrote:Thank you
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
-
aberent
Re: Distance to King
What kind of scores in terms of % of pawn should I give these? Do you know any good articles on Evaluation Functions?bob wrote:Lots of places. Are too many pieces close to my king? Is the king too far away from a passed pawn or its queening square? Etc...aberent wrote:Thank you
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
Thanks
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Distance to King
No good articles at all. It is all witchcraft, superstition, voodoo, etc.aberent wrote:What kind of scores in terms of % of pawn should I give these? Do you know any good articles on Evaluation Functions?bob wrote:Lots of places. Are too many pieces close to my king? Is the king too far away from a passed pawn or its queening square? Etc...aberent wrote:Thank you
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
Thanks
Best answer is to try a reasonable set of values, test, and then modify and repeat the test.
-
Don
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: Distance to King
In Doch there is a penalty for the distance of your king to the square in front of a passed pawn of either color - it applies in the endgame but it's interpolated between opening and endgame phase.aberent wrote:Thank you
Do you guys find king distance to be useful in an evaluation function? Any advice on scoring?
The bonus is quadratic - so you get more credit for moving closer if you are already pretty close.
It's probably also useful to give a small bonus for distance to ALL pawns, at least in late endgame phase. If, for instance if there are pawns only on the b file, you want your king to want to be over there. This is a better rule in most cases than just hard coded king centralization.