Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bean counters Part2

Author: Ernst A. Heinz

Date: 00:36:03 08/21/98

Go up one level in this thread


On August 20, 1998 at 10:58:28, Peter Fendrich wrote:

>On August 19, 1998 at 22:58:12, Ernst A. Heinz wrote:
>
>>On August 19, 1998 at 15:27:10, Peter Fendrich wrote:
>>>
>>>continuing from Part1...
>>>
>>>Method C (The Hacker trick without loops. Used by DarkThought)
>>
>>Peter,
>>
>>"DarkThought" is surely not the only one to use this famous HACKMEM trick.
>>But my article about "How DarkThought plays chess" explicitly mentions your
>>method A, too. The looping scheme is known to produce the best results
>>for sparsely populated bitboards. Therefore, we use normal and sparse
>>popcount functions/macros at different places in the code depending on the
>>expected population density of 1-bits. In the static evaluation function
>>the density is mostly low such that we use the sparse scheme there. During
>>move generation, however, you often encounter biboards that benefit a lot
>>from the HACKMEM scheme because they are heavily populated with 1-bits.
>>
>>=Ernst=
>
>I've never seen the algorithm before I read about it in the DarkThought article
>in ICCA Journal (or was it in you hompage? I don't remember).
>It seems to be a good approach you have but I don't count bits at all in move
>generation. What do you use it there for?
>//Peter

You are correct -- I did not mean move generation but simply other parts of
the source code than the static evaluation.

BTW, in order to save some additional cycles bean counters will eagerly add
a special NON_ZERO_SPARSE_POPCOUNT at places where the input bitboard is
known to contain at least one 1-bit (i.e. its value is != zero). This allows
you to replace the while-loop by a do-loop which in turn reduces the number
of computed loop conditions by one.

=Ernst=



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.