The Ultimate Computer ( episode ) The " Enterprise " tests a computer that , if successful , could replace Kirk as the captain . Summary . Teaser . The is summoned to a space station by Commodore Enwright without explanation . Commodore Bob Wesley , commanding the , explains in the " Enterprise " s transporter room that the " Enterprise " will be a test vessel for a revolutionary tactical computer called the M - 5 multitronic unit , designed by the brilliant Dr . Richard Daystrom . The M - 5 will handle all ship functions , including responding to a simulated attack led by Wesley , during the test with a crew of only twenty , much to Captain Kirk ' s chagrin . Act One . Dr . Richard Daystrom , who designed the duotronic computer s used on the " Enterprise " , arrives on board to install his new M - 5 multitronic unit , which is capable of running a starship with only minimal personnel . Kirk , Spock , and Dr . McCoy meet him in engineering , where he is finishing up the installation . Daystrom explains the first four units weren ' t entirely successful , but this one has the capability to control the ship . Responding to Kirk ' s skepticism , he challenges Kirk on enjoying the prestige of the captaincy . Spock stays with Daystrom , while Kirk and McCoy leave . Kirk wrestles with his own unease about the advance in technology and his own possible obsolescence . The " Enterprise " , under M - 5 control , approaches the planet Alpha Carinae II , achieves standard orbit , and makes its recommendations for the landing party . As the first example of the difference between the M - 5 ' s decisions and those of a Human , Kirk ' s recommendation is at odds with the M - 5 ' s call , which includes the same astrobiologist , Phillips , a different geologist ( Chief Rawlins instead of Ensign ) , and doesn ' t include Kirk or McCoy in the landing party , calling them " non - essential personnel . " While this is going on , Montgomery Scott is observing that power on decks 4 and 5 is cut , along with environmental controls for each deck . He traces the source of the power shutdowns to be the M - 5 itself . Act Two . In engineering , Dr . Daystrom examines the situation , but explains that the M - 5 simply turned off the power to those decks since they were unoccupied crew quarters and there was no one there that needed it . Spock also observes the M - 5 is drawing more power than before , which Daystrom simply responds that more is required of it . Kirk again challenges Daystrom that the M - 5 can only process information given to it ; it cannot make value judgements . Daystrom dismisses this and describes the M - 5 as " a whole new approach " to logic systems . An unidentified vessel cuts off the conversation and brings Kirk and Spock to the bridge . Dr . McCoy is already there , since the sickbay ' s power was also cut by the M - 5 . The " Enterprise " is approached by two ships , the " Lexington " and . They engage in an unscheduled wargames drill , and the M - 5 responds swiftly to simulated attacks , hitting back the " enemy " ships and maneuvering more quickly than it would have were a Human in command . Kirk tries to be gracious towards the computer ' s ability , telling Spock that such applications might be practical , but Spock tells Kirk that although true , such a thing as a computer running a starship would be undesirable . He goes on to explain that a key attribute of Human command is loyalty , loyalty to one man , and that this should never change . Captain Kirk , whose ego has been somewhat beaten up by all that has been going on recently , appreciates the comment . Meanwhile , the M - 5 is seen to be drawing increasing amounts of power . Wesley communicates back , awarding the test to the M - 5 and jokingly calling Kirk a " Dunsel . " Dismayed by this , Kirk goes to his quarters to contemplate the increasingly successful M - 5 . McCoy arrives with a Finagle ' s Folly . Their conversation is cut off , as the " Enterprise " s sensor s detect a slowly moving ship . It is the automated ore freighter " Woden " , and not a drill this time . M - 5 abruptly changes the " Enterprise " s course to intercept the ship , speeding up to warp 3 . It then engages the ship with photon torpedo es , destroying it , even though it presented absolutely no threat to the " Enterprise " , and then resumes its prior course . Captain Kirk tries to disengage the M - 5 in the process , but neither he , Sulu , nor Scott are able to regain manual control of the ship . Dr . Daystrom still tries to make excuses and explanations for this , but there is clearly something very wrong . Kirk , Spock , and Scott go to engineering and Kirk tries to approach the M - 5 to shut it off , only to be knocked back by a force field , learning the M - 5 unit will protect itself as well . Act Three . Kirk is infuriated now . He demands Daystrom shut off the unit , but Daystrom insists that he correct it first . Kirk has Scott attempt again to cut its power , but when Ensign , working with a trident scanner , moves in to cut the power , the M - 5 vaporizes him and makes a direct connection to the warp engines using a power beam of its own devising . Shocked and enraged , Kirk berates Daystrom for being unable and unwilling to deactivate the M - 5 . Daystrom continues to excuse the M - 5 ' s behavior , insisting that Harper " . . . simply got in the way " of the M - 5 ' s progress , and that his death was not a deliberate act . Kirk fires back at Daystrom , asking , " " How long will it be before all of us simply ' get in the way ' ? " " . In the briefing room , the senior staff collaborates on a plan to gain back control by focusing on a certain relay unit between the M - 5 and the bridge . McCoy goes to Daystrom to convince him to shut off the M - 5 . Daystrom , on the other hand , defends the M - 5 , saying it ' s learning , and further , that the advance the M - 5 represents would liberate man from hazardous duties , saving life . McCoy notes later to Kirk that Daystrom reacts toward the computer as a father would to his child . Kirk and Daystrom observe Spock and Scott attempt to gain control , but Sulu and Chekov report it is unsuccessful . They realize the relay they were working on was a decoy , leading Spock to note the illogical behavior of the M - 5 unit . Daystrom explains he impressed Human " engrams " onto the circuits . " " The relays are not unlike the synapses in the brain , " " Daystrom explains to Captain Kirk . " " M - 5 " thinks , " captain . " " Uhura reports the four Federation ships as part of the scheduled war exercise , but now Kirk fears the M - 5 will not treat it as a drill . Act Four . As the war games exercise begins , M - 5 has prevented all communication . The " Lexington " , " Excalibur " , " Hood " and " Potemkin " are approaching . Daystrom assures that the M - 5 will treat it as a drill , but then the M - 5 attacks the " Lexington " and " Excalibur " with all weapons at full power , crippling the " Excalibur " in the process . Despite knowing that M - 5 will have full tactical and functional control of the " Enterprise " , Commodore Wesley blames Kirk for the attack . When Wesley cannot raise the " Enterprise " by radio , he requests approval from Starfleet Command to destroy her . Now that the M - 5 has committed murder , Kirk confronts Daystrom , convincing him that the M - 5 is doing more than originally designed . He demands that Daystrom attempt to reason with M - 5 , as Daystrom admits it is his engrams that he imprinted on the machine . However , he goes mad in the effort , realizing his reputation is at stake . In his delirium , he lashes out at Kirk , but is subdued by a Vulcan nerve pinch from Spock . McCoy hauls him off to sickbay , and Spock notes the self - preservation that the M - 5 is displaying is probably a consequence of Daystrom ' s engram imprinting . Hearing that Starfleet has agreed that Wesley can destroy the " Enterprise " , Kirk himself tries to force the computer to recognize its responsibility in the deaths of hundreds of people as there are no more life readings on the " Excalibur " . Feeling Daystrom ' s regret over the deaths , M - 5 shuts down , dropping the deflector shield s and leaving itself open to attack to atone for its crime . Spock and Scott then disconnect the computer from ship ' s control . With communications not quite restored , Kirk orders that the shields be kept down , gambling that Wesley will be both compassionate and cautious and break off the battle . Sure enough , Wesley does so , much to the crew ' s relief . Dr . Daystrom , meanwhile , is cared for in sickbay under sedation and heavy restraint to await transfer to a total rehabilitation facility , under McCoy ' s recommendation . Kirk orders that Sulu plot a return course to Starbase 6 . Memorable quotes . " " There are certain things men must do to remain men . " " " " Did you see the love light in Spock ' s eyes ? The right computer finally came along . " " " " Only a fool would stand in the way of progress . " " " " We ' re all sorry for the other guy when he loses his job to a machine . When it comes to your job , that ' s different . And it always will be different . " " " " Computers make excellent and efficient servants , but I have no wish to serve under them . Captain , the starship also runs on loyalty to one man . And nothing can replace it , or him . " " " " Our compliments to the M - 5 unit , and regards to Captain Dunsel . Wesley out . " " " " To Captain Dunsel . " " " " To James T . Kirk , captain of the " Enterprise " . " " " " All I ask is a tall ship , and a star to steer her by . " " " " Fantastic machine , the M - 5 . No off switch . " " " " Come along , Dr . Daystrom . M - 5 is out of a job . " " " " I would say , captain , that M - 5 is not only capable of taking care of this ship , it is also capable of taking care of itself . " " " " You mean it ' s not going to let any of us turn it off ? " " " " Please , Spock , do me a favor and don ' t say it ' s fascinating . " " " " No . But it is . . . interesting . " " " " You don ' t shut a child off when it makes a mistake . M - 5 is growing , learning . " " " " Learning to kill . " " " " To defend itself . It ' s quite a different thing . " " " " Men no longer need die in space or on some alien world ! Men can live and go on to achieve greater things than fact - finding and dying for galactic space , which is neither ours to give or to take ! " " " " Genius doesn ' t work on an assembly line basis . " " " " You can ' t simply say , today I will be brilliant . " " " " It appears , captain , we ' ve been doing what used to be called pursuing a wild goose . " " " " Commodore Wesley is a dedicated commander . I should regret serving aboard the instrument of his death . " " " " Murder is contrary to the laws of man and God . " " " " Compassion . That ' s the one thing no machine ever had . Maybe it ' s the one thing that keeps men ahead of them . " " " " I simply maintain that computers are more efficient than Human beings , not better . " " " " But which do you prefer to have around , Mr . Spock ? " " " . . . I believe I have already answered that question , doctor . " " " It would be most interesting to impress your memory engrams on a computer , doctor . The resulting torrential flood of illogic would be most entertaining . " " Links and references . References . A - 7 Computer expert ; Alpha Carinae II ; ; article ; astrobiologist ; " Bones " ; ; chicken soup ; class M ; comptronic ; computer ; death penalty ; dunsel ; duotronics ; Earth ; Einstein , Albert ; engram ; ; " Excalibur " first officer ; Federation ; Finagle ' s Folly ; fire control ; general quarters ; geologist ; goose ; ; ; Kazanga ; kilometer ; ; logic ; M - 1 multitronic unit ; M - 4 multitronic unit ; M - 5 multitronic unit ; Merchant Marine ; mining ; multitronics ; nervous breakdown ; nitrogen ; Nobel Prize ; ; oxygen ; parallel course ; patient ; Phillips ; Phillips ' survey planets ; ; Rawlins ; red alert ; robot ship ; Sakar ; " Sea - Fever " ; Sitar ; skeleton crew ; standard orbit ; Starbase 6 ; Starfleet Academy ; Starfleet battle simulation ; Starfleet Command ; suicide ; tour of duty ; Vulcan ( planet ) ; Vulcan neck pinch ; warp power indicator ; " Woden " ; Zee - Magnees Prize