Spock [to McCoy]: The most unfortunate lack in current computer programming is that there is nothing available to immediately replace the starship surgeon.
Capt. Kirk replies to an urgent message from Commodore Enright, which tells him to report to the nearest space station. Once there, most of the crew is removed from the Enterprise leaving only a minimal crew of 20 on-board. Commodore Bob Wesley (Barry Russo) arrives and informs Kirk he’s the unwitting “fox in the hunt” of simulated war games. The purpose is to test out the top-secret M-5 computer; the latest invention of the brilliant Dr. Richard Daystrom (William Marshall), creator of the computer systems which power Enterprise, as well as many high-end systems. James Doohan provides the voice of M-5, as well as playing Scotty.
McCoy [to Kirk]: Did you see the love light in Spock’s eyes? The right computer finally came along.
Daystrom (“a failing genius striving for one last success” according to D.C. Fontana) is confidant his unit can not only take control of the ship, but do a better job than humans can. At first, the Enterprise under M-5’s control, easily defeats two other starships in the games. Troubles arise when the computer begins to act on its own and can’t be shut-off! A similar theme was explored w/ HAL 9000 in 2001: A Space Odyssey (1968). Spock, who is fascinated by the working of the M-5, eventually realizes that it can’t replace the leadership of his captain. McCoy had joked earlier that Spock was in love w/ the M-5 (LOL)! In one of the best scenes, Spock explains to Kirk that a computer couldn’t ever replace the leadership of the captain.
Spock: Computers make excellent and efficient servants; but I have no wish to serve under them. Captain, a starship also runs on loyalty to one man, and nothing can replace it, or him.
In TNG, DS9, and Voyager, there are references to the Daystrom Institute that has been founded on Earth. It’s explained that Daystrom is a great man of science; he must’ve been to have his work/reputation recover from this experiment. In the 1999 essay “Welcome Aboard the Enterprise,” sci-fi author Robert J. Sawyer writes, “…the ship’s computers, as seen in ‘The Ultimate Computer,’ were designed by a Nobel-prize-winning black cyberneticist, played with equal dignity by William Marshall. During the era of MLK, Jr. and the Watts Riots, it was a powerful, important statement to have the white captain of the Enterprise deferring to black people; as Marshall observed thirty years later, the single most significant thing about his guest-starring role was that he, an African-American, was referred to as ‘Sir’ throughout the episode.”
Spock: It would be most interesting to impress your memory engrams on a computer, Doctor. The resulting torrential flood of illogic would be most entertaining.
This ep was a social commentary on the American job losses caused by increased mechanization during the ’60s. The script came from an unsolicited screenplay by Laurence M. Wolfe, a mathematician. John Meredyth Lucas chose to adapt the story, feeling that it would make for a relatively inexpensive and quick episode to produce. Fontana rewrote much of the story, as much of the original screenplay was primarily focused on Dr. Daystrom and the M-5, w/ little emphasis on the show’s regular characters. In those days, there were no writers rooms; scripts were submitted by many writers. They were often re-written to reflect Rodenberry’s vision of the series.