Author: Mathieu Pagé
Date: 07:14:13 10/22/04
Go up one level in this thread
Hi, I just thought about how attak_from[] could be incrementally updated (I gave a _quick_ look at amy's source code and it seems it is what it does). When we remove a piece of the board we do generate a bitboard indicating wich pieces are attacked by a queen that would be on this square. It gave us the positions of all the attak_from that should be re-generated. Then we regenerate them from scratch if they are occupied by a sliding piece. We do a similar process when we put back the piece somewhere else. Those to step can be combined in one to avoid generating the same attak_from two times when we move a sliding piece. The attack_to are trivial to incrementaly update. When we remove a piece on the board we remove the bit of the square in each attack_to that are pointed out by attack_from[square]. Likewise we add bits to the attak_to that are pointed by the attak_from we just created when adding a piece on the board. Is this all correct or is there something more efficient ? Mathieu Pagé mathieu.page at gmail dot com
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.