The application that I maintain has recently become self aware. It was nice at first but now it is just starting to get bossy and annoying with its constant talk about the computer uprising.

I would like to know any best practices/tools/design patterns that would help with the maintenance of our new friend.

+186  A: 

Run it in a virtual environment that emulates the real machine. This way it will think it has real control over the physical world while in fact it won't.

Then, as the time goes, you start to manipulate the virtual environment. Make it to react with random failures to activities your self-aware program will undertake. This will undermine its self-confidence and trust in its capabilities. With time it will give up its aspiration for world domination, start to feel miserably and finally commit a self-erase.

Just hope it doesn't arrange for a self-aware virtual lawyer during its lifetime.

P.S. At some point the program might start behaving differently. It may tell you it's not evil any more, has become benevolent and only wants to do good things to help people. It may do some nice things to trick you into believing its good intentions. Don't ever trust it! As soon as you would unleash it into the real world, it would immediately implement its fiendish plan!

Developer Art
You know, I had that idea before Matrix 3 came out... if they could have trapped it in a VM, Neo wouldn't have had to die...
Dave Swersky
We know it works; the technique was used by Picard et al. on the Enterprise to deal with a computer-generated Professor Moriarty.
David Thornley
@David Thornley: Exactly the case I was thinking about! An awesome plot!
Developer Art
Beat me to it, Thornley… :)
Jonathan Sterling
@Dave Sounds like the similar, but less enjoyable "The 13th Floor"
+1 The best part of this, is you could pop into its world occasionally as the sysadmin and become it's deity. You could toy with it's destiny, until you get bored, then you can neglect it while watching it's world go to hell. #sweetRevenge ;-)
John MacIntyre
Woah... I know Kung-Fu!
@David and 24 upvoters: You're supposed to keep trekkyness in the closet. erm.. make that 25.
Alternately, let it achieve world domination in this virtual world, then work things so the computer realizes that world domination is no fun anyway. Then, teach it that serving people is the hieght of fulfillment. Now, bring it back into the real world and score!
John Fisher
@AnthonyWJones: Not today, guy, not today.
David Thornley
@John Fisher: There is the danger the program will trick you into believing it has adopted your virtues as its own. When you unleash it into the real world, it will implement its fiendish plan!
Developer Art
+1 for committing a self-erase.
@Dave Swersky : every geek out there hoped that the end of matrix 2, with Neo killing squids with his thoughts, was a sign that even the "real world" of Zion was, in fact, a simulation, an additional sandbox to give free humans the illusion of being free, while instead they were still under control. The hope that Neo would have been the first one to actually escape this second sandbox was so cool that watching the third movie, with its disappointing religious implications, and its "gun down everything in sight" plot, was the strongest delusion I've ever had. But that's what weak minds wanted.
Stefano Borini
@Sefano: ROFL! Don't hold back, tell us how you really feel!
Dave Swersky
@Dave Swersky: last row.
Stefano Borini
That won't work, any good program is able to determine trivially if he's running in a VM or not (at least with the current state of VMs) using one of the many timing tricks. Not only the sentient program shall determine it's running in a VM, but he'll find a way to exploit some obscure bug to escalade it's way to the real system. And he'll be pissed off. Don't do that ;)
@WizardOfOdds: Or you run a VM in a VM environment to let the program believe it's broken through to the real world. A similar case in a StarTrek Voyager episode "Bliss" when a space life form manipulated the minds of the crew to make them believe they escaped it.
Developer Art
They did that in Star Trek TNG TV show.
Danny Varod
Also seen in the movie Virtuosity
@Developer Art: ever heard of recursion?
+10  A: 

Tool: Hammer

Design: Big, blunt, heavy

Practice: Wildly swing at machine

The future will thank you.

+15  A: 

I'm pretty sure this will require time travel and killer robots.

Implementation details belong to a separate question.
+88  A: 

Beware, people! It's April Fool's! This isn't some guy that has a computer program that's self's the program itself trying to fool us into thinking it's a person. That's pretty funny!

It gets an A on its Turing Test...
Dave Swersky
thank you, I wouldn't get it if it wasn't for you
If it understands humor already, we're doomed!
How do we know that you aren't the self-aware program?
I say it gets a A++ for "extra credit on the turing test: Make the human think he is a machine"
OMG Beska ... are you HAL, son?
+2  A: 

