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 made a lot of changes to the chess lib and keep them in a branch improvements in my fork.
I invite everyone being interested to take a look at my changes. Those are so many, that I cannot bulk-PR them here.
What I did so far in general terms:
Speedup of many functions.
Added Bitboard |&^ Square operations like in SF. This removes the need of using Bitboard::fromSquare(...) and shortens the code
Refactor of Board::prev_states_: It has been replaced with states_. So all those parameters that cannot be reconstructed or recalculated too costly will go into its own state (like SF). This has the advantage that it requires less copying of parameters. A simple pop_back() will get you the old state in unmakeMove.
Added extended Board::pieces functions that accept two PieceTypes. We often need the bitboards of rooks and queens or bishop and queens together. So this shortens the code.
External programs often need the checkmask and pin information. I will put these as additional info to the state. So these informations won't be private within the code but visible for the user.
Introducing pext for magic bitboard -> speedup of slider attacks. This can be disabled (old usage) with a macro.
Also the initSliders of the magic bitboards is completly refactored by using a template for bishop and rook attacks -> simple few lines of code instead of two bulky functions.
Added more operators for some classes to make loops more easy.
Personal taste: I have removed ALL static_cast instructions as those blow up the code. I prefer "old" C-Style conversion.
So... If you are interested in it, leave me comment. I'd be happy to here from you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone!
I made a lot of changes to the chess lib and keep them in a branch improvements in my fork.
I invite everyone being interested to take a look at my changes. Those are so many, that I cannot bulk-PR them here.
What I did so far in general terms:
Speedup of many functions.
Added Bitboard |&^ Square operations like in SF. This removes the need of using Bitboard::fromSquare(...) and shortens the code
Refactor of Board::prev_states_: It has been replaced with states_. So all those parameters that cannot be reconstructed or recalculated too costly will go into its own state (like SF). This has the advantage that it requires less copying of parameters. A simple pop_back() will get you the old state in unmakeMove.
Added extended Board::pieces functions that accept two PieceTypes. We often need the bitboards of rooks and queens or bishop and queens together. So this shortens the code.
External programs often need the checkmask and pin information. I will put these as additional info to the state. So these informations won't be private within the code but visible for the user.
Introducing pext for magic bitboard -> speedup of slider attacks. This can be disabled (old usage) with a macro.
Also the initSliders of the magic bitboards is completly refactored by using a template for bishop and rook attacks -> simple few lines of code instead of two bulky functions.
Added more operators for some classes to make loops more easy.
Personal taste: I have removed ALL static_cast instructions as those blow up the code. I prefer "old" C-Style conversion.
So... If you are interested in it, leave me comment. I'd be happy to here from you.
Greetings
Achim
Beta Was this translation helpful? Give feedback.
All reactions