阿西莫夫机器人定律与软件设计
下面是在科幻历史上有名的阿西莫夫机器人三定律:
阿西莫夫机器人三大定律 Isaac Asimov’s “Three Laws of Robotics”
第一定律: A robot may not injure a human being or, through inaction, allow a human being to come to harm.
机器人不得伤害人类,或看到人类受到伤害而袖手旁观
第二定律:A robot must obey orders given it by human beings except where such orders would conflict with the First Law.
在不违反第一定律的前提下,机器人必须绝对服从人类给与的任何命令
第三定律:A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
在不违反第一定律和第二定律的前提下,机器人可以保护它自己。
在这个有名的三大定律之下,阿西莫夫编造了不少有趣的故事—当然了,还引发了不少有趣的悖论。但是我们可以很容易地将这三大定律Port到软件开发领域。一个设计优秀的软件,应当遵循阿西莫夫机器人三定律的软件版本( Isaac Asimov’s “Three Laws of Software”)。
第一定律: A software may not injure a human being or, through inaction, allow a human being to come to harm.
软件不得伤害人类,或者看到人类受到伤害而袖手旁观。
第二定律:A software must obey orders given it by human beings except where such orders would conflict with the First Law.
在不违背第一定律的前提下,软件必须绝对绝对服从人类给予的任何命令。
第三定律:A software must protect its own existence as long as such protection does not conflict with the First or Second Law.
在不违反第一定律和第二定律的前提下,软件可以保护它自己。
三条定律的优先级是从上往下递减的,第三定律体现的就是软件的鲁棒性,第二定律体现的是对软件的基本要求,而最重要的第一定律是什么?我想有两种解释:一是软件的可靠性,可靠的软件减少了对人类的伤害;二是软件的交互性,为人类开发的软件才是不伤害人类的软件。
但是事实往往令人很恼火,因为总是有那么多软件没有能遵守这三大定律中的某些,软件设计者们以为这些定律只是在科幻小说里面有效?
那么军事软件……