 The Enterprise finds controls are taken over, and gets instructions by an android who brings them to an unknown planet. When Kirk, Spock, McCoy, Chekov and Uhura beam down as ordered, they find the master of the planet, which is populated solely by his various series of identical -mainly female- androids, is the rogue Harry Mudd, who escaped from the jail Kirk send him to and tells them he s fed up with his perfect life as their lord but may not leave until they have alternative humans to study and serve- the starship crew, which has meanwhile been beamed down and replaced aboard by androids! Most are tempted by the  guilded cage  of this remnant of an extinguished species  civilization from the Andromeda. As Spock suspected, android Norman is the coordinator of their central control computer which gets confused by illogicality. When the androids announce their plan to leave everyone stranded and take the Enterprise to subdue all human-populated planets, Mudds joins the crew, which hopes to outsmart them by calculatedly irrational behavior...