That won't work. In almost all positions you will have some 20 moves with a score that is the same or just a few cP below that of the best, even if the best is the only move that avoids the loss of a piece. Because alpha-beta pruning will make the search very lazy, not willing to do any more work than necessary. So it stops searching for better refutations to your non-best moves as soon as it has found one that pushes the score only marginally below that of your best one.ydebilloez wrote: ↑Wed Jan 20, 2021 1:47 pmI was thinking of a sorting algorithm that sorts the best x moves, and leaves all the other scores as soon as there is a score gap unsorted, and the deeper we go in the variations, the fewer moves we want to maintain. (Thinking like a human, not like an algorithm)
If you want to detect a score gap (i.e. an 'easy move' situation) you would have to do the searches of the later moves with artificially lowerd alpha. i.e., if your best move scores, say, 30cP, you normally raise alpha to 30 cP, but now you should set it to (say) -70 cP instead). Then the score of really poor moves will all be pushed to below -70cP (creating the score gap you want), and moves for which this isn't possible you will get an exact score between -70 and +30.
I do this in Shokidoki on early iterations. As soon as I finish an iteration that has a second move in the gap, I conclude it is not an easy move, and do the remaining iterations without gap. But while the gap lasts I keep it in the next iteration. And while the gap lastst, it already moves when 10% of the normal thinking time has elapsed.