From the "For What It's Worth" Department, James Doohan had this to say:
"The final episode on this volume [Star Trek The Original Series
United Kingdom VHS Volume 2.8 from July of 1997] is "The Ultimate Computer." This story was developed by a mathmetician named Lawrence Wolfe who loved Star Trek
. He came to [series producer John Meredyth] Lucas with a completed script. While it was an excellent idea, it needed rewriting, because Lawrence had become so fascinated with his M-5 computer and its creator Dr. Daystrom, that the script did not feature our regular characters at all
. Even Captain Kirk was hardly in the show--having been superseded by the computer! Dorothy Fontana took the script and re-wrote it. She brought Kirk's role to the fore to deal with the way he felt about losing his ship. In previous episodes, Kirk had defeated a computer--either by asking it The Unanswerable Question, or by confusing it with logic. Dorothy felt this was a trend in danger of becoming repetitive, so in this script when Kirk tries out both
on M-5, the computer tells him to "forget it." The captain is forced to dream up a moral
dilemma to regain control of his ship."
If Dorothy had a clunky line that made made Commodore Wesley sound like he wasn't the model commander or tactician, my hunch is that the original script was pretty much devoid of any jeopardy for Kirk, and, like a pendulum, she might have erred a bit in the other direction, by making Kirk look threatened when no starfleet commander would "actually" jump to the conclusion that Wesley jumped to. "Just bad writing?" Meh. I cut her a litle slack for writing a clunky line in an episode that I think is one of the strongest of the series.
Of course, if I could be one tenth the writer Dorothy is--either in quality or prolificness--I'd be a happy camper.