Computer Chess Club Archives


Search

Terms

Messages

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

Author: Dieter Buerssner

Date: 11:04:51 01/19/04

Go up one level in this thread


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;

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.

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.