The AI is very prone to surrender when it lacks the funds to rebuild its fleet to a comparable level to your's. It has nothing to do with difficulty, and everything to do with the AI simply being out of options. In all honesty, every time I've seen the AI surrender they've been horribly outgunned and outnumbered. Sometimes they have enough units and planets to make a good last stand, but as satisfying as it may be for you to crush their last strongholds it's really already over anyways.
As I've said before, the AI needs to get progressively more "desperate" and aggressive as the player builds an advantage against it. Right now the problem is that they spontaneously surrender due to an immediate disadvantage, but the causes of that disadvantage didn't appear spontaneously. We need an AI that recognizes that it's losing the economic, colonization, or tech war and starts being more aggressive. On the other hand, I often find on smaller maps the AI will never surrender and I have to chase it down to its last dead asteroid to win. It's silly when it has no units, no frigates, no structures, just a planet with 6000 hp and it forces me to bombard it to death with my one capital ship.