Author: Russell Reagan
Date: 17:03:22 07/14/03
Go up one level in this thread
On July 14, 2003 at 19:06:02, Russell Reagan wrote:
>Bitboard rank_attacks[64][8]; // [6-bit rank state][rank position]
>Bitboard file_attacks[64][8];
>Bitboard diag_a1h8_attacks[64][8];
>Bitboard diag_a8h1_attacks[64][8];
>
>It requires some extra work to compute the attack tables (a shift and maybe an
>and or something).
From memory, and a little paper and pencil work, I think this is how much extra
work is needed to use these smaller tables instead of the 128KB tables:
rank attacks: +1 shift
file attacks: +1 shift
+1 table lookup (can't remember for sure if this is necessary)
diag attacks: +2 table lookups (might be able to use simple bitwise ops instead)
+1 AND (not sure if I really need this or not)
+1 shift
So, that is a "worst case" for using these smaller tables, and it is possible
that all of those might not be needed. I'll take a closer look when I get home.
Maybe a combination would be best, using the smaller 4KB tables for ranks and
files, and the larger 32KB tables for diagonals.
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.