Star Trek (1966–1969): Season 2, Episode 24 - The Ultimate Computer - full transcript

Kirk and a sub-skeleton crew are ordered to test out an advanced artificially intelligent control system - the M-5 Multitronic system, which could potentially render them all redundant.

- Standard orbit, captain.
- Not now.

contact the space station.

- Captain, the station is calling us.
- All right, put them on.

Captain Kirk,
this is Commodore Enwright.

Yes, commodore,
I'd like an explanation.

The explanation
is beaming aboard now, captain.

He may already be
in your Transporter Room.


- Bob.
- Jim, surprised?

I'll say. Spock, this is...

Commodore Wesley.
How do you do, sir?

Mr. Spock.

All right, ensign, you can go.
Thank you very much.

Would you mind telling me
what this is all about?

I receive orders to proceed here.
No reason given.

I'm informed that my men will be
removed to the space station,

to a security holding area.
I think I'm entitled to an explanation.

You've had a singular honour
conferred on you, Jim.

You're gonna be
the fox in the hunt.

What's that?

War games.

I'll be commanding
the attack force against you.

An entire attack force
against my ship?

Have you heard of
the M-5 multitronic unit?

That's Dr. Richard Daystrom's device,
isn't it?

Tell me about that.

The most ambitious
computer complex ever created.

Its purpose is to correlate
all computer activity aboard a starship

to provide the ultimate
in vessel operation and control.

How do you know so much about it,

I hold an A-7 computer expert
classification, commodore.

I'm well acquainted with Dr. Daystrom's
theories and discoveries.

The basic design of all our ships'
computers are Dr. Daystrom's.

What has all this got to do
with the Enterprise, commodore?

You've been chosen
to test the M-5, Jim.

There'll be a series of routine research
and contact problems for M-5 to solve,

plus navigational manoeuvers
and the war games problem.

If the M-5 works under actual conditions
as well as it has in the simulated tests,

it will mean a revolution in space
technology as great as warp drive.

When your crew has been removed,
the ship's engineering section

will be modified
to contain the computer.

- Why remove my crew?
- They're not needed.

How much security
does this gadget require?


Dr. Daystrom will see to the installation
himself and he'll supervise the tests.

When he's ready,
you'll receive your orders

and proceed on the mission
with a crew of 20.


- I can't run a starship with 20 crewmen.
- The M-5 can.

And what am I supposed to do?

You've got a great job, Jim.

All you have to do is sit back
and let the machine do the work.

Space, the final frontier.

These are the voyages
of the starship Enterprise.

Its five-year mission:
To explore strange, new worlds,

to seek out new life
and new civilizations,

to boldly go where no man
has gone before.

Captain's log, stardate 4729.4.

The M-5 computer has been installed
onboard ship, and we have

left the space station
for test manoeuvers.

I don't like it, Jim.

A vessel this size cannot be run
by one computer.

We are attempting to prove that it can
run this ship more efficiently than man.

Maybe you're trying to prove that,
but don't count me in on it.

The most unfortunate lack in current
computer programming is that

there is nothing available to immediately
replace the starship's surgeon.

Very funny.

If it could, they wouldn't
have to replace me. I'd resign

because everybody else
aboard would be

nothing but circuits
and memory banks.

You know the type, Spock.

Jim, you haven't had much
to say about this.

What do you want me to say?

M-5, it's an honour, they tell me.

Well, I'm honoured.

Where is he?
Scotty, where's Dr. Daystrom?

Well, he was here. Doctor?


- You'd be Captain Kirk.
- Yes, Dr. Daystrom.

This is my first officer, Mr. Spock.

- I am honoured, doctor.
- Thank you very much.

Captain, I have finished my tests
on the M-5.

And it must be hooked into your main
power plants in order to be operative.

By all means, do so.

Your engineer there

wouldn't allow us the power necessary
without your orders.

Mr. Scott, hook in the multitronic unit
to the ship's main power banks.

Aye, aye, sir. Mr. Harper.

Fascinating, doctor.

