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.
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.