This question already has an answer here:
Okay, so Thanos ultimate goal was to "Kill half of all livings things".
But what I don't understand is, "Killing half of all living things" Lets say we have two planets with intelligent life and the population is exactly the same. You could theorize that "Killing half of all living things" could actually just wipe out one race on a single planet and save the other race and effectively not make a difference to Thanos's ultimate goal of balance in the universe.
Or was the Gauntlet and Infinity stones able to determine what species needed to be killed and therefore killing half of that species only? Or was it Thanos that instructed the infinity stones to do what they needed to do?