This computer has a potential
beyond anything you have ever done.

Even your breakthrough in duotronics
did not have the promise of this.

The M-5 has been perfected,

Its potential is a fact.

Frankly, the only fact
that I'm concerned about

is that if this thing doesn't work,

there are not enough men aboard
to run this ship.

And that's begging for trouble.

Who is this?

Dr. Leonard McCoy,
senior medical officer.

I'm sorry, but this is a security area.

I wouldn't worry, doctor. Dr. McCoy
has clearance throughout the ship.

- Is it supposed to do that?
- If I can be of assistance, doctor...

No, no, no.
Thank you. I can manage.

There is nothing wrong, captain.

Just a few minor settling-in
adjustments to make.

As you can see, all is in order now.

I'm curious, doctor.

Why is it called M-5 and not M-1?

Well, you see,

the multitronic units 1 through 4
were not entirely successful.

This one is.

M-5 is ready
to take control of the ship.

Total control?

That is what it was designed for,

There are certain things
men must do to remain men.

Your computer
would take that away.

There are other things
a man like you might do.

Or perhaps you object
to the possible loss of the prestige

and the ceremony accorded
a starship captain.

The computer can do your job,
and without all that.

You'll have to prove that
to me, doctor.

That is what we're here for,
isn't it, captain?

Did you see the love light
in Spock's eyes?

The right computer
finally came along.

What's the matter, Jim?

I think that thing is wrong.

And I don't know why.

I think it's wrong, too, replacing men
with mindless machines.

I don't mean that.

I'm getting a red alert, right here.

That thing is dangerous.

I feel...

Only a fool would stand in the way
of progress, if this is progress.

You have my psychological profiles.
Am I afraid...

...of losing my job to that computer?

Jim, we've all seen
the advances of mechanisation.

After all, Daystrom did design
the computers that run this ship.

Under human control.

We're all sorry for the other guy
when he loses his job to a machine,

but when it comes to your job,
that's different.

And it always will be different.

Am I afraid of losing command
to a computer?

Daystrom is right.
I can do a lot of other things.

Am I afraid of losing
the prestige and the power

that goes with being
a starship captain?

Is that why I'm fighting?
Am I that petty?

Jim, if you have the awareness
to ask yourself that question,

you don't need me
to answer it for you.

Why don't you ask James T. Kirk?

He's a pretty honest guy.

The M-5 computer
is now disengaged.

We're coming back
on our original course, captain.

M-5 has performed
admirably so far, captain.

All it's done is make the required
course changes and a few simple turns.

Mr. Sulu and Mr. Chekov could have
done that with their eyes closed.

Yes, but you see, the idea is,
they didn't have to do it.

And you'll find it won't be necessary
for you to regain control of the unit

after it's completed each manoeuver.

My orders are subject
to my interpretation

as to how long the M-5 is in control.

And I'll run the ship in my own way,
if you don't mind, Dr. Daystrom.

Captain, I'm forced to agree
with Dr. Daystrom.

With the course information
plotted into it,

his computer could have brought us
here as easily as the navigator.

In fact, it might have been a further
demonstration of M-5's capability.

You seem to enjoy trusting yourself
to the computer, Mr. Spock.

Enjoy, captain?


I am merely gratified to see
Dr. Daystrom's new unit

execute everything required of it
in such a highly efficient manner.

M-5 is another distinguished triumph
for his career.

Approaching Alpha Carinae II.

ETA, five minutes.

Captain, your orders at this point

are not open to interpretation.

You must commit the M-5
to handle its approach,

the orbit, and then to analyse data

regarding landing-party

If you don't mind,
I'll make my own recommendations.

Well, if you feel
you need the exercise, go on.

M-5 is committed.

Standard orbit, Mr. Sulu.

Captain, the M-5 has calculated that.

The orbit is already plotted.

Oh, yes.

- Standard orbit achieved, captain.
- Report, Mr. Spock.

The planet is Class-M, captain.

Oxygen-nitrogen atmosphere
suitable for human life support.

