Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: algorithm question

Author: Sven Reichard

Date: 16:43:57 09/09/02

Go up one level in this thread


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.

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.



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.