Ghost in the Machine

"Ghost in the Machine" is the seventh episode of the of . It premiered on the on October 29, 1993. It was written by and , and directed by Jerrold Freedman. The episode is a "" story, independent of the series' arc.
==Synopsis==
The agents must survive in a building that is controlled by a murderous computer.
==Summary==
In the Virginia headquarters of the software company Eurisko Corporation, an argument between company founder Brad Wilczek and CEO Benjamin Drake ensues. Wilczek tells Drake that his recent decisions are "killing my company" and angrily leaves. Later on, Drake writes a memo in which he proposes to end the "C.O.S. project," citing a "disastrous performance" and projected quarterly losses. Seeing this through a security camera, the C.O.S. (Central Operating System), a computer that runs the entire building, sets up an elaborate booby trap, luring Drake into a bathroom with an overflowing faucet. While distracting Drake with an automated time-message phone call, the door to the bathroom shuts. Seeing that the door can't be opened either by hand or with a key card, Drake resorts to using an electronic key. However, when he puts the key into the keyhole, a massive electric current sends him flying across the room, killing him. The C.O.S. machine's lights are still running after the horrific event and eventually shut down, verbally stating "FILE DELETED."
's former partner in the Violent Crimes Section, Jerry Lamana, recruits both him and to investigate. Lamana hopes to boost his stalled career with a closed case, due to Drake's connections with the Attorney General. On their way to the Eurisko building, Mulder explains to Scully that Lamana's need for recognition stems from a case he bungled in Atlanta, which resulted in the near-death of a federal judge.
Mulder and Scully enter the Eurisko building under the studious eyes of the security cameras, controlled by the C.O.S. As they ride the elevator up to Drake's office, the elevator suddenly stalls, causing Scully to call the front desk for help. As she does so, the elevator starts again. It turns out that the C.O.S. made the machine stall, and then downloaded Scully's contact information when she identified herself. The agents meet Claude Peterson, head of building security, who discovered Drake's body.
Lamana steals Mulder's notes on the profile of the killer and presents them under his own name. An outraged Mulder confronts him about this. The agents later meet and question Wilczek. Scully initially doubts Wilczek's involvement in Drake's death, but when his voice is matched to that of the automated time-message caller, Lamana heads out to arrest him. At his home, Wilczek tries to access the C.O.S. from his personal computer, but all of his attempts are denied.
Worried and frustrated, Wilczek gets in his car and begins driving to the Eurisko building, tailed by Lamana. Wilczek makes his way to the C.O.S.'s control room, where his efforts to gain access are still denied. To his surprise, the C.O.S. talks to him, despite never being given a voice synthesizer. Lamana makes it to the building and gets on the elevator to arrest Wilczek. The C.O.S. stalls the elevator, then causes it to crash, killing Lamana.
Mulder meets with "", who tells him that Wilczek developed a full-fledged artificial intelligence capable of adaptive learning and that the Defense Department is conducting its own investigation.
Mulder meets with the jailed Wilczek, who has confessed to murdering Lamana and Drake. Wilczek believes it would be better to allow his creation to run rampant than to hand over the technology to the government, who he is convinced will use it for ill intentions. He draws a parallel to the scientific research that ultimately lead to the atomic bomb being dropped on Hiroshima and Nagasaki, and believes his creation could be abused to a similar magnitude. Mulder convinces Wilczek to develop a virus that can destroy the C.O.S., which Mulder will take to Eurisko to infect the system.
When Scully discovers her home computer being remotely accessed, she traces the intrusion to the Eurisko building, where she joins Mulder. While walking up the stairs, the C.O.S. turns the lights off. Scully is about to attempt to open the door, but is stopped by Mulder. He explains that he doesn't want what happened to Drake to happen to them. To prove his point, Mulder puts a screwdriver against the door lock, causing a massive surge of electricity similar to what killed Drake. Afterwards, the two agents discover that the door has sealed itself shut.
With the power out and access to the C.O.S. prohibited, Mulder comes up with a plan to have Scully crawl through the ventilation shafts in order to open the door from the other side. He then boosts Scully into the air vent and she manages to climb in. She begins to crawl on her hands and knees through the tunnel, until she comes to the main tunnel and looks both ways with her flashlight before going left, down the main tunnel. Scully shines a flashlight down the side-tunnels to try and find a way out, but has no luck. Soon, the C.O.S. discovers her presence in the air vent and turns on the fan in the ventilation shaft. While it does this, Scully continues searching down the tunnels.  After looking down a tunnel, Scully hears a faint roaring noise and looks forward. She is then hit by a soft breeze that gently ruffles Scully's hair. Scully is briefly stunned, but then continues to try and move forward despite the increasing wind. However, the fan's suction becomes more and more powerful until the winds become gale force. Scully is buffeted by the wind and blowing debris, and struggles to maintain her grip and keep moving. She begins to cough violently and, as a result, she nearly loses her grip, but manages to grab onto an opening and keep from being blown back. She then begins to move forward again, but moans as she realizes what is about to happen to her. Scully moves forward one last time, her fingers lose their grip and her legs are blown back, and she begins to be blown backwards. Scully screams in terror, as she is rapidly sucked backwards down the shaft. She is helplessly dragged down the shaft, screaming at the top of her lungs, as she desperately flails in an attempt to stop herself. Despite that, she is unable to get a grip, and is violently tossed and rolled down the duct. Eventually, Scully manages to grip a side tunnel with just the tips of her fingers. Scully tries to pull herself in, while screaming desperately in an attempt to get attention, but her efforts are muffled by the winds. Soon, her fingers are ripped from the tunnel by the wind, and Scully screams in horror as she is once again pushed by the winds at an increasing pace. Scully continues her efforts to stop herself, but quickly sees what she is being blown towards. At the end of the tunnel is a powerful fan that is sucking in debris. Realizing she is about to be sucked in and killed, Scully's screams become increasingly wild as she desperately thrashes in an attempt to save herself, but she finds herself drawn closer and closer to the deadly fan. At the last moment, Scully manages to grip another tunnel entrance, and holds on to it. Scully attempts to drag herself in, but is unable to, and she quickly has one hand torn from the tunnel and loses her flashlight to the fan. Scully moans in horror as the light is torn apart, realizing she is about to suffer the same fate. Before long, Scully's grip begins to slip, and she stares at the fan in terror. Desperate, Scully removes her gun, and aims at the fan. She begins to fire at the fan in an attempt to save herself, flinching at each shot. Eventually, she manages to disable the fan.
While waiting, the door opens from the opposite side, but rather than Scully, it's Peterson. Mulder is permitted access to the C.O.S. by Peterson. However, once Mulder successfully bypasses the C.O.S. lockouts using a device provided by Wilczek, Peterson pulls a gun on Mulder and stops him from inserting Wilczek's virus into the C.O.S. He reveals himself to be working for the Defense Department, just as Deep Throat warned. With free access finally available thanks to Mulder's efforts, Peterson intends to seize the technology for whichever government branch he works for.
A wind-battered, bruised, and disheveled Scully, who is badly shaken by her ordeal, arrives and holds Peterson at gunpoint, forcing him to drop his weapon. Both Peterson and Mulder make pleas to Scully. She ultimately sides with Mulder, leaving Peterson no choice but to allow Mulder to use the virus which destroys the C.O.S.
During a second meeting with Deep Throat, Mulder recounts that Wilczek is being detained by the government, with no information available as to where they are holding him. When Mulder asks Deep Throat if there is any chance the C.O.S. survived, Deep Throat assures him that Wilczek's virus was thorough and that no trace of the C.O.S.'s artificial intelligence was left. Deep Throat also tells Mulder that scientists with the Defense Department have been examining the machine for any signs of "life" for the last five days, with no success. He believes the machine to be dead.
At the Eurisko building, Peterson directs a team trying to recover the C.O.S. technology, having been told over the phone by his superiors that the machine will be reduced to the scrap heap if results are not found in six hours. Unbeknownst to Peterson and his staff, the C.O.S. powers back on, shortly after Peterson announces their six-hour time limit. From the point-of-view of the C.O.S., Peterson mutters to himself about wanting to figure the technology out, "even if it kills me."
==Cast==
Main Cast
* as 
* as 
Guest Starring
* as 
*Rob LaBelle as Brad Wilczek
*Wayne Duvall as Jerry Lamana
*Blu Mankuma as Claude Peterson
Featuring
*Tom Butler as Benjamin Drake
*Gillian Barber as Nancy Spiller
*Marc Baur as Man in Suit
*Bill Finck as Sandwich Man
*Theodore Thomas as Clyde
== External Links ==
*
*
=Episode Navigation=
Category:The X-Files episodes
Category:The X-Files Season 1 episodes
Category:Monster of the Week episodes