******STARSHIP-SIZED SPOILERS!******
When Star Trek the Original Series (TOS) aired its second season episode “The Ultimate Computer” in March of 1968, factories and automobile assembly lines in the US were introducing new generations of machines controlled by bulky, room-sized computers that threatened the jobs of many workers. It was in that climate that Star Trek writer/story editor Dorothy Fontana wrote the script for that episode, from a story credited to Laurence N. Wolf. In “The Ultimate Computer,” Captain Kirk’s command is threatened when the revolutionary M-5 computer is used to automate the starship Enterprise, which serves as a testbed. Unfortunately, the episode has aged all too well, as increasing waves of customer service and other human jobs in our 21st century are being outsourced to artificial intelligence (AI). Even creative jobs, such as writing, acting and filmmaking are threatened. AI can create texts, manuscripts, visual artwork, television commercials, and even virtual performances, with only a few commands into ChapGTP, Grok or some other damned thing.

Dr. Richard Daystrom (William Marshall), Lt. Uhura (Nichelle Nichols), Dr. McCoy (DeForest Kelley) and Captain Kirk (William Shatner) watch in impotent rage as the M-5 computer goes rogue during a routine war games exercise.
Unlike the episode’s unstable M-5 computer, which was built by its unstable creator, Dr. Richard Daystrom (William Marshall), current AI shows no signs of self-destructing anytime soon. Just about every day I find myself interacting with AI whenever I book a hotel, make a medical appointment, or some other role once filled by actual human beings. Personally, I find dealing with AI to be a pain in the ass, since it doesn’t ‘get’ subtle nuances of human interaction that makes dealing with real people easier. AI has also contributed greatly to disinformation in media, as the current administration of the United States (at the time of this writing) often uses AI-generated images/videos for official social media releases. Elon Musk’s Grok AI is to be integrated into the US military. Worse, the US government is fully onboard with deregulating AI, which severely impacts the environment with its insatiable demands on the power grid (like Daystrom’s M-5 computer).
It’s in this climate “The Ultimate Computer” finds new relevance today. In both the 21st and 23rd centuries, shortsighted humans seem hellbent on crafting their own obsolescence…
“The Ultimate Computer” (1968)

Mr. Spock (Leonard Nimoy) and Captain Kirk welcome aboard Commodore Bob Wesley (Barry Russo), who tells them the Enterprise has been chosen to test the new M-5 super-computer in a series of problem-solving and war games. Since the ship’s full complement of 430 are not needed for the tests, Kirk’s crew is reduced to 20 people (saving on extras).
Note: The space station where the Enterprise picks up Commodore Wesley is stock footage of space station K-7 from “The Trouble with Tribbles” (unless you’re watching the 2007 special editions, of course) and Commodore Wesley himself is played by actor Barry Russo, who appeared as Enterprise Security Chief Commander Giotto in the first season episode “The Devil in the Dark” (quite the promotion from Commander to Commodore…). Incidentally, Giotto was also the name of the European Space Agency probe that rendezvoused with Halley’s Comet in 1986, and was named after Giotto di Bondone, the artist who famously painted the comet in his early 14th century artwork.

On their way to Engineering to see the M-5 computer installation, McCoy, Kirk and Spock have a philosophical debate about machines replacing people. McCoy is firmly against it. Kirk is ambivalent. Spock recognizes the achievement of such a computer, but does not offer firm judgment for or against.
Note: McCoy and Spock have another of their classic debates of heart vs. intellect, yet Spock never fails to address the illogic of retrofitting a manned starship for automation when they could just as easily build large drone ships without life support, food, etc. So why not add an M-5 onto a more streamlined robot ship? No muss, no fuss. Spock also delivers a prophetic jab at McCoy when he sardonically quips, “The most unfortunate lack in current computer programming is that there is nothing available to immediately replace the starship surgeon.” In the late 24th century, the starship Voyager would indeed address that problem with its Emergency Medical Hologram, aka “The Doctor” (Robert Picardo). The EMH not only replaced Voyager’s dead Chief Medical Officer, but did so very well, in fact. Picardo would revisit the role in several Star Trek spinoffs, including “Star Trek: Prodigy” and most recently in “Star Trek: Starfleet Academy.”

