Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards versus other representations

Author: Robert Hyatt

Date: 20:55:03 10/01/01

Go up one level in this thread


On October 01, 2001 at 17:59:03, Roy Eassa wrote:

>On October 01, 2001 at 16:59:02, Robert Hyatt wrote:
>
>>On September 30, 2001 at 09:28:09, José Carlos wrote:
>>
>>>On September 30, 2001 at 06:25:24, Uri Blass wrote:
>>>
>>>>On September 30, 2001 at 06:15:44, José Carlos wrote:
>>>>
>>>>>On September 29, 2001 at 20:15:16, Gareth McCaughan wrote:
>>>>>
>>>>>>José Carlos wrote:
>>>>>>
>>>>>>>  The point is not the move, but the eval. The program must
>>>>>>> know white is winning:
>>>>>>>
>>>>>>> [D]R4rk1/5pp1/5q1p/1p1Qp3/8/1B6/1PP2bPP/5K2 w - - 0 1
>>>>>>>
>>>>>>>  Qxf7+ and after the changes, the pawn ending is won.
>>>>>>
>>>>>>Crafty 18.11, Athlon 1GHz, has +0.8 after 0.4 seconds (8 ply),
>>>>>>rising to 0.93 after 11 seconds, 1.17 after 28 seconds, 1.36
>>>>>>after 6 minutes. It plays Qxf7+ at all depths.
>>>>>>
>>>>>>--
>>>>>>g
>>>>>
>>>>>  It doesn't surprise me at all. Crafty is probably the best in the world
>>>>>evaluatiing pawn endgames.
>>>>>
>>>>>  José C.
>>>>
>>>>How is it possible?
>>>>
>>>>Crafty is a free program so I expect at least a small part of the programmers to
>>>>learn from Crafty about the evaluation of pawn endgames and add more knowledge.
>>>>
>>>>Uri
>>>
>>>  IMO, this is possible because Crafty is a bitboard engine, and most (if not
>>>all) commercials aren't. Bitboards, if you're an expert as Bob is, are great to
>>>evaluate pawns. You can make very complex calculations with just some logic
>>>operations.
>>>  Also, Bob has more experience in computer chess than most of the commecial
>>>programmers, so it's not suprising he's able to understand things most
>>>commercial programmers aren't.
>>>  Of course, being open source, other programmers can "copy" ideas but you know
>>>each program is different; what works nice for you might not work at all for me.
>>>What Bob does so fast with BB, could be too slow to do with 0x88 and thus, not
>>>worth implementing.
>>>  This is just a guess; you asked "how is this possible". It is possible, but I
>>>don't know the datails of every program, of course.
>>>
>>>  José C.
>>
>>
>>That is always an issue.  I can do some things in bitboards that would be too
>>costly in arrays.  There are probably some things in arrays that would be
>>too costly in bitboards (fortunately I have _both_ available in Crafty, when
>>you count the PieceOnSquare() array.
>>
>>This is also true based on architectural considerations.  There are things I
>>did in Cray Blitz that I can't afford to do in Crafty.  And won't until we
>>get good vector throughput on a microprocessor.
>>
>>My "blocked pawn" code would be messy on an array implementation.  Because it
>>is a "search" of sorts that says "which pawns can advance, and how far, if I
>>ignore pieces and just consider pawns.  I then use this to see which pawns can
>>not be defended by pawns, which pawns can't advance because they would be
>>attacked by more pawns than they are defended by, and so forth.  It becomes
>>very simple to do this with bitmaps.  It would be very messy (and I didn't do
>>it in Cray Blitz because I never thought of a good way to do it since we didn't
>>use bitmaps there) without bitmaps.  Perhaps doable very similar to the way
>>I have done it. But very messy.
>
>
>Having learned about bitboards and all the clever things that can be done FAST
>with them, I am surprised to learn that manh of the top PC chess engines do NOT
>use them.  (I know Crafty does.)  That leads me to a couple questions:
>
>1. Can anybody provide a list showing which major (top-20 or so commercial and
>amateur) engines use what board representations?
>
>2. What factors counterbalance bitboards' advantages (i.e., what's faster in
>other representations)?


The main disadvantage of today is that bitmaps are 64 bits wide.  And the PC
is 32 bits wide.  This will change over the next few years and that problem
will go away.


The cute things include nice pattern-matching abilities where you can check
the positions of multiple pawns with one operation, for example...



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.