Author: Dann Corbit
Date: 23:46:48 07/22/02
Go up one level in this thread
On July 23, 2002 at 02:30:10, Russell Reagan wrote:
>On July 23, 2002 at 02:20:04, Dann Corbit wrote:
>
>>Ultra-simplified example of what I am thinking...
>>
>>// Construct a list of legal moves, ordered by goodness approximation...
>>CurrentPosition.MakeMoveList();
>>for (i = 0; i < CurrentPosition.GetLegalMoveCount(); i++)
>>{
>> CurrentPosition.MakeMove(i);
>> score = CurrentPosition.Evaluate();
>> CurrentPosition.UnMakeMove(i);
>> /* etc. ... */
>>}
>>
>>Or whatever. I don't see much value in making decisions about what is moving
>>except in the move ordering and evalutation phases. And in those cases, I will
>>be using piece lists {by type} instead of branches anyway. A bitboard for a
>>type/color combination can easily be used as a piece list, for instance.
>
>Do you have a 3D array like:
>
>Piece pieces[NUM_SIDES][NUM_PIECE_TYPES][MAX_PIECES];
No, bitboards by piece type:
BlackPawns
WhitePawns
...
BlackBishops
WhiteBishops
...
Then to use them:
...
while (BlackPawns)
{
where = GetFirst(BlackPawns);
DoPawnStuff(where); // generic example. Might be generate moves. Might be eval
ClearPawn(BlackPawns, where);
}
while (WhitePawns)
{
...
}
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.