Kirk meets the lauded creator of the M-5 multitronics unit, Dr. Richard Daystrom (William Marshall). Daystrom is completing final installation of his M-5 unit into the ship’s main power plant. Spock is honored to meet Daystrom. McCoy? Not so much.
Note: Portions of the M-5 control panel would be re-used as Agent Gary Seven’s Beta-5 computer in the TOS final season 2 finale, “Assignment: Earth” (a backdoor pilot for a new super secret agent series from Gene Roddenberry which used Star Trek as its launchpad). Portions of the M-5 would also be seen as the control interface for the “Atavachron”; a sophisticated time portal that helped the population of the doomed planet Sarpeidon escape into their own past in the late season 3 episode, “All Our Yesterdays” (an underrated episode, IMO).

The impatient Dr. Daystrom shares something in common with his admirer, Mr. Spock; a low tolerance for Dr. McCoy.
Note: Like Ricardo Montalban as Khan in season 1’s “Space Seed,” guest star William Marshall (1924-2003) owns much of this episode as the brilliant, but neurotic Dr. Daystrom. Marshall would costar in “The Boston Strangler” that same year, and would later sink his teeth into the role of “Blacula” (1972) and its sequel, “Scream, Blacula, Scream” (1973); two of the more popular ‘blaxploitation’ movies of the 1970s, along with Richard Roundtree’s “Shaft” trilogy, and its 2000 sequel/remake (starring Samuel L. Jackson). The underrated Shakespearean actor would also appear as the King of Cartoons on “Pee-Wee’s Playhouse” (1986) and would play the hilariously swashbuckling leader of the “Video Pirates” in the anthology comedy, “Amazon Women on the Moon” (1987).

Confiding in McCoy, Kirk addresses his vague unease with the M-5 (“I’m getting a red alert right here…”) as well as his petty fears of losing command to a computer. McCoy advises that if he has the awareness to ask those questions, he can answer them, too.
Note: Like other bottle shows, such as “The Changeling” and “The Immunity Syndrome,” “The Ultimate Computer” focuses more on character than razzle-dazzle. The late writer/story editor Dorothy Fontana (1939-2019) put together a solid script, though the flat, uninspired visual direction by late second season producer John Meredyth Lucas adds little flourish.

The energy-hungry AI of M-5 feasts on the ship’s power grid.
Note: The idea of dangerous omnipotent computers would be a recurring one in science fiction shortly after this episode. “The Ultimate Computer” was released a month before the debut of “2001: A Space Odyssey” (with its deadly HAL9000 computer), and two years before “Colossus: The Forbin Project” saw a mated network of Russian and American military supercomputers that decided to keep all humans under strict control (think Skynet meets HAL). In those days, high-powered computers were usually depicted as ominously-sized, labyrinthine mainframes (which are still in use in large labs) instead of the smaller, more user-friendly personal devices commonly used everywhere today.

Kirk and Sulu (George Takei) watch as the M-5 does their jobs by taking the Enterprise into orbit around planet Eta Carinae 2, where it submits landing party recommendations which exclude Captain Kirk and Dr. McCoy as “nonessential personnel.” Daystrom beams with pride, while Kirk is not impressed.
Note: As noted earlier, this was clearly a budget conscious episode, so the robotic voice of the M-5 interface was provided by series regular James Doohan (1920-2005), who played Chief Engineer Montgomery Scott. The usual voice of the Enterprise computer was provided by Majel Barrett (1932-2008), who played “Number One” in TOS’ 1964 pilot “The Cage,”and would play Nurse Chapel in the regular series. Barrett would later marry series creator/producer Gene Roddenberry after the series ended, and they’d remain married until his death in 1991. Casting Doohan as a male computer voice gives the M-5 a sharp contrast to the softer voice of the Enterprise’s regular ‘duotronic’ computer.

After the M-5’s successful planet survey simulation, Scotty discovers seemingly random power losses occurring throughout the Enterprise.

