Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about bonus for reducing distance between the kings in craf

Author: Robert Hyatt

Date: 07:46:41 05/30/03

Go up one level in this thread


On May 29, 2003 at 07:33:59, Omid David Tabibi 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...
>
>In Image Processing, assuming that a and b are two pixels,
>Max(FileDistance(a,b),RankDistance(a,b)) is called "chess distance" :)


In graph theory it is often called "taxicab distance" since taxis have to
follow streets rather than "as the crow flies".  :)




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.