Author: Robert Hyatt
Date: 19:16:57 08/03/02
Go up one level in this thread
On August 03, 2002 at 14:21:37, Russell Reagan wrote: >I have YABQ. For the longest time I didn't understand what rotated bitboards >were used for, and now I understand their purpose. I'm still hung up on one >thing though, and hopefully someone can explain what I'm misunderstanding. > >As I understand it, you use your all pieces bitboard and the rotated bitboards >to compute the "state of the rank/file/diagonal", and you use that for various >things, such as computing mobility, generating legal moves, or whatever. > >Here is my problem. Let's say that you are computing mobility for a rook, and >you find that the state of the rank is 01001010, with the left bit being A1 and >the right bit being H1, and the rook being on in the middle, on E1. Now, if you >put this value into your mobility array, how does it know what the accurate >value of mobility is here? You want to know a count for two things: how many empty squares does the rook attack, and how many opponent pieces does it attack. How to do that? Generate the squares the bishop attacks. AND it with the complement of the squares occupied by friendly pieces, then count the bits... The AND takes out the squares occupied by your own pieces, so that they don't get counted... > There will be a difference in the mobility if the >piece on B1 is a black piece rather than a white piece. The "state of the rank" >makes no distinction between colors, so how can it accurately calculate mobility >or anything else accurately from the state of the rank/file/diagonal? See above. If this matters to you, then just AND those squares out... > >Another example, if the state of the rank is 11111111 with a rook on E1, the >mobility could be either 0, 1, or 2, depending on the color of the pieces on D1 >and F1. > >What am I misunderstanding? > >Russell
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.