Daystrom discovers the mysterious power losses are the result of M-5 cutting power to unused areas of the ship. When Kirk asks exactly how M-5 works, Daystrom explains that unlike duotronic computers (which he also created), M-5’s relays mimic the synapses of the human brain, making it ‘think’ more like a human than a machine.
Note: The unexplained power losses make for a nice red herring that seems threatening enough, though they’re revealed to have disarmingly pragmatic and logical reasons.

An unscheduled battle drill with the starship Lexington, under the command of Commodore Wesley, is successful. The M-5 responds perfectly, using phasers at 1/100th power, with no appreciable damage to either ship. Wesley then throws an insult to his ‘friend’ Kirk, calling him “Capt. Dunsel”; a part which serves no useful purpose. Ouch!
Note: I know that Kirk defends Bob Wesley’s character and personal morality later on in the episode, but here, Bob Wesley seems like a real d!ck for kicking his ‘friend’ Kirk while he’s down.


Note: The drinking scene between Kirk and McCoy in his cabin quotes the 1902 John Masefield poem, “Sea Fever,” with a verse (“All I ask is a tall ship…”) that would be reused in “Star Trek V: The Final Frontier” (1989). McCoy often stops by with a morale boost to a self-doubting Kirk, as seen in “Balance of Terror.” In the movies, McCoy would bring birthday gifts (and Romulan ale) to ‘Admiral’ Kirk in “Star Trek II: The Wrath of Khan” (1982) and in the Kelvinverse, McCoy once again commiserated with Kirk on his birthday (and his father’s death day) in “Star Trek Beyond” (2016).

The unscheduled appearance of an automated ore freighter called the Woden somehow causes the M-5 to overreact, and it destroys the robotic ship with a photon torpedo. Kirk orders Daystrom to immediately disconnect the computer.
Note: This marks the first real malfunction of the M-5 in the episode, and it’s genuinely alarming. McCoy’s anger echoes the audience’s apprehension (“Your brilliant young computer just destroyed an ore freighter!”). The destroyed ore freighter “Woden” appeared in the original version of this episode as stock footage of Khan’s late 20th century derelict, Botany Bay. The 2007 special edition would reimagine the ship as an Antares-class vessel (as seen in Star Trek: The Animated Series’ “More Tribbles, More Troubles,” and in the 2007 remastered version of “Charlie X”).

As he enters the engine room with Daystrom, Spock and Scotty to shut down the M-5, Kirk is zapped by the M-5’s newly-created forcefield. This is M-5’s first actual ‘attack’ on a human being, but not the last…

When Scotty suggests they disconnect the M-5 from the ship’s power supply, the computer sends out a powerful beam of energy to connect directly with the warp engines–which vaporizes a redshirted ensign who simply “got in the way,” according to Daystrom.
Note: In an episode that is otherwise light on action, the horror of the ensign simply “getting in the way” of the M-5’s vaporizing power beam still works for both drama and shock. The M-5’s hunger for more power also foreshadows the adverse affect on our world climate by the creation of additional power plants to feed new power-hungry AI centers (“Why AI uses so much energy — and what we can do about it,” PennState)

Alone in the briefing room, McCoy presents Kirk with a psychological profile on Daystrom, and implies that the neurotic genius is having a midlife crisis. Kirk finds himself defending Daystrom’s earlier achievements, despite the M-5’s failures.
Note: Daystrom is such a powerful presence that he dominates scenes even when he’s not on screen. We learn through McCoy that Daystrom was a child prodigy/wiz-kid who’s suffering a midlife crisis, and has pinned all his hopes on the M-5’s success, after “the government bought it.” This begs the question; does the Federation use money or not? Do Federation contractors go unpaid?

Scotty and Spock concoct a technobabble plan to short out M-5 inside of a Jeffries tube.
Note: The Jeffries tubes containing the Enterprise’s relays (first seen in “The Naked Time”) were affectionately nicknamed after Star Trek art director and production designer Matt Jefferies (1921-2003), whose grounded ideas for the Enterprise gave the ship a seeming functionality it might not have otherwise had onscreen.