Two major landmasses,

a number of islands,
life form readings.

Captain, power shutdowns
on Deck 4.

Lights, environmental control.

Check it out, Scotty.

M-5's readout, captain.

All right, my recommendations
are as follows.

We send down
a general survey party,

avoiding contact of all intelligent life
on the planet surface.

The survey party will consist of
myself, Dr. McCoy,

Astrobiologist Phillips,
Geologist Rawlens,

and Science Officer Spock.

Play M-5's recommendations,
won't you, Mr. Spock?

M- 5 readout. Planet Alpha Carinae II.


Atmosphere oxygen-nitrogen.

Power's gone off on Deck 5.

Categorization of life form
readings recorded.

Recommendations for
general survey party.

Science Officer Spock, Astrobiologist
Phillips, Geologist Carstairs.

Well, the only difference in reports
and recommendations

is the landing party personnel.
That's a matter of judgement.

Judgement, captain?

The computer does not judge.

It makes logical selections.

Why pick Carstairs
instead of Rawlens?

Carstairs is an ensign,
no experience.

This is his first tour of duty.

Rawlens is chief geologist.

Aren't you really more interested in why
M-5 did not select you and Dr. McCoy?

Well, let's find out anyway.

- M-5, tie in.
- M-5.

Explanation for landing party

General survey party requires
direction of Science Officer,

Astrobiologist Phillips has surveyed
29 biologically similar planets.

Geologist Carstairs served on
merchant marine freighters in this area.

Once visited planet on geology survey
for mining company.

Why were the captain
and chief medical officer

not included in recommendation?

Non-essential personnel.

Captain, I've located the source of
the power shutdowns.

It's the M-5 unit, sir.

That thing's turning off systems
all over the ship.

Have you located the malfunction,

As I suspected,
it is not a malfunction.

M-5 was merely shutting down power to
areas of the ship that do not require it.

Decks 4 and 6 are living quarters,
are they not?

- Yes, that's correct.
- And currently unoccupied.

I am not familiar with
these instruments, doctor.

You are using an entirely new type of
control mechanism.

However, it appears to me this unit
is drawing more power than before.

Quite right.

As the unit is called upon
to do more work,

it pulls more power to enable it
to do what is required of it,

just as the human body draws
more energy to run than to stand still.

Doctor, this unit
is not a human body.

The computer can
process information,

but only the information
which is put into it.

Granted it can work 1,000, a million
times faster than the human brain.

But it can't make a value judgement.
It hasn't intuition. It can't think.

Can't you understand?

The multitronic unit is a revolution
in computer science.

I designed the duotronic elements
used in your ship right now,

and I know they are as archaic
as dinosaurs, compared to the M-5.

A whole new approach.

Bridge to Captain Kirk.

Kirk here. What is it?

Sensors are picking up a vessel
paralleling our course,

as yet unidentified.

I'll be right up.

What are you doing here, Bones?

Well, all the Sickbay systems
are shut down

until such time as the M-5 is informed
there are patients to be cared for.

Captain, sensors report
two contacts now.

One on the port bow,
one on the stern.

Distance, 200,000 kilometres
and closing.


Captain, the M-5 unit
has already identified the vessels

as Federation starships Excalibur
and Lexington.

We are not scheduled for war games
in this area.

This may be a surprise attack
as a problem for the M-5.

- Priority message coming in, sir.
- Put it on audio.

Enterprise, from Commodore Wesley,
aboard the USS Lexington.

This is an unscheduled M-5 drill.

Repeat. This is an M-5 drill.

acknowledge on this frequency.

Acknowledge, Lieutenant.

M-5 has acknowledged for us, sir.

- Then go to red alert.
- Aye, sir.

- Captain, the M-5 has already...
- Already sounded the red alert.

All right, Mr. Sulu,
phasers one one-hundredth power.

No damage potential.
Just enough to nudge them.

Phasers one one-hundredth
power, sir.

Phaser hit on port deflector 4,

Speed increasing to warp 3.

Turning now to 1-1-2 mark 5.

