Sounds good. But that "-1" stuff is quite artificial now, isn't it? This is caused by your non-standard numbering. Your system goes:Fguy64 wrote:Thanks, but I think I have found my problem. It ws a logic error in one of my hash writes.jwes wrote:I would try it without the transposition table to make sure ID is working correctly.
My convention for numbering the plies is slightly non-standard I guess, although it is intuitive for me. I have a class variable iPly, and in my ID loop iPly goes from 1 to maxPly. At each iteration, 1 is passed to alphsBeta, then in my recursive alphaBeta method, ply goes from 1 to iPly inclusive, and evaluate() is called for ply > iPly.
The problem was, along with my call to evaluate, I was storing a draft (remaining depth) of 0, which is wrong since my stop condition is ply > iPly. By storing a depth of -1 for this exact hash write at the stop condition, all my problems appear to have been resolved. It's not clear to me why my straght up fixed depth searching appeared to work fine with this particular hash write error.
regards.
"iPly" := number of current iteration, which is the intended maximum distance between root and horizon when ignoring extensions/reductions etc.
"ply" := local variable of alphaBeta() function describing the distance of current node to root + 1 (!!) since you start with ply=1 at the root; the range of "ply" within full search is therefore [1 .. iPly + 1]
"draft" := iPly - ply, which is in your case the distance of the current node to the horizon - 1
... and that is fine except that "ply" starts at 1, which automatically implies all the other special "off by one" conditions. You see that this has caused trouble now, although you are consistently saying that it were more intuitive for you. IMO you have proven yourself wrong regarding that intuition, so I propose that you consistently change to the standard numbering scheme. I think that it is far better because everyone (including yourself) can immediately understand when your search reaches the horizon, i.e. draft == 0 (not draft == -1). "No more moves left until horizon" is better expressed by a zero than by a "-1", isn't it?
Regarding your hash stores, I'd expect that you store search results at basically each node, not just at the leaves, and that you always store "iPly - ply" as the draft, which automatically leads to storing -1 at the leaves with your current implementation (or 0 if you switch). From your description I was not sure whether you really do this. If you don't then ... forget your hash table

Sven