Author: Rémi Coulom
Date: 04:44:46 01/13/03
Go up one level in this thread
On January 13, 2003 at 06:46:01, Bas Hamstra wrote:
>On January 13, 2003 at 05:32:13, Rémi Coulom wrote:
>
>>On January 12, 2003 at 17:14:18, Bas Hamstra wrote:
>>
>>>I am playing with a 0x88 implementation, that is supposed to be faster than my
>>>rotated BitBoard program. Just for fun. However I am a little disappointed
>>
>>I use 0x88 in TCB. 0x88 should be faster than bitboards for basic operations.
>>TCB is 30-40% faster than crafty on perft (with a perft implementation similar
>>to Crafty's). Your code looks very far from optimal. I plan to make my source
>>publicly available soon, so people can take a look at how I do it.
>>
>>Rémi
>
>In what respect is the code very far from optimal? A few hints would be
>appreciated.
>
>Bas.
Below is my attack function. I think that your idea to separate pawns from other
pieces is not very good.
////////////////////////////////////////////////////////////////////////////
// Function to test whether square sq is attacked by white
////////////////////////////////////////////////////////////////////////////
int IsAttackedByWhite(const int sq)
{
const int *pAttacks = tAttacks[tcbPlayer::White] + 119 - sq;
for (int np = Pieces[tcbPlayer::White]; --np >= 0;)
if (tpieceBoard[tsqPiece[np]] & pAttacks[tsqPiece[np]])
{
int sqPiece = tsqPiece[np];
int Direction = tDirection[119 + sqPiece - sq];
do
if ((sqPiece += Direction) == sq)
return 1;
while (!tpieceBoard[sqPiece]);
}
return 0;
}
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.