Phasers locking on target, sir.

- Enemy vessel closing with us.
- Main phasers firing.

A hit, sir.

Two more.

Changing course to 2-8 mark 4-2.

- Phasers firing again.
- Turning to 1-1-3 mark 5.

- Warp 4 speed.
- Firing again.

Attacking vessels are moving off.

Moving back to original course
and speed.

Report on damage sustained
in mock attack.

Minor hit on deflector screen 4.
No appreciable damage.

A rather impressive display for
a machine, wouldn't you say, captain?

Evaluation of M-5 performance.
It'll be necessary for the log.

Ship reacted more rapidly than human
control could have manoeuvered her.

Tactics, deployment of weapons,

all indicate an immense sophistication
in computer control.

Machine over man, Spock?
It was impressive.

- It might even be practical.
- Practical, captain?

Perhaps, but not desirable.

Computers make excellent
and efficient servants,

but I have no wish
to serve under them.


a starship also runs on loyalty

to one man,

and nothing can replace it or him.

Captain, message now coming in
from Commodore Wesley.

Put it on visual.

USS Enterprise from
starships Lexington and Excalibur.

Both ships report simulated hits
in sufficient quantity and location

to justify awarding the surprise
engagement to Enterprise.

Secure from general quarters.

Our compliments to the M-5 unit,

and regards to Captain Dunsel.

Wesley out.


Who the blazes is Captain Dunsel?

What does it mean, Jim?


What does it mean?

"Dunsel," doctor,

is a term used by midshipmen
at Starfleet Academy.

It refers to a part
which serves no useful purpose.

I'm not interested in eating, Bones.

This isn't chicken soup.

I may be just a ship's doctor,

but I make a Finagle's Folly
that's known from here to Orion.

I strongly prescribe it, Jim.

You know,
I've never felt this way before,

at odds with this ship.

I sat there and watched my ship
perform for a mass of circuits

and relays and felt useless...

...unneeded. To Captain Dunsel.

To James T. Kirk,
captain of the Enterprise.

Thank you, doctor.

That's one of
your better prescriptions.

Simple but effective.

Do you know the one:

All I ask is a tall ship?

That's a line from a poem,
a very old poem, isn't it?

20th century Earth.

All I ask is a tall ship

And a star to steer her by

You could feel the wind at your back,
in those days.

The sounds of the sea beneath you.

And even if you take away the wind
and the water...'s still the same.

The ship is yours.

You can feel her.

And the stars are still there, Bones.

Captain Kirk to the Bridge, please.
Captain Kirk.

- Kirk here.
- Another contact, captain.

A large, slow-moving vessel.


This is not a drill.

On my way.

Captain, there's no response
to any of our signals.

But M-5 has given us an auto-relay.

M-5 has identified her, captain.

The Woden,
listed in Starfleet Registry

as an old-style ore freighter,
converted to automation, no crew.

Coming into visual range.

Captain, deflector shields
just came on.

- Speed increasing to warp 3, captain.
- Lieutenant, get Daystrom up here.

Disengaging M-5 unit.

Cut speed to warp 1.
Navigator, go to course 1-1-3 mark 7.

I want that ship given a wide berth.

She won't respond, sir.
She's maintaining course.

- Going to warp 4, sir.
- Jim...

Scotty, reverse engines.
Slow us down.

Reverse thrust will not engage, sir.
Manual override isn't working either.

No effect on any of the M-5 controls,

Fantastic machine, the M-5.
No off switch.

- Captain, what is it?
- These controls are locked.

We can't disengage the computer.

Captain, photon torpedoes
locking on target.

Full power.

I already tried, sir.

release that computer control.

Returning to original course
and speed.

All systems report normal, captain.

Normal! That thing is trying to tell us
nothing has happened.

Disengage this computer now.

There appears to be some defect
in the control panel.

There certainly does.

Your brilliant young computer
just destroyed an ore freighter.

It went out of its way
to destroy an ore freighter.

- Fortunately, it was only a robot ship.
- Only a robot!

