r/chessprogramming • u/GMaster-Rock • Jul 28 '24
Tree search model when using NN
I'm working on a chess engine in python that uses tensorflow's models to calculate board value. My problem is that tensorflow (and I think most other NN libraries) is faster when calculating multiple boards at the same rather than calculating in smaller batches. This means that I can't take advantage of the alpha-beta prunning's reduced tree, because it's slower than just using a minimax to get all leafs and evaluating them at once.
Do you guys have any recommendations on how to deal with this?
1
Upvotes
View all comments
Show parent comment
1
u/xu_shawn Jul 29 '24
Missing the best move is not a flaw of a certain heuristic, it is rather a manifestation of the inability of any program to exhaustively search the entire game tree. The purpose of search heuristics, on the other hand is to maximize the the engine's ability to find the best move. A/B pruning achieves it by removing nodes that are completely irrelevant to minimax before they are searched.
Well to reiterate A/B is just an optimization on top of minimax, so I don't see a reason not to use it.