Author: Jaime Benito de Valle Ruiz
Date: 10:53:08 02/18/04
Go up one level in this thread
I'm not quite sure how everyone does it, but this is how I do it: 1) Create a 2 dimensional array such as PV[MaxSearchdepth][MaxNoMovesInPV]. Maybe in VB will be something like PV(MaxSearchdepth,MaxNoMovesInPV) 2) Create a 1-dimensional array such as Length[MaxSearchdepth] 3) When you reach the highest ply (let's say a 5 ply search), store the best move in PV[5][0]=bestmove, and for this depth make Length[5]=1; 4) When you have found the best move in a lower depth (let's say 4), store that move in PV[4][0], and copy as many moves from PV[5][0] as indicated in Length[5] (i.e. only one) in PV[4][1]. Make Length[4]=Length[5]+1 (=2) 5) When you find the best move in an even lower depth, store the move in PV[3][0], and copy from PV[4][0] into PV[3][1] as many moves as indicated in Length[4] (i.e. two moves). Make Length[3]=Length[4]+1 (=3). This time you have one move in PV[3][0], another in PV[3][1], and another one in PV[3][2]. 6) Repeat the process recursively. I hope this helps (and that I haven't made any silly mistakes). Regards, Jaime
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.