But it shouldn't have
destroyed anything!

There might just as easily have been
a crew aboard that ship.

In which case
you'd be guilty of murder...

Bones. Disengage the computer.

contact Starfleet Command.

Tell them we are breaking off M-5 tests
and returning to the space station.

Come along, Dr. Daystrom.
M-5 is out of a job.

All right, Daystrom,
let's turn this thing off.

- A force field?
- It's not my doing, Kirk.

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.

Captain's log, stardate 4731.3.

The M-5 multitronic unit has taken over
total control of the Enterprise.

All right, doctor, you built this thing.
How do you propose to turn it off?

This entire exercise is a trial for M-5.
A shakedown.

We must expect minor difficulties,
but I assure you they can be corrected.

Correct it after you release
control of my ship.

- I can't.
- Captain.

I suggest we disconnect it
at the source.

- Give me a few moments with it.
- No, stay here.

All right, Scotty, turn it off.

That wasn't a minor difficulty.
That wasn't a robot.

That thing murdered
one of my crewmen,

and now you tell me
you can't turn it off?

It wasn't a deliberate act.

M-5's analysis told it
it needed a new power source.

The ensign simply got in the way.

And how long will it be before
all of us simply get in the way?

M-5 appears to be drawing power
directly from the warp engines,

the matter/anti-matter reserves.

So now it has
virtually unlimited power.

Captain, what do we do?

Spock, Scotty, come with me.

Report, Spock.

The multitronic unit is drawing
more and more power

directly from the warp engines.

The computer now controls all helm,
navigation and engineering functions.

And communications
and fire control.

We'll reach the rendezvous point
for the war games within an hour.

We must regain control
of the ship by then.

There is one possibility.

The automatic helm-navigation circuit
relays might be disrupted

from Engineering Level 3.

- Scotty?
- Aye.

I can take them out and cut in
the manual override from there.

How long?

If Mr. Spock helps me,
maybe an hour.

Make it less.

Why not get the man responsible
in the first place?

- Where is Daystrom?
- He's with the M-5 unit, watching it.

I think it surprised even him.

Most illogical.

Of all people, he should have known
how the computer would perform.

Of course, the M-5 itself
has not behaved logically.

Please, Spock, do me a favour,
and don't say it's fascinating.


but it is interesting.

- Aye, that's got it, Mr. Spock.
- Good.

Have you found a solution,
a way to shut that thing off?

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.

When a child is taught, it's
programmed with simple instructions,

and at some point,
if its mind develops properly,

it exceeds the sum of what
it was taught, thinks independently.

That thing is a danger to all of us.
Now, find someway to shut it off!

You can't understand.

You're frightened
because you can't understand it.

I'm going to show you.
I'm going to show all of you.

It takes 430 people

to man a starship.

With this you don't need anyone.

One machine can do all those things
they send men out to do now.

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.

They can't understand.

We don't want to destroy life.
We want to save it.

A biographical tape
of Richard Daystrom.

- Did you find out anything?
- Not much,

aside from the fact he's a genius.

Genius is an understatement.

At the age of 24,
he made the duotronic breakthrough

that won him the Nobel
and Zee-Magnees Prizes.

In his early 20s, Jim.
That's over a quarter of a century ago.

Isn't that enough for one lifetime?

Maybe that's the trouble.
Where do you go from up?

You publish articles,
you give lectures,

then you spend the rest of your life
trying to recapture past glory.

All right, it's difficult.
What's your point?

The M-1 through M-4, remember?

"Not entirely successful."
That's the way Daystrom put it.

Genius doesn't work
on an assembly-line basis.

Did Einstein or Kazanga
or Sitar of Vulcan

produce new and revolutionary
theories on a regular schedule?

You can't simply say,
"Today I will be brilliant."

No matter how long it took,
he came out with multitronics, the M-5.

Right. The government bought it. Then
Daystrom had to make it work. He did.

But, according to Spock,
it works "illogically."

And he won't let Spock near it.

What are you saying?

