Computer Chess Club Archives


Search

Terms

Messages

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

Author: Uri Blass

Date: 18:23:13 03/02/06

Go up one level in this thread


On March 02, 2006 at 14:52:47, Robert Hyatt wrote:

>On March 02, 2006 at 14:14:15, Paul Clarke wrote:
>
>>On March 02, 2006 at 11:50:56, Robert Hyatt wrote:
>>
>>>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...
>>
>>Are you reading the index calculation as:
>>
>>index = SQUARE_TO_64(MOVE(from)) * 64 + SQUARE_TO_64(MOVE(to));
>>
>>? If so then that would explain the confusion: the index calculation is, as Tony
>>mentions below, using the type of piece that moved rather than the square it
>>moved from, hence the use of PIECE_TO_12(board->square[MOVE(from)]).
>
>Aha... So fruit is using a 12 * 64 entry hit/fh counter set.  Has anyone
>compared this to the more common 64-64 (from-to 12 bits) array???
>
>The snippet that was emailed to me didn't have the PIECE_TO_12() macro/function
>included so I didn't notice, I was assuming it was a 12 bit thing rather than a
>12-valued thing...  :)

You can easily get the full source of fruit in

http://arctrix.com/nas/fruit/

Uri



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.