Kirk restrains Daystrom, who makes a desperate attempt to stop Spock from shorting out the M-5’s control. Unfortunately, the M-5 is a few steps ahead of them all, and Spock’s plan doesn’t work.

Meanwhile, a fleet of four Federation starships, Lexington, Excalibur, Hood and Potemkin arrive for the scheduled M-5 war games, but the M-5 has cut voice communications from the Enterprise crew and answers hails from the other ships itself.
Note: This is one of those scenes where I prefer the 2007 special edition of this episode, since the battle scene between the five starships is allowed more action and fluidity of movement than was possible in the 1968 version, which relied on stock footage from “The Doomsday Machine” as well as a quadrupled optical print of the Enterprise to represent the other four starships.

The M-5 unloads on the Lexington withfull phasers, and Wesley demands an answer from Kirk, not realizing it’s the M-5’s doing.
Note: Sure, when everything goes well, Bob Wesley sends his snarky regards to “Captain Duncel,” but when the Lexington is fired at with full phasers, Wesley blames Kirk, not the M-5. Like I said, Bob Wesley is a bit of a d!ck.

Daystrom, Uhura and Kirk watch in horror as several Federation starships are crippled, with one of them dead in space. With nothing left to lose, Kirk encourages the guilt-ridden Daystrom to try and reason with his homicidal creation.

Daystrom begs his creation to stop its attacks on the starships, until his own insecurities and old resentments begin to surface, and sabotage the attempt. As Daystrom’s psychosis is revealed, Spock realizes the M-5 mirrors Daystrom’s mind–flaws and all.
Note: The combination of Fontana’s dialogue and Marshall’s increasingly psychotic delivery create one of the best antagonist scenes in TOS history, as Daystrom’s old resentments resurface: “We will survive. Nothing can hurt you. I gave you that. You are great. I am great. Twenty years of groping to prove the things I’d done before were not accidents. Seminars and lectures to rows of fools who couldn’t begin to understand my systems. Colleagues. Colleagues laughing behind my back at the boy wonder, and becoming famous building on my work. Building on my work!” Once again, a round of applause to Dorothy Fontana, who was only in her late twenties when she wrote this script (!).

Kirk reminds the distracted Daystrom that the M-5 must be destroyed, and Daystrom haughtily retorts, “Destroyed, Kirk? No! We’re invincible! Look what we’ve done! Your mighty starships, Four toys to be crushed as we choose…” which prompts Spock to give the mad doctor one of his patented Vulcan neck pinches.
Note: William Marshall really sells the neck-pinch, too, even though the 6’5″ actor is forced to ‘walk’ away into the turbolift with Spock–despite his ‘unconsciousness.’ Don’t ask me how, but Marshall makes that awkward bit of stage-blocking work somehow.

Remembering he’s already talked several super-computers into self-destruction, Kirk takes a try at talking M-5 into deactivation. Kirk succeeds, after reminding M-5 that it’s committed murder–which goes against its prime directive of sparing humans from the hazards of space travel. The M-5 powers down, leaving Enterprise defenseless.
Note: I count a total of six classes/models of AI that Kirk has destroyed. Landru (“Return of the Archons”), Nomad (“The Changeling”), Vaal (“The Apple”), Norman/Mudd’s android army (“I, Mudd”), the M-5 (“The Ultimate Computer”) and Rayna Kapec (“Requiem for Methuselah”). The last one is perhaps an exception, since Kirk actually loved Rayna to death. Did I miss any? Please leave comments below.

With the M-5 powered down, Commodore Wesley spots the Enterprise seemingly adrift and vulnerable in space. Realizing it might be a trap, Wesley nevertheless calls off an attack by the remaining attack fleet and spares the Enterprise–much to Kirk’s relief.
Note: Commodore Wesley’s high-backed command chair was a reuse from the episode “Mirror, Mirror,” where it was the captain’s chair on the mirror-universe’s Enterprise.

