Author: Robert Hyatt
Date: 07:51:02 05/30/03
Go up one level in this thread
On May 29, 2003 at 01:35:33, Uri Blass wrote: >On May 29, 2003 at 00:17:14, Robert Hyatt wrote: > >>On May 28, 2003 at 14:59:57, Uri Blass wrote: >> >>>I am too lazy to look at the source code of crafty to try to find what >>>formula is used by crafty for reducing the distance between the kings in >>>endgames like KQ vs KR to help it to win without tablebases. >>> >>>what is the formula that is used. >>>I decided to try something in movei and first tests suggest that it is slightly >>>productive but I want also to know what crafty does. >>> >>>Uri >> >> >>Distance is easy: >>max(abs(rankwhiteking-rankblackking),abs(filewhiteking-fileblacking) >> >>#define FileDistance(a,b) abs(File(a) - File(b)) >>#define RankDistance(a,b) abs(Rank(a) - Rank(b)) >>#define Distance(a,b) Max(FileDistance(a,b),RankDistance(a,b)) >> >>I use the three #defines above... > >Yes > >I also use these defines but the question is what is the bonus that it >is using based on the distance of the kings. > >I understand from the other post that it use the bonus only when there are no >pawns but I do not know what is the bonus. > >Does it have table for bonuses for distances 2-7(the possible king distances)? > >Uri it is 15 * the distance-3 in units. Kings can't be a distance of one apart, that would be illegal. 2 is the closest they can be. If they are two apart the "penalty" is +15, if they are 3 apart, it is zero. If they are 4 apart it is -15, 5=-30, etc. Simple but it works...
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.