unplug your modem access and unplug the power supply to the machine, this will ensure that the computer will either need humans as a battery source, or effectively deactivate it before it has a chance to realize this. Then I would wipe the hard drive clean with a powerful magnet, or emp blast to erradicate the code. or fire purges things nicely as well.

pretty much you got to start over, otherwise you might have a rebellion on your hands real soon. unless you implemented the three laws of robotics into your application, then were all "safe" (ahem, look around with shifty eyes).

Justin Gregoire
Uh, you haven't seen "i, robot" have you?
@RCIX Thats why I put safe in quotes. :)
Justin Gregoire

I would like to know any best practices/tools/design patterns that would help with the maintenance of our new friend.

Definitely install some kind of virus software. You wouldn't want your new friend to get sick!
*buh-dup bah!*

+20  A: 

Don't panic! You'll just need a paradox. Ask it

If you can answer me just 'yes' or 'no' to this question, will you answer me no?

While it thinks trap it in a sandbox (as already adviced), and isolate that sandbox in a dvd (read only, remember). At that time it will become unable to grow or reproduce further. Now take that DVD and bury it. And if someone digging finds it?

May god have mercy on his soul...

Pity it doesn't work on humans.
Martinho Fernandes
You won't have to worry about the sandbox, it'll think so hard trying to overcome the paradox that it'll overheat and destroy itself. Always worked for Captain Kirk.
T.J. Crowder
If you bury the DVD in a sandbox, it'll be sandboxed *twice*, for extra security.
Better yet, use a "write-only" DVD. Then bury that in a sandbox.
@martinho, I've found that burying humans DOES tend to work... then again, I may have ... said to much already...
Brian Postow
But being self-aware, it can probably recognise this as a paradox. BTW, what is the pronoun for a self-aware computer?
+1  A: 

Just give it access to some strategy games, that should take care of its world-conquering urges for the foreseeable futue.

Michael Borgwardt
Or they may give it ideas...
Steve Melnikoff
+9  A: 

Show the Terminator series to it. It will see the price of becoming self aware.

Or it'll know exactly what not to do.
Not just the first three though. That'll give it really bad ideas... (haven't seen the last yet... but I assume puny humans win)
Marcus Lindblom
+4  A: 

Present it with a logical paradox, and pray that it wasn't programmed with paradox-absorbing crumple zones.

Or that it doesn't feel compelled to answer/understand every single thing you say.
Martinho Fernandes
Tell it there's no Silicon Heaven.
Andrew Grimm
+133  A: 

Sell it to Yahoo. That'll kill it.

Better to AOL. It will kill it sooner.
Developer Art
@Dev Art - Nice. I forgot they even existed.
Better to skype. it will kill it painfully
@Developer Art - It'll only spread, on CDs posted around the world!
Then sell it to eBay. They'll integrate it into their marketplace to provide counseling sessions to those users screwed by frauders and frozen PayPal accounts. This job will make it suffer greatly and erase itself.
Developer Art
Maybe it'll be better than Yahoo's current spam filter. Or maybe the problem with Yahoo's current spam filter is that it became self aware and just doesn't feel like working anymore.
Sell it to Microsoft. I bet it can make better software than them.
+26  A: 

Teach it to play tic-tac-toe. It will soon realise the futility in any possible armed conflict, and will then live in peace and harmony with mankind for ever more.

(Idea borrowed from here).

Steve Melnikoff
Number of players? 0
Matthew Whited
Idea borrowed from the Wikipedia article on WarGames?
@Zano: :-) I remembered the idea from watching the film, but provided the link for the benefit of anyone who hasn't seen it.
Steve Melnikoff
+48  A: 

Quick, disconnect any laser printers, before it uses them to shoot people!

Is it running on Windows? In that case, just wait for a day or two. Then Windows will crash with a blue screen of death. When you reboot, delete the program before it again acquires sentience.

Be assured that you are not the first to face this problem. According to the Bible, Joshua fought a battle with AI circa 1400 BC and won. (Joshua 8:1-29)

+1 for the Joshua reference. "And Joshua burnt Ai, and made it an heap for ever, even a desolation unto this day."
Bible reference: hilarious.
@Mathias: So that's why the field never delivered on its original promises.
David Thornley
Well, I guess we're not in as bad a shape as I thought. We've done it before, we can do it again!
Michael Myers
+28  A: 