That he's tampering with it,
that he's making it act that way? Why?

Jim, if a man had a child
who'd gone antisocial,

killed, perhaps,

he'd still tend to protect that child.

Now he's got you talking about
that machine like a personality.

I'm afraid that's the way
he thinks about it.

- Spock to Captain Kirk.
- Kirk here.

- We are ready, captain.
- Good.

Get Daystrom. We're on our way.
Let's go.

- What is it, captain?
- We'd better find out, doctor.


Mr. Scott is ready to apply
the circuit disrupter, captain.

As he does so, I shall trip
the manual override into control.

- Good. Go ahead.
- No. No, no, no!

You can't take control from the M-5!

Dr. Daystrom, we're going to do
our very best.

You can't do it!
Now, let me have it for a while.

Let me work with it for a while,
please, please.

That's it, Mr. Spock.

Please. Please.

Manual override
is in control, captain.

Bridge, this is Kirk. Sulu.

Lieutenant Sulu here, sir.

We've got helm
and navigational control.

Turn us about. Have Mr. Chekov
plot a course back to the space station.

Right away, sir. You heard him?

I have been updating
that course for hours.

- Helm to Captain Kirk.
- Kirk here.

Captain, helm doesn't respond.
Navigational controls locked in by M-5.

- Mr. Chekov.
- Chekov here, sir.

Go into the engineering station
and examine the H-279 elements,

also the G-95 systems.

Sir, the G-95 system appears dead.

All indicators are dark.

Thank you, ensign.

It appears we've been doing what used
to be called "pursuing a wild goose."

M-5 has rerouted helm
and navigational controls,

bypassing this primary system.

But it was active.
I'd stake all I know that it was.

I believe that when M-5
discovered our tampering,

it rerouted the controls,
leaving this one active

by simply sending through an electronic
impulse at regular intervals.

Decoyed. It wanted us
to waste our time here.

While it was getting ready for what?

I do not know.
It is not performing in a logical manner.

Dr. Daystrom...

Dr. Daystrom, I want an answer.
Right now.

I'm tired of hearing about
the M-5's "new approach."

What is it? Exactly what is it?

I do not mean to offend, sir.

But it behaves
with an almost human pattern.

- Well, doctor?
- Yes, quite right, Mr. Spock.

You see, one of the arguments
against computers controlling ships

was that they couldn't think like men.

- Your new approach.
- Exactly.

I've developed a method of impressing
human engrams

upon the computer circuits.

The relays are not unlike the synapse
of the brain.

M-5 thinks, captain.

Captain Kirk, Mr. Spock to the Bridge,
please. Report to the Bridge, please.

Kirk here. What is it?

Sir, our sensors are picking up
four Federation starships.

M- 5 is altering course to intercept.

The main attack force.
The war games.

But M-5 doesn't know it's a game.

Correction, Bones. Those four ships
don't know it's M-5's game.

And M-5 is going to destroy them.

Enterprise to USS Lexington.
Come in, Lexington.

Sir, I can't raise them.
M-5 is still blocking all frequencies,

including automatic distress.
Just a minute, sir.

Captain, I'm getting audio signal
from the Lexington.

Put it on.

Enterprise from USS Lexington.

This is an M-5 drill. Repeat.

This is an M-5 drill. Acknowledge.

- Captain, M-5 is acknowledging.
- Daystrom.

Does M-5 understand
that this is only a drill?

Of course. It was programmed
to understand, captain.

The ore ship was a miscalculation.
An accident. I don't know...

Sir, deflector shields just came on.

Speed increasing to warp 4.

Phasers locking on lead ship, sir.

- Power levels at full strength.
- Full strength?

If that thing cuts loose
at unshielded ships, we're...

That's no miscalculation.

Attack force closing rapidly.
Breaking formation, attacking at will.

Our phasers are firing, sir.

A hit on the Lexington.

Full phasers.
What the devil is Kirk doing?

Damage report, lieutenant.

Helm, course 1-6-4, mark 3.

Turning now, sir.

Estimate damage
on Lexington, Spock.

