Computer Chess Club Archives




Subject: BitBoard challenge to Ernst A. Heinz and bitboard fans - no moderation

Author: Vincent Diepeveen

Date: 18:26:17 01/15/99

Go up one level in this thread

On January 13, 1999 at 07:19:54, Ernst A. Heinz wrote:

>On January 13, 1999 at 06:13:30, Vincent Diepeveen wrote:
>> [...]
>As usual you spread your own fallible impressions and interpretations
>in a style that suggests they are proven facts. But indeed they are *not*.

I have not seen a single function using bitboards making attacktables
for every square indeed.
In crafty there is only this: a function that gives
soemthing for a single square.

I thought a long time about it.

>The "problems" (rumors?) you allude to in the post only show that you have
>*not* understood what bitboards are capable of and how to handle them
>effciently. You are of course free to criticize Bob's coding style and his
>design decisions in "Crafty". However, only inexperienced and narrow-minded
>people draw general conclusions from just a single example (i.e. the source

Now comon comon, who is narrowminded here.
I've investigated bitboards just as close as you did.

Note that i don't have a 64 bits processor, and even if i did, then still
i never might sell a 64 bits program, where never is defined as next
few years.

>code of "Crafty"). There are many ways to do things differently with bitboards
>and rotated bitboards than in "Crafty". Overall, your post mainly elaborates
>on some of Bob's design decisions which you deem non-optimal.
>The only real disadvantage of bitboards at the moment is the obvious penalty
>of 64-bit integers on 32-bit CPUs which comes hand in hand with unfortunately
>limited compilers and programming environments.

I'm waiting for your implementation of attacktables using bitboards.

I'll even be friendly to you allowing it to do at a 64 bits machine,
which next 5 years is probably out of wallet of 99% of the people,
but then please don't use macros, but write it all out. Macros confuse people,
giving them the idea that it is simple using bitboards, where actually
every macro is a kind of hacked thing in bitboards imho. Please post again
how you count the number of bits in a bitboard?

At a PII-450 diep generates 250k attacktables a second in the position
after openingsposition+1.e4,e5 2.d4,d5

I'm only using C code. Not a single assembler instruction is in my code,
as far as i know your bitboards are written in C? In that case
there is no unfair comparision.

An attacktable is a table in my program of
int attacktable [2][64];
First i clean the attacktable, then i store for every piece all attacks.

that includes
  a) piece that attacks      (what square it is from)
  b) number of attackers     (clear i guess)
  c) kind of piece           (pawn,knight,bishop ...)

I need this to evaluate in my program, as it evaluates also 'relationships'
between pieces and mobility is also depending upon it.

My mobility goes like this: i loop over all squares of a piece, including
xray squares and then find out how important control over such a square is
depending on all kind of chessknowlege where info from attacktable is
used using lookup of attacktable[c][sq] where sq are all squares that
need to be considered. And as i use this 'attacktable' info a lot,
i therefore store it in this a simple way in [2][64] array.
Every time i use something out of my attacktable i definitely not
am gonna add all values of the different bitboards *just* to get the
number of attackers. That would slow down my program *considerable*.

Now a problem using attacktables with mobility is:
if you do all squares at once (otherwise bitboards not rewarding),
that is kind of tough, considering that values are different
for every square. So where i simply count a+b+c, where probably
a != b != c then you run into problems, as for a range of -50 to +50
you need to do 101 bitboard counts.

I have given you exact data here.
2 challenges are posted, from which one is very clear.
The second one, mobility is simply impossible, unless you use the same
code i use, so you get every square out of the bitboard and then run
through the evaluation code, which means that the loop used over the squares
is different, but not the evaluation code

Assuming in all cases lossless code,


Please guys don't moderate Ernst too tough, if you do, then i dunno
what Heinz thinks of himselve.

This page took 0.01 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.