Author: José Carlos
Date: 01:01:38 01/17/00
Go up one level in this thread
On January 16, 2000 at 23:20:49, Sanjiv Karnataki wrote: >Hi All, > >I am writing an amateur program and I just finished implementing the negamax >procedure with a simple eval function. The proc works correctly and returns the >correct eval but I cannot figure out when to record the nodes being searched as >part of the PV. I tried recording them whenever a new alpha gets assigned but >that does not seem to work. > >any help or pointers to web-sites that discuss this topic would be greatly >appreciated. > >Thank you. An easy way to do it (although it doesn't work "perfectly") is: - Create a 2-dimension array: struct move PV[MAX_PV][MAX_PV]; - Each time you find a PV move (alfa<value<beta), write it at the begining of the ply pv: PV[Ply][0]=move; - Then, copy the PV from Ply+1 to this ply: memcpy(&PV[Ply][1],&PV[Ply+1][0],sizeof(move)*(MAX_PV-Ply)); It's not perfect, but is good enough for beggining with :) José C.
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.