Author: John Coffey
Date: 17:17:27 06/22/00
Go up one level in this thread
On June 22, 2000 at 20:13:16, John Coffey wrote: >On June 21, 2000 at 21:29:33, Robert Hyatt wrote: > >>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... > > >The thing that I am missing is the "normal approach" or how to get the *legal* >moves for a piece with bitboards. A bishop can atack 14 squares, but some >of those squares are blocked. How to mask out the blocked squares? > >John Coffey I just read on the net about rotated bitboards. What was missing is the reason to use them. One reason I can see is that if you rotate an attack vector so that it is horizontal then you might be able to figure out which moves are legal by figuring out which bit is the highest or lowest. John Coffey
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.