Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PV History question

Author: Inmann Werner

Date: 14:37:53 10/15/99

Go up one level in this thread


On October 15, 1999 at 16:52:40, Nicolas Carrasco wrote:

>Thanks for all Werner but I am sorry that I don't know German.
>
>Can someone traduce german variables to Snglish or Spanish?


try it english....

you need something like PV[50][50].

here is some simple source , how to stuff the PV into the array.
it is only a example, but working.

typedef struct {
	short int value;      /* value of move for move ordering */
	char from;           /* piece moves from           */
	char to;              /* piece moves to    */
	char beaeten_piece;  /* which piece was beaten  */
	char umwandl_fig;     /* is it a pawn promotion,rochade,en-passant */
} move_t;

move_t PV[50][50]; // is the PV array structure, as you like it...
move_t STAPEL[1500] // all the possible moves to do from move generator

//move_t STAPEL[aktzug] is the last made move.

//at the befinning of alpha_beta set the PV to NULL
......
PV[depth][depth].from=0;
......
---------
//if a PV move is found i put it in the PV with following routine

copy_pv(int currentmove)
{
int i;

        //put the current move into the PV
	PV[depth][depth]=STAPEL[aktzug];
        //"sort" the pv, so it fits
	for(i=1;i<45;i++)  /*45 is max depth*/
	{
		if(PV[depth+1][depth+i].from==0)
		{
			PV[depth][depth+i]=PV[depth+1][depth+i];
			return;
		}
		PV[depth][depth+i]=PV[depth+1][depth+i];
	}
}

// at the end of alpha beta, you have the PV in PV[0][....]

Greetings

Werner



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.