Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: late move reductions (and another question)

Author: Robert Hyatt

Date: 08:50:56 03/02/06

Go up one level in this thread


On March 02, 2006 at 02:19:04, Tony Werten wrote:

>On March 01, 2006 at 20:00:40, Robert Hyatt wrote:
>
>>Someone had already emailed me this.  I just hadn't looked.  Now I am not quite
>>sure what is going on:
>>
>>static const int HistorySize = 12 * 64;
>>
>>That appears to be a dimension for the HistHit[] and HistTot[] arrays, which
>>leaves me lost since the other code sent to me has:
>>
>>index = PIECE_TO_12(board->square[MOVE_FROM(move)]) * 64 +
>>SQUARE_TO_64(MOVE_TO(move));
>>
>>followed by
>>
>>   HistHit[index]++;
>>   HistTot[index]++;
>>
>>So I know I am overlooking something.  "index" is clearly a 12 bit value between
>>0 and 4095 if I understand it correctly.  yet HistHit[] is not nearly that big.
>
>How do you get to 4096 ?

I'm looking at from*64+to...  since either is at least 6 bits, that gives 12.
If piece_to_12 squashes from into 12 bits, that would at least make the index
correct according to the dimension of the array, although then I would not claim
to understand the idea of squashing from from 0-63 into the range 0-11...


>Piece_to_12 most likely has a 0..11 range (6 pieces, 2 colors), square_to a
>0..63 It's just 12*64=768
>
>Tony
>
>>
>>Now I'll certainly download the source to get the context for the above to see
>>what is up.  Certainly looks off-the-wall at first glance since it can't work
>>correctly if I am reading that right...



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.