Cardoso wrote:Hi,
looking at crafty source at the Output() function, I noted that on a fail high crafty makes a 2 move pv, shouldn't it be just one move?
if (value < bound) {
UnmakeMove(tree, 1, tree->pv[1].path[1], root_wtm);
DisplayPV(tree, 6, wtm, end_time - start_time, value, &tree->pv[1]);
MakeMove(tree, 1, tree->pv[1].path[1], root_wtm);
} else {
if (tree->curmv[1] != tree->pv[1].path[1]) {
tree->pv[1].path[1] = tree->curmv[1];
tree->pv[1].pathl = 2; <--------------- should not be 1 ? ------------
tree->pv[1].pathh = 0;
tree->pv[1].pathd = iteration_depth;
}
}
Loops to output this look as follows:
for (i=1; i< pv[1].pathl; i++) { something }
So "2" really means "1".
This works because the last "move" in the PV does not exist. If I search 6 moves in a row, and then call Evaluate() at ply=7, it will set the pv length to 7, but there are only 6 moves in the thing.