I recently had several planets that were invaded by a "lesser" opponent. I was defeated and was unsure why. It looked like my tech was significantly better. I had all of the invasion protection that I had built on the planet. I had plenty of people and the invader only had one transport with 2.5 population.
So this raised the question of how the math works for an invasion. I know the generalities of how it works but does anyone know the specifics of the math that decides win/lose?