TOS 1×23 ‘A Taste of Armageddon’: The Enterprise discovers a 500 year war on a planet that is run by computers that calculate the fatalities and force those people to die.