Don't alert the AI home planets too early: if you park a big fleet right next to their home, or take the planet next to their home, you wind up with a situation like this. 20 planet maps are also pretty hard, I'd suggest 40 planets so that you can get more knowledge and such to get more ships by the time you face them.