What determines military victory?

The A.I. can surrender. To win a military victory you can either kill all players and thier planets/fleets, or the A.I. can surrender. It more likely they will surrender, so don't worry too much, athough frustrating to win premuturely just because the A.I. doesn't want to continue. Things that can increase the chance of them surrendering is a much bigger fleet than them while they have a smaller one via lack of resources to fill their extra fleet supplie or you cutting them down. It's most likely to happen when they only have a handful of planets left and a considerably small fleet when compared to yours. It also explains why the A.I. die mid game even though they still have some planets whether there is anyone attacking them or not.