Open giewev opened 7 years ago
I think there may also be duplication of effort where the evaluator and move generators are both calculating danger values for a position. Additionally, danger values may be being recalculated in general, so including it in the hash lookup would be helpful. I'm not sure if I want to pass the whole transposition table into the evaluator (For both performance and code complexity). But ultimately it's probably the best way to avoid global state.
Currently we have to calculate the checks, pins, and discoveries for each board position we reach. However, on average it is likely that 2 consecutive positions have the same dangers. There are two ways that we can take advantage of this.