Computer Chess Club Archives


Search

Terms

Messages

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

Author: Robert Hyatt

Date: 21:17:14 05/28/03

Go up one level in this thread


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...



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.