McCoy tells Kirk and Spock that Daystrom is heavily sedated and in restraints. Spock surmises that Daystrom’s M-5 unit is in “approximately the same condition.”
Note: We see the unconscious Daystrom in sickbay on a bio-bed, fully clothed. Don’t they believe in hospital gowns in the 23rd century? At least take off his shoes, for goodness’ sake. On the plus side, Daystrom’s brief, destructive, psychotic break over the M-5’s failure didn’t tarnish his future legacy. In the late 24th and early 25th century, we see the Daystrom Institute in Japan (Star Trek: Picard, “Remembrance”), as well as a top secret Section 31 Daystrom space station (Star Trek: Picard, “Bounty”). In the Kelvin Timeline, the Daystrom Conference Room was part of Starfleet Command itself (2013’s “Star Trek Into Darkness”).

Note: The episode ends with McCoy trying to get Spock to admit that he prefers working with emotional, illogical humans instead of machines. It’s a cute exchange, yes, but I think some grievance over the hundreds of dead Starfleet officers lost to the M-5’s rampage might’ve been more appropriate. As it is, the weight of the war games tragedy is undermined by this too lighthearted ending.
The End.
Summing It Up
Designed as a budget conscious ‘bottle episode,’ “The Ultimate Computer” is elevated by an amazing performance by imposing guest star William Marshall. Marshall graces this episode with his nuanced performance, weaving between humility, arrogance and finally psychosis, as he breaks under the unbearable guilt for M-5’s acts of murder. Marshall’s performance as Daystrom makes this episode, every bit as much as Ricardo Montalban’s Khan elevated TOS’ “Space Seed.”

Sadly, the episode’s message of computers replacing humans is in no danger of obsolescence itself, as the increasingly insidious use of AI to control heavy machinery, drive taxis, fill customer service jobs, and even dabble in the creative arts is more threatening now than it was when computer-controlled robots loomed over assembly line workers in the 1960s. Luckily for Kirk, the M-5’s fatal flaw is baked in by its unstable creator, but the reality we face now is that AI is only becoming more capable all the time, with the full blessing of the federal government and private sector; both of which are poised to save billions of dollars every year in excised human labor.

So where does this leave all those jobless people? Perhaps the long-floated idea of a Universal Basic Income (food, clothing and housing offered as essential human rights) might finally become a reality. It’d certainly be ironic if rampant capitalism somehow leads to universal socialism; the professed dream of author H.G. Wells and others in science fiction, including Star Trek’s creator Gene Roddenberry (who wasn’t above making his own profits in Star Trek merch, via Lincoln Enterprises). Like the best Star Treks, “The Ultimate Computer” raises many questions for humanity to tackle in the decades to come.

“The Ultimate Computer” is also peppered with strong character moments from story editor/writer Dorothy Fontana, who allows Kirk to confide personal vulnerability and insecurities over losing command to his best friends, Spock and McCoy. The best of these moments include Spock telling his captain, “A starship also runs on loyalty, to one man, and nothing can replace it or him,” and a heartfelt scene of McCoy pouring a “Finagle’s Folly” to commiserate with his downtrodden skipper, who quotes John Masefield’s 1902 poem, “Sea Fever.” These moments, combined with the ever-relevant fear of automation, make Fontana’s script almost director-proof.
Oh, and before I sign off? A friendly, all-too human reminder that no AI was used in the writing of this column, and never will be, so long as I draw breath. The mistakes in grammar, punctuation or editing are all mine. Screw you, M-5.
Where to Watch
“Star Trek: The Original Series” can be streamed on Paramount+ (along with most other Star Trek series). Individual episodes or seasons can also be purchased on Prime Video or YouTube. The series can also be purchased on physical media (DVD/Blu-Ray) from CBS Home Video (the Blu-Ray sets offer a choice between original and remastered FX as well).


Probably already said, TOS episodes show up on the free Pluto cable channel , on demand but subject to something of a schedule.
PS — gotta search through past discussion on TOS’ great episode, written by Norman Spinard (another author well-known SF writer) and featuring William Windom’s performance as the captain almost crushed because he cou,d not save his people from a fatal fate accidentally put in the path of the planet-buster Doomsday Machine.)