You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In search, at terminal nodes, we have to test whether or not the side to move has legal moves before returning a static evaluation of the position. Currently, this is done by invoking generateMoves() and checking if the resultant move vector is empty. However, this is slow and since terminal nodes make up a substantial portion of the visited nodes in the search, we can improve performance if we had a much simpler "hasLegalMoves()" function.
Such a function would return early upon seeing a legal move, and in positions where the side to move is not in check, we don't have to check the magic bitboards for sliders, just a one tile adjacency. As full-on move generation is quite involved it is hoped that a change like this would improve performance by a decent margin.
The text was updated successfully, but these errors were encountered:
In search, at terminal nodes, we have to test whether or not the side to move has legal moves before returning a static evaluation of the position. Currently, this is done by invoking
generateMoves()
and checking if the resultant move vector is empty. However, this is slow and since terminal nodes make up a substantial portion of the visited nodes in the search, we can improve performance if we had a much simpler "hasLegalMoves()" function.Such a function would return early upon seeing a legal move, and in positions where the side to move is not in check, we don't have to check the magic bitboards for sliders, just a one tile adjacency. As full-on move generation is quite involved it is hoped that a change like this would improve performance by a decent margin.
The text was updated successfully, but these errors were encountered: