Stardate 4513.3: Spock and McCoy discuss the new crewman, Norman, and McCoy notes that the man never smiles and never discusses his background. Meanwhile, Norman goes into auxiliary control and takes it over, and sets the Enterprise on a new course. Norman locks the controls then goes to Engineering and casually knocks out the crew. The ship picks up speed and Norman arrives on the bridge to reveal that he now has control of the ship and has rigged it to destroy. Norman assures them it requires their ship but means no harm to humanity, then reveals that he's an android.
Norman refuses to answer any other questions and turns itself off, and four days later he revives to announce they've reached their destination. Norman forces Kirk and the bridge crew to beam down. They arrive to find more androids… and their old nemesis Harcourt Fenton Mudd. Mudd claims to be the ruler of the planet and warns the Enterprise crew should get used to the planet, as they'll be there for a while. Mudd displays all the female androids he's created and explains how he escaped but ended up on the androids' planet. They won't let him go because they want to study humans, and insisted that Mudd bring them the Enterprise crew in return for his freedom. Harry shows off an android replica of his wife Stella so he can celebrate her absence and shut her up whenever he wants.
Norman explains that their humanoid makers were from the Andromeda galaxy but their home planet was destroyed and the androids remained at one of their exploratory outposts. After they tell the androids to leave, Spock suggests they find the central processing unit and explore the facility. Spock finds a central facility and talks to Norman, which temporarily immobilizes before saying it's not programmed to respond in that area. Meanwhile Mudd shows off his female android creation system and Uhura expresses interest at obtaining an immortal body. The others are equally intrigued by what the androids can provide, but then the androids bring down Scotty and the rest of the crew. Mudd plans to leave with the androids while the crew begins to enjoy the fact that the androids can provide anything they ask for.
Kirk and the others confront one of the Alice androids about how they want the Enterprise, and she is confused and immobilizes herself while trying to coordinate with Norman. She eventually dismisses their concerns and leaves. Kirk goes to confront Mudd as he prepares to depart and enjoys one last session with his android wife. However, the androids announce that they won't let Mudd leave and have planned to keep him all the time, but tricked him. Norman announces that they will make all other races dependent on them and then "take care of them."
Spock notes that the control facility he saw was inadequate to control all of the androids, and there is only one Norman android. Kirk realizes that the androids use Norman to coordinate, and they can overwhelm the androids with illogic. Kirk has McCoy drug Mudd to help them out and then say that he's dying, and ask one of the Alice's to let them take him to sickbay. Uhura betrays them in return for an android body and Alice is satisfied that she has foiled Kirk's plan. After Alice leaves, they confirm Uhura was supposed to fake a betrayal to put the androids off guard.
Kirk then goes to the throne and calls two Alice androids out so they can watch the crew perform mock singing and dancing. The Alices lock up and meanwhile Spock goes to confront another Alice android and confuses them with a paradox. They all get back together and decide to overload Norman, which should take out the other androids. They confront Norman and demand his surrender. Mudd then spins out a tale of how humans need freedom to suffer and Scott and McCoy back him up. Norman asks Spock to clarify and the Vulcan tosses him some poetry to confuse him further. The crew then mock-kill Scotty then rig up an imaginary explosive and as it goes off, the Alices collapse and then finally Norman himself locks up for good.
The Enterprise crew prepare to depart but Kirk has a surprise for Mudd: he'll be leaving him there in the reprogrammed androids' care. Mudd begins to consider being stranded on a planet of obedient androids a perk… until he discovers that Kirk has reprogrammed the Stella android so it doesn't obey Mudd any more. And Kirk's ordered more of them created.