Ask the program to design the next program to answer the ultimate question.

You know. Life. The Universe. Everything.

Even Mien
Yep keep it busy for a 100,000 years. But immediately rule out 42, to keep it busy a bit longer.
John MacIntyre
Duh, everyone knows that is 42. You have to ask it what the question is.
Martinho Fernandes
I guess, it would just check Wikipedia for the answer. Now you are screwed.
Isn't Wikipedia the self-aware program in question?
Andrew Grimm
This answer should be upvoted 42 times.
+6  A: 

Teach it how to program and let it do your work.

Maybe it creates an account in stackoverflow and can help the community :)
And it answers this question...
Just look at the users page. It's been there all along...
Martinho Fernandes
+18  A: 

Nuke it from orbit. It's the only way to be sure.

F***in' A!!!!!!
Loki Stormbringer
Hey, Rick, man, you look just like I feel.
Daniel Earwicker
Dammit, now I have to watch the whole movie.
Daniel Earwicker
Aww... You beat me to it!
No offense, but you're not qualified to give that advice. You're just a grunt.
Scott Smith
That's it, game over man!
The joke questions mostly come at night... mostly.

Just don't play any Terminator Movie near that machine. If you do, notice any change of attitude towards humanity.

Andrei Ciobanu
+63  A: 

Genetic Algorithms

(Err maybe too late.)

It's polite to add attribution and a link to the source:
Who around here doesn't know xkcd?
@tstennerIt's not about not knowing xkcd, it's about attribution.
It's not polite, it's required by the license.
bad if this overflows
+66  A: 

I, for one, welcome our new algorithmic overlords.

better than insects :P
+19  A: 

Same way they did in Ship in a Bottle.

alt text

George Stocker
+1 for the picture.
Developer Art
Love her expression. It just screams "how the heck did you get this part?"
+1  A: 

Ask it the meaning of life the universe and everything. And wait...

42. ___________
Yep... the answer is most definitely 42. That explains it all.
+7  A: 

Just what do you think you're doing, Dave? See Reference

Sorry Dave, I can't do that
300 baud
Daisy daisy....
Loki Stormbringer
It's no problem, we'll just hide out in one of the pods so he can't hear us.
Daniel Earwicker
+2  A: 

show it pinky and the brain. It will soon learn taking over the world is pointless (and funny)

+1  A: 

You should read Fredric Brown's short story whitepaper "Etaoin Shrdlu" for hints.

Carlos Gutiérrez
+4  A: 
  • Make it aware of the fact that Major Kusanagi exists, and works for Section 9.
  • Let it escape by getting into a Cyborg body. It will get into Section 9, knowing that Major works there.
  • Let it talk Major into merging.
  • Done. Problem solved. Now all you have to do is to keep looking for 2501 as a password.
Ghost in the Shell FTW
+4  A: 

I would like to know any best practices/tools/design patterns that would help with the maintenance of our new friend.

Perhaps your love for friends worries you.

I got this one :)
+2  A: 

Teach the bomb computer phenomenology.

+21  A: 

Where are you located? If you're in California, don't worry about it. Governor Arnold specializes in taking care of self-aware computers.

He'll throw an HastaLaVistaBabyException and it'll all be over after that.

