Author: Vincent Diepeveen
Date: 05:48:41 06/07/02
Go up one level in this thread
On June 07, 2002 at 06:00:08, Gian-Carlo Pascutto wrote: >On June 06, 2002 at 19:47:14, Vincent Diepeveen wrote: > >>Not really. the problem is the bitboarders have a different goal it seems. >>If all you want is a Sum(squaresattacked) as mobility function, then sure >>bitboards are an interesting thing to use at 64 bits processors. If you want >>more, then bad luck with bitboards. Factor 2 slower. > >BitBoard Mobility function weighting each square differently: > >int RookMobility(int square) >{ > int mob, from = nobit_to_bit[square]; > int mask; > > mask = ((WhitePieces | BlackPieces) >> (Rank(from)<<3)) & FullRank; > mob = Rook_MobilityRank[from][mask]; > mask = (R90 >> (File(from)<<3)) & FullRank; > mob += Rook_MobilityFile[from][mask]; > > return mob; >} > >BitBoard Mobility function for Sum(squaresattacked): > >int RookMobility(int square) >{ > int mob, from = nobit_to_bit[square]; > int mask; > > mask = ((WhitePieces | BlackPieces) >> (Rank(from)<<3)) & FullRank; > mob = Rook_MobilityRank[from][mask]; > mask = (R90 >> (File(from)<<3)) & FullRank; > mob += Rook_MobilityFile[from][mask]; > > return mob; >} > >Oh, oops, guess what: they're exactly the same. The cleverness >(and difference) is in a loop that is executed once at program startup >to set up those arrays. > >-- >GCP this is exactly the error you make, guessing you can assign values without taking the board position into account. Why don't you use a PSQ program, which is nearly doing exactly the same?
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.