Author: Peter Fendrich
Date: 13:35:36 04/20/99
Go up one level in this thread
On April 20, 1999 at 15:55:37, Alex Boby wrote: > > Hey guys,... I think the intent of the Principle Variation Search is to >search it first and thus establish the best alpha/beta values for maximum >pruning. What I don't understand is how to get the search to return a whole PV >instead of just the best move at ply 1. I currently just use full width >alpha/beta minimax and I think that adding PV would be a great improvement for >move ordering. Any help would be much appreciated. > >A Boby. Each time you find the best move for a node, somewhere in the tree, you have to back up the 'local' PV for just that move and save it. By doing this at each ply you will end up with a PV at the Root node. There are a couple of ways to do this, here is an easy one: Suppose you have a tyepdef move, use the move-table move PV[MAXPLY][MAXPV]; where the first index is the plynumber and the second is indexing each move in the 'local' PV. When you, in the search, find the best move at ply number "Ply" you could back up the variation like this. 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; //To know where the variation ends This is only pseudocode and some initialising and other stuff is needed to make it work. I hope I didn't screw up something... :-) //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.