Computer Chess Club Archives




Subject: Re: significant math

Author: Sune Fischer

Date: 04:35:46 11/20/02

Go up one level in this thread

On November 20, 2002 at 07:13:51, Steffan Westcott wrote:
>>    while (padvances2) {
>>      to=FirstOne(padvances2);
>>      *move++=(to+16)|(to<<6)|(pawn<<12);
>>      Clear(to,padvances2);
>>    }

>In your example, you are converting a bitboard (board centric) representation to
>a move array (move centric) representation. This would be required if you want
>to serialise (list, enumerate) the information. I would advise minimising (and
>postponing) the use of code which serialises (converts) the data to a
>non-bitboard form. To maximise the potential of your favoured board
>representation, it should be pervasive throughout your engine design.

The above code was from Crafty, but mine is very similar since there aren't that
many ways to do it.

>To turn to your example, I would favour using the bitboard padvances2 itself as
>a movelist element, rather than chop it up into movelist array elements
>(non-bitboards) as your code fragment does.
>At some point, a bitboard will need to be serialised ie. bits extracted one at a
>time. This should be done as late as possible in the data flow, as it is at this
>point the advantages of bitboards dissolve (ie. parallel computation). An
>example is at the point of move selection from a bitboard representing some
>candidate moves of equal quality (static move evaluation).
>I very rarely have a need to find the index of a set bit in a bitboard. This
>activity is a conversion from the bitboard representation to a co-ordinate
>representation. In an engine design that deals with units of data in bitboard
>format, it upsets matters when an co-ordinate format datum (= bit index) is
>introduced. Nearly the only case where I need the index is to print out the

You are right that would save time, but I wonder if not the book keeping becomes
very complex. There seem to be two conflicting issues at work here, doing the
least amount of effort and get a good move ordering.

What I don't understand is how you do your move ordering (SEE or MVV/LVA) for
captures, how do you access the history table without "to" and "from" squares,
that kind of thing.

I guess if you do something really simple like: Attack(Whitepawns)&BlackQueens,
then you can generate that move(s) only and try that, no move ordering needed.
But there are 5 pieces and each can attack eachother, so that must be 25
different checks.

What am I missing here?



This page took 0.03 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.