Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: move ordering and bitboards

Author: Robert Hyatt

Date: 18:29:33 06/21/00

Go up one level in this thread


On June 21, 2000 at 18:47:12, John Coffey wrote:

>In follow up to Why Bitboards at all?
>
>If bitboards can be used to generate captures, then I assume that these
>are searched first to improve move ordering.  Is there any effort to
>determine which capture should be looked at first and do bitboards provide
>other ways to improve move ordering?
>
>John Coffey

One answer is to do what I do.  Use bitboards to produce a move list with
nothing but captures.  Then sort the list of captures in any way you want.
Another answer is to use the "belle" approach and use MVV/LVA (most valuable
victim, least valuable attacker) as the ordering strategy and produce the
moves one at a time, as you search them.





>
>Being a novice to bitboards I am trying to figure out how to generate a
>capture.  If I take a square and then I say take the mask for the moves of
>a bishop for that square, then I have a mask that covers 14 squares.  If I & it
>with a mask for my opponent's pieces I have a mask of potential captures
>assuming that no pieces were in the way.  So first I would have to come up
>with a mask for legal moves for the bishop before determining the captures?
>This I am not sure how to do, but I am going to try to read up on bitboards.




Just use the normal approach to produce the bit vector with 1's for _every_
square that a bishop attacks.  AND this with the occupied squares bitmap for
the opponent and you just eliminated all bishop moves except for the ones
that capture opponent pieces...



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.