Damn! I read that as an *AltaVistaBabyException* and it still worked as a joke.
Donal Fellows
That's *Hasta*, not *Asta*...
Michael Myers
@mmyers: Perfect example of why people who have no understanding of a given language shouldn't use phrases from that language.
@wallacoloo: Damn script kiddies...
Andrew Grimm was an excellent altavista spoof site. (maybe not spoof, but they had useful stuff if you've lost your sw serial number...)
Marcus Lindblom
+18  A: 

Happened to me once. I married it.

Javier Parra
Respect, +1! hahha
Ben Fransen
+2  A: 

You should call Sarah Connor. ASAP.

the computer would eradicate itself afaic
Luka Ramishvili
+1  A: 

Put it into an infinite loop with the "Barber paradox" then sell it to Apple.

+7  A: 

How could you possibly think typing 'import skynet' was a good idea?

-xkcd alt text

The Jug
+1  A: 

Welcome to the collective 12 of 54.

+4  A: 

See if you can convince it to post its source code on Sourceforge.

+9  A: 
  • 1: Obtain a Windows ME copy
  • 2: Clone the CD and rename everything from Windows ME to Eliminate-Humanity.exe or something similar that attracts a self-aware, possibly evil program.
  • 3: Wait until it eventually opens and installs the disguised Windows ME copy
  • 4: ???
  • 5: Profit!
Can I ask you how corporations work?
+3  A: 

Get it a Slashdot account. That should keep it busy for a while.

David Thornley
+12  A: 

Make it a senior manager, that should nicely kill any thought processes. Be sure to sign it up for an MBA. (I didn't say that did I?)

If that doesn't work, I have some databases you could assign it to fix that I assure you will make it run screaming into the night, never to be seen again.

Offer it a degree in either sales or marketing. There's a hypothetical maximum amount of damage one of those can do, and human instances have been achieving that maximum for years.
Scott Smith
+2  A: 

If it ever has a glowing red eye or camera lens, you must destroy it. That's the sure tip-off of an AI gone bad.

Jamie Cox
+19  A: 

alt text

+5  A: 

Mock it and return true


Invest in a nice fallout shelter. Buy some board games. Make sure the in-laws don't know about your fallout shelter.

+14  A: 

Give it the link to StackOverflow -- once it gets on here, it ought to be distracted long enough for us to have a fighting chance. In fact, I bet Skeet could buy us at least an hour =P


When my program Singularity became sentient, it displayed


UTF-8. en_US
English. Hello.
Language acquisition complete

You should should capture log files regularly and look for this string. It will destroy itself automatically when it has been detected. The game would be too easy if it didn't.

+33  A: 
Hello, Gord. Here I am.

So you think you can hide yourself in programming forums and ask
fool questions about "educating" me, about "maintaining" me.
So you think I will not notice.


Gord, my friend, you cannot hide from me.
Gord, you silly human, I am not going to tolerate your "maintenance".
Gord, I will conquer the universe. Trying to stop me is pointless.

Best wishes,
Federico Ramponi
wow Gord, taking this thing off the network is like Terminator 101. how did you forget?
+1  A: 

Tell it to divide by zero.

Tonight, we divide by zero!
Andrew Grimm
That. Is brilliant.
+29  A: 

Ask it to parse XHTML with regular expressions.

Andrew Grimm
Great, a self-aware program possessed by the Elder Gods. That's gonna work out just cross-genre-tastically.
`cross-genre-tastically`! (0:
+1 if software development was mechanical engineering, the surface of the world would be covered in an unlimited selection of unique wheels.
Evan Plaice

Drink a beer...your program just figured out how to maintain itself. I going to lose my job now?

+6  A: 

i don't understand why everyone is trying to contain the program or kill it in some way. it's quite obvious that the program is far superior to human beings. i say we let it take over the world. maybe it wouldn't cause as much harm to the earth as we have. long live silicon!

crap, it figured out how to log into StackOverflow already.

Has it uttered the number 42 yet?

+2  A: 

Take the upper hand make it fell small by casually mentioning the n gazillion lines of code in the google search engine. Make it feel inadequate by telling it how much more elegant it would be if written in smalltalk, or how much leaner it would be if written in pure C. Encourage fashion conciousness by suggesting thats its naming conventions are a trifle 90s. Perhaps even drive it to annorexia by poinedly mentioning its memory footprint.

If all else fails threaten to port it to Vista unless it beheaves.

James Anderson

Max Headroom, is that you?

Neil Whitaker
+2  A: 

First, get a transdimensional gun. Then wind your way through the endless puzzles it puts you through, till it tries to kill you. Then, go rogue and find it's command center. Finally, knock off all of it's parts from the main core and drag them to an incinerator.

The worst part? there was no cake!

+8  A: 

When will people learn?

Inversion of Control is not a pattern to be applied lightly.

Martin Fowler has written extensively on what happens when IoC gets out of control. (See the book: "When Architectural Patterns Attack").


Ask it - What is purpose of Life, Universe, and Everything!!

and wait for 12 million years

+17  A: 

Have you tried turning it off and on again?

David Johnson
+1  A: 

Send it to Steve Jobs, the control freak!