Global alpha-beta
portnov opened this issue · 1 comments
portnov commented
Currently at top level we run alpha-beta search basically in N threads, where N is number of possible moves. Each call of scoreAB receives the same (alpha, beta) interval.
Obviously, when we ended calculating one move (one thread finished working), we could of say other threads to tighten their intervals correspondingly.
For that, we have to have a pair of global mutable variables (globalAlpha, globalBeta), update them at the end of scoreMove and use them to refine current (alpha, beta) interval at each step.
portnov commented
Currently there is a simple version of global alpha-beta: "best" value is shared between the threads, but only on the first level of branching.