Computer Chess Club Archives


Search

Terms

Messages

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

Author: Tony Werten

Date: 23:19:04 03/01/06

Go up one level in this thread


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 ?
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.