"called at ply equal to zero"? You mean at draft == 0, or is "ply" now a synonym for draft??Fguy64 wrote:OK, point taken. Anyways, in anticipation of more advanced search techniques, I decided to try and change my scheme so that the recursion variable (draft) is decremented, and evaluate ( Q ) is called at ply (or depth or whatever you call it) equal to zero. It was easy enough to do.
No. The +1 in array dimensions is caused by not using entry 0, which is not the same as what you wrote. Also, what you are now doing seems to imply that you fill (and read) your ply-related arrays in reverse order, from higher to lower index.Fguy64 wrote:That still leaves the question of whether to actually use array index 0, no? I guess I find it simpler to have the recursion variable (in my case ply) equal the array index, which as I see implies an array dimension of maxDepth+1. And a little unused space.

Once again: what is your "recursion variable" now: "draft" or "ply"? Or are there two different ones?
What is "ply" in this context? Distance to root + 1, or "draft"? Your code looks suspicious to me, can you explain what is copied from where to where?Fguy64 wrote:And my PV array updates look like this...
Note that this block does not include the hashing code. I'm thinking at some point that I should be able to do away with this PV[][] array, which is a holdover from pre-hashing days and strictly for display, and get any information I need directly from the hash table.Code: Select all
if( eval > alpha ) { alpha = eval; PV[ply][ply] = m; if( ply > 1 ) System.arraycopy( PV[ply-1], 1, PV[ply], 1, ply-1 ); }
EDIT: from the Java reference I can see what System.arraycopy() does in this case. You copy the contents of PV[ply-1][1] .. PV[ply-1][ply-1] to PV[ply][1] .. PV[ply][ply-1]. So my last question is solved ...
Sven