Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: sliding attacks in three #define

Author: Uri Blass

Date: 13:27:51 04/09/04

Go up one level in this thread


On April 09, 2004 at 15:26:34, Christophe Theron wrote:

>On April 09, 2004 at 14:27:48, Sune Fischer wrote:
>
>>
>>>Clearly, nothing beats the ugliness of bitboards.
>>
>>This may not be the best example to judge by.
>>
>>-S.
>>>    Christophe
>
>
>
>In the contrary, I think it's fairly typical of bitboard code.
>
>Elegance is supposed to be the strong point of bitboards.
>
>The only thing I find elegant is the pseudo-great starting idea "64 squares <->
>64 bits".
>
>Passed this point everything becomes unreadable and ugly.
>
>I also see it often used to pre-compute attack tables and such, which is in my
>opinion contrary to one of the most important things I have learned in computer
>chess: do not compute anything in advance if you are not certain that you will
>use it.

Chest the best mate solver is using attack tables.



 This is not an intrinsic problem of bitboards, it's just that use of
>bitboards often go along with this misuse of computing resources, is it just by
>chance?

Movei is not based on bitboards but I use attacktables for my legal move
generator and my makemove update the tables.

I today almost do not use attack tables for the evaluation but I think that they
can be used.

For example if you may want to know the pieces that are attacked by both side
both for better order of moves and better evaluation.

I think that attack tables may help you to detect faster pieces that are
attacked.

>
>Bitboards are a great tool allowing you to compute very complex things in a
>blink. The problem is that in a chess program you rarely need to do these
>complex computations if you know what you are doing, and so you end up with ugly
>and unreadable code and waste of resources (in particular of L1 and L2 caches).
>
>That being said, I do not want to be too harsh: it is probably possible to write
>a top-level chess program using bitboards, a program that would be not very far
>behind the programs using more portable approaches like 0x88 and derivatives.
>
>Somebody will write one some day.

I believe that everything is possible here because chess programs are simply
weak(not relative to humans but relative to what they can become).

The main problem is that no good mathematicians who are also good programmers
decided to go for the task seriously.

I think that all the linear stuff of doing something that you do not need is
relatively unimportant to the improvement that you can get by better search
algorithms and even if we assume that bitboards are 3 times slower than not
using bitboard being 3 time slower is simply unimportant relative to better
search algorithms.

I believe that I have the right ideas how to do it but right ideas are not
enough and translating them to a code is not easy.

Uri



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.