"More complex than Brown. Much superior. I was left here by the Old Ones."
Ruk was an android found by Dr. Roger Korby in the underground ruins of Exo III. Ruk was built centuries earlier by the Old Ones; when Korby found him in 2261, he was still tending the machinery they had left behind. Even he did not remember how many centuries he had been doing this work.
In 2266, Captain James T. Kirk and Christine Chapel arrived at Exo III in search of Korby. By then, Korby had reprogrammed Ruk to serve him, and had devised a scheme to infiltrate android duplicates into society slowly and carefully. As part of that scheme, Korby and Ruk imprisoned Kirk and Chapel, and built a duplicate of Kirk to take control of the Enterprise.
Questioned about his origins by Kirk, Ruk remembered that the androids, presumably including himself, had become frustrated by the illogic and inferiority of the Old Ones. In turn, the Old Ones became frightened of their creations, and began turning them off. Their survival at stake, the androids overcame their programming and slew their makers. Once Ruk remembered this, he overcame Korby's programming the same way. No longer able to control Ruk, Korby destroyed him.
Ruk was tall, broad and immensely strong, capable of lifting a Human male easily with one hand. Despite his size, he could move silently and gracefully, making him an extremely dangerous physical opponent. He could duplicate voices effortlessly – his actual voice was very low-pitched and gravelly. He knew how to maintain and operate the machinery left behind by the Old Ones. (TOS: "What Are Little Girls Made Of?")
"More complex than Brown. Much... superior."
"THAT was the equation. EXISTENCE!... SURVIVAL... must cancel out programming!"
Ruk was portrayed by Ted Cassidy.
Ruk always referred to the Old Ones in the third person; it was unlikely that Ruk was an Old One preserved in an android body. He was most likely constructed to do what he was doing when Korby found him: maintain the machinery.
Ruk could forget, unlike conventional computers that do not normally lose data once it had been stored. This suggested that his memory operated according to different principles than those conventional computers are based on. Alternatively, his memories might have been deliberately altered or obscured during his reprogramming by Korby.
According to the novella "The Worst of Both Worlds", the mirror universe James T. Kirk of the ISS Enterprise destroyed the last surviving member of the android society (presumably Ruk's mirror counterpart) on Exo III, who had likewise turned on their masters and killed them.