Michel wrote:Perhaps it has to do with returning to the same position at different depths (futility margins depend on depth).
That could very well be, but that still means the margins are not optimally chosen as a function of depth. Returning another value than
eval - margin will effectively cause another margin to be used next time you encounter the node. If that is on average better, it should also be better to use that margin now. And the effect of using it now should be much larger than using it on the next hash hit (which might never come).
I remember now I encountered something similar with depth bootstrapping. At some point I had the choice of considering a QS node that returned eval (through stand-pat) a d=1 node returning eval - margin1, because in such a node all non-captures would be futile. So it was a trade-off between storing it with better depth, or with better score. Turned out this made a significant difference in the tree size! Unfortunately I have forgotten which was better. (I guess I should look in the Spartacus code what I am doing now...)
It might be something similar here: to make a score at high depth (and thus with large margin) more useful for causing hash cuts in low-depth probes, you might have to ly about the score, and it does not hurt you because at the lower depth the margin is smaller. Of course it would hurt you for hash cuts at the same depth.
So it would be better not to make it a trade-off, but let the engine be aware of what it is doing. (i.e. if a hashed score is futility-based, and if so, what margin was used, so the prober can correct it for the margin it wants to use now.) Trade-offs hardly ever give you a huge improvement...