I've seen this question before, but the search function doesn't always help a lot

Anyway, the idea is to spend all ability points, the AI will do the same. On the highest difficulty levels (e.g. suicidal) the AI even starts getting additional bonuses to economy, social & military production. That's not the case on challenging though.