How to efficiently calculate mobility.
-
- Posts: 3
- Joined: Mon Apr 10, 2023 12:56 am
How to efficiently calculate mobility.
To calculate mobility, I need to loop over every enemy piece (the mobility for the moving side is already calculated by the quiscence search) which slows down my NPS from 17mil to 13mil. I can't figure out a good way to incrementally update sliding piece's attack maps. Is there a good way to do that, or some other way to make it more efficient?
Re: How to efficiently calculate mobility.
Do you use bitboard or some kind of array representation? If you use bitboard, you might look at Olithink. His evaluation mostly relies on mobility.