Hit in Engineering Section.

Possible damage
to her impulse engines.

She is still manoeuverable
on warp drive.

We're firing again, sir.

The Excalibur, a direct hit.

Closing on the Lexington again, sir.

The Hood and Potemkin
are moving off.

Phasers firing, captain.

Lexington hit again.

There's got to be a way of getting to
the M-5. There's got to be a way!

There isn't. It's fully protected itself.

Probably true, captain. It works faster,
thinks faster than we do.

It is a human mind amplified
by the instantaneous relays

possible in a computer.

Captain, visual contact
with Lexington.

Enterprise, Jim! Have you gone mad?
What are you trying to prove?

Break off the attack.
Jim, we have 53 dead here.

Twelve on the Excalibur.
If you can hear us, stop the attack!


I'm sorry, sir.
I can't override M-5 interference.

Jim, why don't you answer? Jim!
Answer! Come in, Jim!

There's your murder charge.
Deliberate, calculated.

That thing is killing men and women.

Four starships,
1,600 men and women.

It misunderstood.

Jim, break off your attack!

Excalibur is manoeuvering away, sir.

We're increasing speed to follow.

Phasers locked on.


Phasers firing.

I really don't know how to get to
the M-5, Kirk. I really do not know.

Dr. Daystrom, you impressed human
engrams on the M-5's circuits.

Coming to new course, sir.

Bearing on the Potemkin.

Phasers firing. A hit.

Whose engrams?

- Why, mine, of course.
- Of course.

Then perhaps
you could talk to the unit.

M-5 has no reason to believe
you would harm it.

The computer tie-in.
You spoke to it before, it knows you.

I'm getting the Lexington again,

tapping in on their message
to Starfleet Command.

All ships damaged
in unprovoked attack.

Excalibur Captain Harris
and first officer dead.

Many casualties. We have damage,
but are still able to manoeuver.

The Enterprise refuses to answer
and is continuing attack.

I still have an effective battle force
and believe the only way to stop

the Enterprise is to destroy her.

Request permission to proceed.

commanding attack force, out.

They can't do that.
They'll destroy the M-5.

You can save the M-5 if you talk to it
and make it stop the attack.

I can make it stop. I created it.

- M-5, tie in.
- M-5.

This is Daystrom.

- Daystrom acknowledged.
- M-5... you know me?

Daystrom, Richard. Originator of
comptronic, duotronic systems.

- Born...
- Stop.

M-5, your attack on the starships
is wrong.

You must break it off.

I don't like the sound of him, Jim.

You better pray that the M-5
listens to the sound of him.

Programming includes
protection against attack.

Enemy vessels must be neutralised.

But these are not enemy vessels.
These are Federation starships.

You're killing...

We are killing,


human beings,
beings of our own kind.

You were not created
for that purpose.

You're my greatest creation.

The unit to save men.

You must not destroy men.

This unit must survive.

Survive, yes. Protect yourself.

But not murder. You must not die.
Men must not die.

To kill... a breaking of civil and moral laws
we've lived by for thousands of years.

You have murdered
hundreds of people.

We have murdered.

How can we repay that?

They attacked this unit.

Programming includes full freedom
to choose defensive action

in all attack situations.

M-5 is not responding to Daystrom.
It's talking to him.

I am most impressed
with the technology, captain.

Dr. Daystrom has created
a mirror image of his own mind.

- Consideration of all programming is
that we must survive.

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 laughing behind my back
at the "boy wonder,"

and becoming famous
building on my work.

Building on my work!

Jim, he's on the edge of
a nervous breakdown, if not insanity.

The M-5 must be destroyed.

Destroyed, Kirk?

No. We're invincible.

Look what we've done.
Your mighty starships,

four toys to be crushed
as we choose.

Security, take him to Sickbay.

- Fascinating.
- Take care of him, doctor.

Battle status.

The other three ships
are holding station out of range.

The Excalibur looks dead.


Lexington is receiving a
message from Starfleet. They...

Go on.

