Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: shredder 8 and weird PVs? (sandro?)

Author: Sune Fischer

Date: 11:17:15 01/19/04

Go up one level in this thread


On January 19, 2004 at 14:04:51, Dieter Buerssner wrote:

>On January 19, 2004 at 13:24:16, Sune Fischer wrote:
>
>>I could never get it to work correctly, there were problems with terminating the
>>PVs.
>>E.g. when you return repetition draw or a mate score you need to terminate the
>>PV if you are on a PV, otherwise you are going to update and copy a too long PV.
>>
>>It can probably be solved, but IMO it is messy.
>
>I don't think, it is messy at all. just mark the end of the PV
>[pv[ply+1]=END_OF_PV]. END_OF_PV could be any move, that never happens in a
>game. For example a1-b4. For example, after a TB-hit, I set pv[ply]=TB_HIT,
>pv[ply+1]=END_OF_PV; although that is pretty redundant. For cuttof from hash for
>example:
>
>pv[ply] = bestmove_from_hash; pv[ply+1]=HT_HIT; pv[ply+2]=END_OF_PV;

Yes I did something similar, although not as fancy it was just a big fat zero as
terminater.

When extrating it from the PV you can still get the same termination
information, just check move by move what happens, is this move a repetition, is
it a TB position, etc..

>The other method would be to keep an extra var for the length of the PV, but I
>find the marker method more elegant (similar as strings are handled in C).
>
>To update the tail of the PV:
>
>  MOVE m;
>  do
>  {
>    m = *pv2++;
>    *pv1++ = m;
>  }
>  while (*pv2 != END_OF_PV);
>
>Note that the PV-arrays probably have to by dimensioned as [MAX_PLY+2/3] to keep
>space for the extra entries at the end.
>
>For the problem of an early end (mate, stalemate, repetition, ...): Just
>initialize the "local" PV of this search with END_OF_PV.

We may have different difinitions of messy, but when you have to do these checks
several places in the search it's not what I'd call pretty.

But really I was mostly concerned with the termination in qsearch.
As you know the bulk of the nodes are in qsearch and a few, pardon me,
"redundant" PV checks out there seemed costly to me.

-S.
>Regards,
>Dieter



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.