Author: Peter Fendrich
Date: 10:32:21 05/02/99
Go up one level in this thread
On May 02, 1999 at 12:14:55, Pham Hong Nguyen wrote: >I saw in the "PV Search" message of Peter that PV code like this: > > move PV[MAXPLY] [MAXPLY]; > ... > PV[ply][0] = bestmove of this node; > for (ix=1; PV[ply+1][ix-1] != 0; ix++) > PV[ply][ix] = PV[ply+1][ix-1] > PV[ply][ix] = 0; > > >I tried other way like this: > move PV[MAXPLY]; > ... > PV[ply] = bestmove of this node; > >And I found that some time my code is better, some time is worse than first. So >It makes me very confusion which is the best. > >Did I do some thing wrong? Could someone give me some suggestions? > >Thanks in advance, > >Pham Hong Nguyen The second alternative shouldn't work at all... It looks more like a Killer mvoe table. The PV has to be a move sequence of the best moves from both sides when they are doing their best. That sequence is a legal set of moves possible to play on the board. Let's say that you save the best move at some node at ply[5]. That is the best answear to the last move played at ply=4. When you have finished the current node at ply=5 you are coming bak to ply=4 again and trying a new move. Now when going down to ply=5 let's say that you find a real killer that fails high. This move is saved in Ply[5] and we comes back to ply=4 again. Here we know that the move (ply=4) wasn't as good as the one before. What do we have now? Ply[4] with the move before but Ply[5] with the move that killed the last move at ply=4. When doing the first alternative, be careful! I don't know how you are handling the root-node, alpha-beta windows, re-search and things like that but you should save the full PV somewhere else because the Ply table might be overwritten each time you start a new search. The full PV is the line for (i=0; ply[i][0] != 0; i++) PrintMove(Ply[i][0]); //Peter
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.