Berserker (Saberhagen)
The Berserker series is a series of space opera science fiction short stories and novels by Fred Saberhagen, in which robotic self-replicating machines intend to destroy all life. These Berserkers, named after the human berserker warriors of Norse legend, are doomsday weapons left over from an interstellar war between two races of extraterrestrials. They all have machine intelligence, and their sizes range from that of an asteroid, in the case of an automated repair and construction base, down to human size (and shape) or smaller. The Berserkers' bases are capable of manufacturing more and deadlier Berserkers as need arises.
The original Berserkers were designed and built as an Ultimate Weapon, by a race now known only as the Builders, to wipe out their rivals the Red Race, in a war which took place at a time corresponding to Earth's Paleolithic era. The Builders failed to ensure their own immunity from Berserker attack, or they lost those safeguards through an unknown malfunction that changed the Berserker programming, and they were exterminated by their own creation very shortly after the demise of the Red Race. The Berserkers then set out across the galaxy to fulfill their core programmed imperative, which is now, simply, to destroy all life wherever they can find it.
Read more about Berserker (Saberhagen): Background, Books, Historical and Literary Analogy, Adaptations