"Robot Nemesis" by E. E. "Doc" Smith
Background
In the short story “Robot Nemesis”, humans and machines have engaged in a war for supremacy in which the humans triumphed. Machines were purged, and the survivors clustered together and searched for a way to strike back before the humans located them and completed the genocide of the mechanical race. Since none of the robots were equipped to ponder such as situation as they found themselves in, they constructed “Ten Thinkers” to organize the robot rebellion and to plan a way to eliminate the humans.
The eventual plan is for the Ten Thinkers to seize control of the human fleet of warships and pilot them into the sun. They nearly succeed, but are beaten by a wily scientist who understands what they are up to and destroys their ship, freeing the humans just in time to turn around and return to Earth.
Analysis
When races fight for their survival, morals vanish and primal instincts take over. The humans probably felt no qualms about marginalizing the robot race, and the robots had no moral objections to wiping the planet clean of the humans who planned a mechanical genocide.
Who is right and wrong in cases such as these? Does survival grant one permission to stoop to any means necessary, including genocide? Regardless of the rationalizations, the results of such actions are always disastrous for all parties involved.