How to efficiently calculate mobility.

Code, algorithms, languages, construction...
Post Reply
AngularMomentum
Posts: 3
Joined: Mon Apr 10, 2023 12:56 am

How to efficiently calculate mobility.

Post by AngularMomentum » Wed Jul 19, 2023 9:52 am

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?

drc
Posts: 17
Joined: Mon Aug 30, 2021 5:40 pm

Re: How to efficiently calculate mobility.

Post by drc » Wed Sep 06, 2023 9:18 am

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.

Post Reply