Georgi is evaluating a new mining technology that is behind schedule. The lead scientist on the project, Dr. Farallon, has developed a robot she calls an Exocomp that is capable of adapting itself for various repair work. After saving the project from a four-month delay in a matter of minutes, she gets Picard's approval for larger-scale use.
One of the Exocomps leaves its assigned area and the conduit explodes a moment later. A diagnostic reveals that is has formed a huge number of additional circuits, and Dr. Farallon declares the unit useless. However, further investigation by Data shows that the unit has repaired its own "failures." This suggests to Data that they have gained intelligence, and he demands that Farallon stop using them as "slave laborers."
Farallon disagrees, but agrees to a test. A simulated disaster is setup in Engineering but the Exocomp does not try to save itself. Picard authorizes their continued use, but Data re-runs the test thirty-four more times. One the thirty-fifth time, Beverly distracts Data from recalling the Exocomp before it finishes the repair, and it comes back with a tool that shows it realized the "disaster" was faked and ignored it appropriately. Data's hopes are re-kindled.
While Picard is making a personal inspection of the facility, the reactor overloads and a deadly radiation field floods the station. The station is evacuated except for Picard and Geordi, who protect themselves temporarily. On the Enterprise, Farallon proposes using the Exocomps as bombs to shut down the reactor. Data objects, but Riker overrules him. Instead of complying, Data shuts down the transporters.
Riker and Data argue, and agree to let the Exocomps choose whether or not to comply. The Exocomps decide upon an alternate strategy of disabling the reactor, reprogram themselves, and send new coordinates to the transporter. They are beamed in and manage to disrupt the reactor, allowing Geordi, Picard, and two of the three Exocomps to return to the Enterprise. The third Exocomp is destroyed saving the rest. Dr. Farallon acknowledges the Exocomps are more than simple machines, and returns to restart work on repairing the facility.