Can someone explain this?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Mincho Georgiev
Posts: 454
Joined: Sat Apr 04, 2009 6:44 pm
Location: Bulgaria

Re: Can someone explain this?

Post by Mincho Georgiev »

bob wrote: They are not worth a flip for this purpose (pruning/reduction decisions) but that is a different topic.
I've always though so myself. But after this discussion i decided to try with my own simplistic implementation, just of curiosity. So far it shows very good results, but is a bit premature, however it definitely shows improvement at fast time controls. It is a code specific matter though.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Can someone explain this?

Post by bob »

Michel wrote:
They are not pruned. They are searched to a reduced depth.
No they are really pruned. Look at the continue statement (this is a loop over the valid moves)

Code: Select all

     
          value = sort->value; // history score
          if (!in_check && depth <= 6  && node_type != NodePV
                  && new_depth < depth && value < HistoryValue/&#40;depth/3+1&#41;
                  && played_nb >= 1+depth && !move_is_dangerous&#40;move,board&#41;)&#123;                     
                        continue;   <---------------
          &#125; 
You are referring to LMR. This is done elsewhere in the search. It does not use history counters AFAICS (in contrast to Fruit 2.1).
You see, the simplified logic is that if the move is made in a PV-NODE and causes cut-off, the history value will be increased though.
I guess you are right. I had overlooked the restriction to non-PV nodes.
I had overlooked which section you were looking at. As I said, using history counters for this decision doesn't work anyway, it doesn't hurt, but it also doesn't help a bit.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Can someone explain this?

Post by bob »

Michel wrote:
I am not sure what did you mean but I think it still uses history counters. The value assigned in sort->value contains that.
Do people actually read each other posts :?:. Of course the code I quoted uses history counters. I didn't quite understand how it was supposed to work (I think I do now).

But then Bob Hyatt started talking about LMR. I replied to him by saying that LMR in Toga does not explicitly use history counters as far as I can see (it uses them implicitly of course since the history counters are used for move ordering).
The problem with the code you included was that it was incomplete. Whether that "continue" skips making/searching/unmaking, or just bypasses things like extension logic is not very clear. Fruit uses them, at least the versions I have tested with did. If Toga doesn't, good, since it is a worthless idea anyway.