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
I recently discovered and read the source code for python-chess and found that they have quite an efficient (and clever) implementation for legal moves of a bishop (and other sliding pieces, like rooks and queens).
See this link for details (in particular, the implementation of the _attack_table function)
The text was updated successfully, but these errors were encountered:
It is not clear how much this particular optimization would accelerate the search overall (we'd need to profile this a bit since maybe a major bottleneck is currently elsewhere--e.g., in position evaluation), but given that there's a reference implementation which is not too convoluted, it may be worth trying (though it would be important to measure performance before and after the change)
I recently discovered and read the source code for
python-chess
and found that they have quite an efficient (and clever) implementation for legal moves of a bishop (and other sliding pieces, like rooks and queens).See this link for details (in particular, the implementation of the
_attack_table
function)The text was updated successfully, but these errors were encountered: