Author: Sune Fischer
Date: 15:17:05 06/25/02
Go up one level in this thread
On June 25, 2002 at 17:17:04, Tony Werten wrote: >On June 25, 2002 at 17:04:43, Robert Hyatt wrote: > >>On June 25, 2002 at 16:35:26, Gian-Carlo Pascutto wrote: >> >>>On June 25, 2002 at 14:26:37, Russell Reagan wrote: >>> >>>>On June 25, 2002 at 05:07:26, Gian-Carlo Pascutto wrote: >>>> >>>>>Hrmpf. In my experience, there are many things >>>>>that are both faster and easier to evaluate via >>>>>a classic approach. >>>> >>>>Could you give some examples of things that you have found that can be >>>>calculated faster using the classic approach? >>> >>>'Is there a white pawn on e6?' >>> >>>if (board[E6] == wpawn) >>> >>>1 load >>>1 compare >>> >>>if (WhitePawns & Mask[e6]) >>> >>>2 64-bit loads >>>1 64-bit and >>>1 64-bit compare >>> >>>-- >>>GCP >> >> >>What about more commonly: Is the black pawn on e6 passed. Now you have >>to check 12 squares... d2/e2/f2, d3/e3/f3, d4/e4/f4, d5/e5/f5. >> >>Bitmaps: two loads one and. No compare. Just a branch not zero. >> >>traditional... 12 loads 12 compares. >> >>Asking simple questions with bitmaps is not so good on 32 bit machines. On >>a 64 bit machine, your above becomes >> >>1 load. 1 mask create (set 1 bit and shift, two instructions, done in the >>"shadow" of the load, then one compare. >> >>On a 64 bit machine, they are equally fast for the simple operation. For >>the second case, the 64 bit machine is an easy winner. > >No, this is 1 pawnhashtable lookup. Don't care how you got the information you >put in the hashtable, because of the hitrate that's not important. > >Bitboards are best for pawns (imo) but because of the hashtable, it's not that >important. (Altough "is this rook behind and not in front of a passed pawn" >would save me some time with bitboards instead of what I'm doing now. > >Tony What if you want to check for connected rooks, or connected bishop and queen? This is easy with bitboards, you just have to produce the attackboard of one of the pieces and mask it with the location the other piece. Attacks in general seem fast with bitboards, once you have generated the attack board you know what it is attacking using 1 load, one AND and one compare (did I get that right?:). I don't know how this is done in 0x88, there must be some attack info constructed in a way, or else there will be loops everywhere. How else do you generate king moves, such as regular king moves and castle moves? The question becomes "how quickly can you generate the attack table"? To generate the whole attack table it seems you must generate all the moves, even when you only need the best capture move? -S.
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.