Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: algorithm question

Author: Gerd Isenberg

Date: 16:01:17 09/09/02

Go up one level in this thread


On September 09, 2002 at 18:39:51, Vincent Diepeveen wrote:

>On September 09, 2002 at 16:13:00, Gerd Isenberg wrote:
>
>Hello,
>
>Just to be clear is the next path a legal one:
> isconnected(d4,d8) ==>
>  d4 e3 d1 c1 b2 a3 a4 a5 b6 c6 d6 e6 f7 e8 d8

Yes, Vincent, exactly.

With the following bitboard

0x18201e010911221c

0 0 0 1 1 0 0 0  18
0 0 0 0 0 1 0 0  20
0 1 1 1 1 0 0 0  1e
1 0 0 0 0 0 0 0  01
1 0 0 1 0 0 0 0  09
1 0 0 0 1 0 0 0  11
0 1 0 0 0 1 0 0  22
0 0 1 1 1 0 0 0  1c

traverse = 0x18201e010911221c;
isConnected (traverse, 27, 59) is true.

sample output:

 n fr to
01 27 59
02 20 59
03 13 59
04 04 59
05 03 59
06 02 59
07 09 59
08 16 59
09 24 59
10 32 59
11 41 59
12 42 59
13 43 59
14 44 59
15 53 59
16 60 59
d4 d8 is connected

regards,
Gerd

<snip>



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.