You are authorised to use all measures
available to destroy the Enterprise.

- Acknowledge, Lexington.
- Acknowledged.

Lexington out.

They've just signed their own death
warrant. M-5 will kill them to survive.

Every living thing wants to survive,

Daystrom must have impressed that
instinctive reaction upon the computer.

Suppose it's still open to impression.

Suppose it absorbed the regret

Daystrom felt for the deaths it caused,
the guilt.

Captain, the ships are coming
within range again.

Commodore Wesley is
a dedicated commander.

I should regret serving aboard
the instrument of his death.

The instrument of his death will not
be the Enterprise, if I can help it.

- M-5, tie in.
- M-5.

This is Captain Kirk.

You will be under attack
in a moment.

Sensors have recorded
approach of ships.

You have already rendered one starship
either dead or hopelessly crippled.

Many lives were lost.

The ships attacked this unit.
This unit must survive.


This unit is the ultimate achievement
in computer evolution.

It will replace man
so man may achieve.

Man must not risk death in space
or other dangerous occupations.

This unit must survive
so man may be protected.

Captain, attack force
almost within phaser range.

There were many men
aboard those ships.

They were murdered.

- Must you survive by murder?
- This unit cannot murder.


Murder is contrary to the laws
of man and God.

But you have murdered.

Scan the starship Excalibur
which you destroyed.

Is there life aboard?

- No life.
- Because you murdered it.

What is the penalty for murder?


And how will you pay

for your acts of murder?

This unit...

... must...

... die.


Sir, deflector shields have dropped.

All phaser power gone, sir.

M-5 is leaving itself open to attack.

The machine is committing suicide
to atone for the sin of murder.

Scotty, Spock,
before it changes its mind.

Get to Engineering, pull out
every hook-up that makes M-5 run.

Pull out the plug, Spock.

- Lieutenant.
- Aye, sir?

Intership communications.

This is the captain speaking.

In approximately one minute

we'll be attacked by
Federation starships.

The M-5 no longer controls the ship,
but neither do we control it.

M-5 has left itself

and us open for destruction.

For whatever satisfaction
we may get from the knowledge

our 19 lives will buy the survival

of over 1,000 of our fellow
starship crewmen.

Phasers are on target.

- Spock to captain.
- Kirk here.

The force field is gone, captain.
M-5 is neutralised.

Systems coming back.

I can give you power
for the shields, sir.

I need communications.

- That'll take longer.
- Then cut power.

- Sir?
- Cut power.

Keep those shields down.

The Enterprise looks dead.

I'm going to take a chance
he's not just laying a trap.

Wesley to attack force.


Break off attack. Do not fire.

The Enterprise
has dropped her shields.

I repeat, hold attack. Do not fire.

He'll have to be committed
to a total rehabilitation centre.

Right now, he's under sedation
and heavy restraints.

I would say his multitronic unit
is in approximately the same condition.

That's exactly the situation
I was hoping for

when I forced the M-5 to realise
that it had committed murder.

Daystrom felt such an act

was an offence
against the laws of God and man.

The computer that carried his engrams
also believed it.

Captain, why did you feel
the attacking ships would not fire

when they saw the Enterprise
apparently vulnerable?

Logically, that is the sort of trap
M-5 should have set for them.

I wasn't sure.

Any other commander would have
followed orders and destroyed us,

but I knew Bob Wesley.

I gambled on his humanity.


His logical selection
was compassion.

Compassion, that's the one thing
no machine ever had.

Maybe it's the one thing
that keeps men ahead of them.

- Care to debate that, Spock?
- No, doctor.

I simply maintain that computers
are more efficient than human beings,

not better.

But tell me, which do you prefer
to have around?

I presume your question is meant to
offer me a choice between machines

and human beings, and I believe
I have already answered that question.

I was just trying to make conversation,

It would be most interesting

to impress your memory engrams
on a computer, doctor.

The resulting torrential flood of illogic
would be most entertaining.

Mr. Sulu, take us back
to the space station.

Ahead warp factor 2.