Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: algorithm question

Author: Gerd Isenberg

Date: 01:38:48 09/10/02

Go up one level in this thread


On September 09, 2002 at 19:43:57, Sven Reichard wrote:

>On September 09, 2002 at 18:12:19, Gerd Isenberg wrote:
>
>>
>>Yes Sven, that is exactly what i meant, Thanks, great.
>>
>>I'll have a closer look to your code (and translate into c).
>>Not yet completely understood.
>>Quite confused with the "reachable" statements. A global array and a local
>>bitboard? Isn't the loop over all directions equivalent to my bitboard
>>traversion?
>>
>>regards,
>>Gerd
>
>Gerd,
>
>the variable reachable is a bitboard. At each point in time it contains the
>squares that can be reached in a certain number of steps. We stop if it either
>contains the target square, or doesn't change anymore.

OK, i was confused by the syntax in following lines:

   while reachable <> oldReachable and not reachable[B]
   return reachable[B]

reachable and reachable[B] ?

>
>This should be faster than your approach, since in each step all squares are
>processed in parallel. The code above basically does the same as Steffan's
>solution, however his code  is optimized (combining the shifts in several
>directions).
>
>Sven.

yes, thanks again, Sven
Gerd




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.