May 9th, 1994, "Emergence"
There are plenty of Treknobabble rants ahead, here's your warning. However, I do like the character work in this episode.
Fiver by Nic and Sa'ar
The Episode
DATA: It appears to be a steam locomotive.
PICARD: A train?
DATA: If I am not mistaken.
Time to be pedantic. The locomotive is one part of a train, the other part being the cars. Data has chosen the wrong language because at minimum a steam locomotive must be accompanied by a tender car that has the fuel. Picard is correct.
DATA: The train we encountered was from one of Doctor Crusher's holodeck programs. It was a re-creation of the Orient Express, a train which travelled from Paris to Istanbul from the late nineteenth century until.
PICARD: Yes, yes, Data, I know about the Orient Express.
I was surprised to learn that the Orient Express ran until 2009, mainly because I kinda thought that "orient" was redefined as being offensive long before TNG ran.
Captain's log, stardate 47869.2. After weathering an unexpected magnascopic storm in the Mekorda Sector, we are continuing our search for new Federation colony sites.
So the randomized magnetic fields caused by the storm is supposed to be the trigger for randomized circuit connections to the point of creating sentience. I find this dubious, but at least they came up with an explanation. Furthermore, I'm having trouble with the idea that isolinear technology is vulnerable to electromagnetic fields to begin with, the TOS crew certainly ran into their share of interstellar phenomenon creating trouble with ship's systems (I especially refer you to "The Practical Joker"). But that was duotronic systems, not isolinear systems.
RIKER: I don't think there's any possibility of developing sites in this region. Most of the stars are main sequence binaries. There are no M-class planets.
Actually, it occurs to me that ships should be able to do the first step of an M-class search using long range sensors alone. It's already been determined that only a small fraction of the range of possible stars could EVER support life (at least M-class life as our heroes are doing). You wouldn't even have to go to most of the systems to look for planets, as the star would indicate whether or not there was any chance you'd find one.
DATA: The ship has moved into warp, sir.
RIKER: Who gave that command?
DATA: Apparently no one.
There's an interesting Strange New Worlds story (fan fiction compilations, not TV show) where the crew suddenly disappeared and the E-D computer determined that it had to lift itself up by its own bootstraps and
become sentient to solve the problem. When it solved the problem and brought back the crew it knew that it couldn't be sentient anymore, so it hid its personality inside the Minuet program.
LAFORGE [OC]: If you want us to stop, I'll have to do an emergency core shutdown.
RIKER: That would leave us without warp power for more than a week.
First, the safety of the crew is paramount, the warp core is expendible. Second, it would also take less than a week for Starfleet to send a Starfleet Corps of Engineers ship with a new warp core to install. *
DATA: We are approximately thirty billion kilometres from our original position.
Earlier he said that the ship was moving at Warp 7.3. Putting aside the fact that Warp 1 is more than enough to elude any danger in normal space, 30,000,000,000 km at Warp 7.3 is a little over two minutes. Someone might have actually done the math on this one.
LAFORGE: We still don't know why the ship jumped into warp, but it looks like we're lucky it did. There was a theta flux distortion building up around the ship.
PICARD: Why didn't our sensors alert us?
LAFORGE: Our sensors were never designed to detect theta flux distortions. And yet there is a record of the distortion in the sensor log. That's the other mystery.
This is inexplicable. The sensors were never designed to look for this stuff, but somehow it did? Did the new intelligence in the computer happen to decide to modify the sensors to look for this thing just in time to find one? At least in the Strange New Worlds story is talked about earlier the problem happened too fast for the crew to have a chance to react. Only the superspeed thinking of the ship's computer could notice it.
DATA: Perhaps the engines were activated by a random power fluctuation.
LAFORGE: Which occurred just in time to save the ship?
DATA: It is improbable, but it is possible.
I'm disturbed by the notion that a random power fluctuation could trigger the warp engines. Doesn't the helmsman have to "prepare to go to warp", presumably by adjusting systems that have nothing to do with the warp engines (subspace sensors and comms, inertial dampeners, etc.)?
DATA: There is another possibility.
LAFORGE: Yeah, what's that.
DATA: The sensors apparently detected a dangerous anomaly that threatened the Enterprise. It is possible that they triggered a safety device which caused the ship to avoid destruction.
Both of them should know about any such safety device.
LAFORGE: Yeah, but there's no direct link between the warp engines and the sensors.
Yeah there is, it's called the ship's computer.
RIKER: Where did these nodes come from?
DATA: It is possible that the magnascopic storm we recently experienced had an unexpected effect on the ship's systems.
I think this Treknobabble explanation needed to be fleshed out a bit.
DATA: Agreed. All of the nodal connections intersect in holodeck three. It appears to be a focal point of some kind.
LAFORGE: We might be able to find a way to use the holodeck circuitry to disable the nodes permanently.
How? Since when are the holodeck circuits designed to interact with those in a random Jefferies Tube halfway across the ship?
RUSTIC: Now I'm going all the way to Vertiform City!
Vertiform is a fictional word, but I wonder why they didn't use "variform" instead, which is a real word that fits the scenario.
RIKER: All right, go ahead and depolarise the entire power grid.
DATA: The power grid is located beneath this deck, sir.
I hate the idea that the holodeck has controls that can only be accessed from inside an active program. Especially since "The Big Goodbye" had Westley accessing the program from a control panel outside. Between this, a forced shutdown vaporizes everything inside, and holodeck characters somehow existing outside the holodeck (if only for a few seconds) I guess that episode isn't canon anymore.
DATA: Geordi, does the configuration of connection nodes look familiar to you?
LAFORGE: Yeah. Yeah, it looks a little like the structure of your positronic brain.
DATA: That is correct. It would appear that the nodes are in the process of creating a rudimentary neural net.
This is completely ridiculous. There's no reason why all artificial intelligences would have similar structures. I'll bet you anything that the various TOS andrdoids were nothing alike on the inside.
Let me talk about another book. In "Immortal Coil" Bruce Maddox hit a brick wall trying to duplicate Data's positronic brain, and he knows about the evolution of Voyager's EMH, so he recruits Reg Barclay to combine the technologies to create an android with a "holotronic" brain. I recommend it highly.
DATA: I believe it is an emergent property.
PICARD: Explain.
DATA: Complex systems can sometimes behave in ways that are entirely unpredictable. The human brain, for example, might be described in terms of cellular functions and neurochemical interactions. But that description does not explain human consciousness, a capacity that far exceeds simple neural functions. Consciousness is an emergent property.
I could write a big screed on the implications of this paragraph regarding God versus evolution, but I'll skip it.