Happened on this video:

Lew Tucker, vice president and chief technology officer of cloud computing at Sun Microsystems, foresees applications that are entirely self-sufficient. Humans will be able to set boundaries, of course, but will no longer be needed to turn servers, or anything else for that matter, physically on or off. It is important, he says, that these applications be unified and driven by a compatible set of protocols in order to create a global cloud of clouds.
http://news.zdnet.com/2422-19178_22-331287.html

I'd suggest Asimov's 3 Laws for a start... 8)

1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.


Robot Cannon Kills 9, Wounds 14
http://www.wired.com/dangerroom/2007/10/robot-cannon-ki/