## Search

## Messages

### Subject: Re: Returning PV from hash table

Author: Daniel Clausen

Date: 06:25:32 01/17/03

Go up one level in this thread

On January 17, 2003 at 01:29:10, Nathan Thom wrote:
[snip]
>What is a triangular pv array?
A way to store PVs.
When you're doing an N-ply search, on each ply during the search you have a
partial PV, which _can_ become part of the PV for the previous ply.
move_t pv[MAXPLY][MAXPLY] // move_t being the type where you store a move
On ply=0, the entries pv[0][0] to pv[0][MAXPLY-1] are filled
On ply=1, the entries pv[1][1] to pv[1][MAXPLY-1] are filled
[...]
On ply=n, the entries pv[n][n] to pv[n][MAXPLY-1] are filled
Note that the used slots in this 2-dimensional array look like a triangle. (you
can choose which 'half' you want to fill)
When you get a new best move at ply n, you get a new potential PV for this ply
and store it like that:
pv[n][n] = currentMove;
pv[n][n+1] = pv[n+1][n+1]
pv[n][n+2] = pv[n+1][n+2]
etc
HTH
Sargon

This page took 0 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.