I could be wrong, but I think he's only talking about the score used for move ordering, not the eval returned by the search.cetormenter wrote:Shouldn't you be using a PVs search at root? Wouldn't this make it so that it is impossible (barring search instability) to get a score that is less than the current best score?JBNielsen wrote:Move ordering at the root.
Take this example, where white gets these scores for his 9 moves in fx iteration 4.
1, - score +40 new best move
2, - score +30
3, - score +10
4, - score +70 new best move
5, - score +50
6, - score +50
7, - score +90 new best move
8, - score +80
9, - score +60
Iteration 5 must no doubt start with move 7 which got a score of 90.
But should the next move be move 8 that got the next best score of 80?
Or should it be move 4, the previous best move?
If we choose move 7, 4 and 1 as the 3 first moves, what do we try first after that?
You can also argue, that move 2 and 3 were harder for black to refuse than move 8 and 9.
For move 2 and 3 black black had to get a score lower than +40.
For move 8 and 9 he only had to get below +90.
So it is likely, that black only searched a few moves to refute move 8 and 9.
(and could have found moves that scored even lower).
And perhaps black searched almost all his moves to refute move 2 and 3.
But you can also argue, that iteration 3 gave the move order we use here (from best move to worst move).
So move 2 and 3 might still be better than move 8 and 9 although they scored less?
I once made a function in Dabbaba, that adjusted the scores to compensate for these levels.
But I never really tested seriously if it had any effect.
Someone mentions, that the number of nodes searched for each move can be used...
What is the right thing to do?
Code: Select all
if (playedmoves == 1 || -Alphabeta(depth-1, -alpha-1, -alpha, !PV) > alpha ) { val = -Alphabeta(depth-1, -INFINITY, INFINITY, PV); } if (val > alpha) {...}
Is that right, Jens?
jm