A way to improve PVS
Posted: Mon Sep 07, 2009 6:10 am
Since a long time ago I'm using in SmarThink 1-centipawn aspiration window for the first root move.
result =-Search(-eval[0] - 1, -eval[0] + 1, depth);
The main idea of doing it -- there are a lot of cases where the eval is the same on the consequent iterations (draw, a lot of endgame positions and so on). At practice this technique works with zero effort -- there are no siginificant difference in playing strength between 1/cw version and classic aspiration with 0,2 pawn window.
Anyway, there is a way to provide more fine approximation of the search result. There are a lot of positions where first n PV moves are the same at the consequent iterations. Let we are ready to start next, Xth iteration at the root (with depth = X) and we have PV from the previous iteration. We can get the position after first K moves in PV and do for this position a search with depth X - K with relatively wide window. The result of this search we can use as the approximation of the full search result. So we can now start search with 1/cw.
MakeMovesFromPV(K);
approx = (K & 1) ? -Search(-eval[0] - ASPIRATION_WINDOW, -eval[0] + ASPIRATION_WINDOW, depth - K) : Search(eval[0] - ASPIRATION_WINDOW, eval[0] + ASPIRATION_WINDOW, depth - K);
UnmakeMovesFromPV(K);
result = -Search(-approx - 1, -approx + 1, depth);
This will provide the best cut-off in the cases where the search will keep first K moves in PV.
If you're interested with this tech please send me your further results
It is interestring how much it can help and also how to determine optimal K value.
result =-Search(-eval[0] - 1, -eval[0] + 1, depth);
The main idea of doing it -- there are a lot of cases where the eval is the same on the consequent iterations (draw, a lot of endgame positions and so on). At practice this technique works with zero effort -- there are no siginificant difference in playing strength between 1/cw version and classic aspiration with 0,2 pawn window.
Anyway, there is a way to provide more fine approximation of the search result. There are a lot of positions where first n PV moves are the same at the consequent iterations. Let we are ready to start next, Xth iteration at the root (with depth = X) and we have PV from the previous iteration. We can get the position after first K moves in PV and do for this position a search with depth X - K with relatively wide window. The result of this search we can use as the approximation of the full search result. So we can now start search with 1/cw.
MakeMovesFromPV(K);
approx = (K & 1) ? -Search(-eval[0] - ASPIRATION_WINDOW, -eval[0] + ASPIRATION_WINDOW, depth - K) : Search(eval[0] - ASPIRATION_WINDOW, eval[0] + ASPIRATION_WINDOW, depth - K);
UnmakeMovesFromPV(K);
result = -Search(-approx - 1, -approx + 1, depth);
This will provide the best cut-off in the cases where the search will keep first K moves in PV.
If you're interested with this tech please send me your further results
It is interestring how much it can help and also how to determine optimal K value.