During a poker game, Worf, Riker, Geordi, and Crusher discuss the meaning of beards. Eventually they agree that if Dr. Crusher wins, the men all shave their beards. If one of the men wins, the doctor "becomes a brunette'. But before the game can end, the senior staff are called to the bridge.
The Enterprise arrives at Tyrus 7A, the site of a fledgling mining technology called a particle fountain. The leading scientist, Dr. Farallon, believes the project will work and is better than traditional mining technologies, but so far it has seen nothing but problems. As Geordi and the doctor are talking, a malfunction occurs. Dr. Farallon uses a tool called an Exocomp to fix the problem.
Dr. Farallon brings an Exocomp to the Enterprise for study. It is a tool that can analyze a problem and replicate the correct tool to fix it. They are small and maneuverable, and can fix things much faster than a human. Additionally, with each problem the Exocomps encounter, they "learn", gain experience, and become better machines.
During a repair, the Exocomp ignores a command and refuses to enter a tunnel. Moments later, the tunnel explodes. They bring the unit to the Enterprise and discover that a large number of pathways have been created in it. Dr. Farallon says that this means the unit must be shut down and its memory erased. But Data thinks the Exocomp may have exhibited self-preservation behavior, thus, they might be alive. Data goes to the fountain and asks Dr. Farallon to stop using the Exocomps. She thinks Data's hypothesis is ridiculous; if she stops using the Exocomps, she won't get her project done on time, and years of work will be for nothing.
Data experiments with one Exocomp, attempting to determine if it is sentient. They "threaten its existence" with a simulated overload. However, the machine does not exhibit the same self-preservation behavior as previously, and it appears to fail the "sentient test". But Data continues experimenting and realizes that the Exocomp knew the threat was not real, and continued on with the repair. With this result, there can be no explanation other than the Exocomp is intelligent and alive.
Captain Picard travels to the fountain to examine its mining potential. While he is there, a malfunction occurs. Picard orders the fountain evacuated. Everyone except Picard and Geordi are transported off the fountain, and the radiation prevents the Enterprise from transporting them. They devise a plan in which they use the Exocomps to disrupt the particle beam. However, this plan involves the destruction of the Exocomps. They are about to proceed when Data locks out the transporter controls, preventing the Exocomps from being put into danger.
Riker is upset, of course. After some discussion they come to an agreementâif the Exocomps agree to go on the mission, Data will release the transporter controls. The Exocomps agree, and repair the fountain enough to allow Picard and Geordi to be transported safely back to the Enterprise. However, they alter the plan so that only one of the Exocomps need sacrifice itself so that the remaining ones can be transported to safety.
A short time later Dr. Farallon, Data, and Captain Picard meet in his ready room. Dr. Farallon is still not sure if the Exocomps are alive, but she says that she won't exploit them. After Dr. Farallon leaves, Data asks Picard if he would like to know why he was willing to sacrifice both Picard and La Forge. Data tells Picard that when his own status was in question that Picard stood up for him, and that he would always be grateful for that. But at the same time if he had not stood up for the Exocomps, they would've been destroyed, and he could not allow that to happen. Picard tells Data it was probably the most human thing he has ever done.