Page 1 of 1

How to efficiently calculate mobility.

Posted: Wed Jul 19, 2023 9:52 am
by AngularMomentum
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.

Posted: Wed Sep 06, 2023 9:18 am
by drc
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.