Author: Uri Blass
Date: 21:26:04 08/23/03
Go up one level in this thread
On August 23, 2003 at 18:14:25, Sune Fischer wrote: >On August 23, 2003 at 17:58:16, Uri Blass wrote: > >>On August 23, 2003 at 17:29:11, Sune Fischer wrote: >> >>>On August 23, 2003 at 17:12:32, Uri Blass wrote: >>>> >>>>Note that I do not like a piece list of 32 squares because it means that even >>>>after having the attack information I cannot get the information if the square >>>>is attacked by a rook directly and I need to look at the squares of the >>>>attackers to see the type of the piece. >>> >>>There are max 32 pieces on the board, so you just do >>>if (ix_attack_sq[sq] & ix_pc[ROOK]) ... >>>that gives you a 32 bit piece list of rooks (black and white) attacking that >>>square. >>>If you want just white rooks: >>>if (ix_attack_sq[sq] & ix_pc[ROOK] & ix_co[WHITE]) .... >>>and so on. >>> >>>Very elegant and compact, the problem is the incremental update which is very >>>slow. >>> >>>>I like more attack information that give me directly the information if a square >>>>is attacked by a pawn,knight,bishop,... >>> >>>Can it get much faste than that? >>> >>>-S. >> >>I thought about something similiar to Ed's information >> >>bit[square]&3=number of white pawns that attack square >>(bit[square]&12)>>2= number of black pawns that attack the square > >Yes you can do that, if you don't need to know where the attacks came from. > >It won't be a super accurate SEE, for how do you do x-ray attacks using that? > >-S. Note that I already have information about the directions that the attack comes from so if I know that some square is attacked by a white rook then I can usually find the rook direction relatively fast and I can also find the square of the attacker from that rook direction. The point is that in a lot of cases I do not need to calculate the exact square of the attacker. x-ray attacks are not needed for pieces that are not defended by bishop,rook or queen and play captures. For pawns I practically have bitboards so I think that I do not need the information that I described but for other pieces I need it and using bitboard for the number of attackers seems not easy to do. Uri
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.