框架 (人工智能)

框架(英語:frame)是人工智能研究中一种用于知识表示的数据结构,由马文·闵斯基于1974年在其论文《表示知识的框架》(A Framework for Representing Knowledge)中最早提出。闵斯基将框架定义为表示常规情景(stereotyped situation)的信息结构。框架理论认为人类对世界的认知都是以过往经验(常规情景)为基础的,而人对新事物的认识则是对以往经验的分析与补充。这些经验可以以框架的形式存储为数据结构。[1][2]

框架结构

框架通常由描述事物各个方面的若干槽(slot,或译为“条目”)组成,每个槽则又可包含若干值(value)。复杂框架则多一个层次,即槽可分为若干侧面(facet,或译为“方面”),而每一侧面则又可包含若干值。[1][2]

以下为一个表示“男孩”框架的示例:

类型
BOY(男孩)_(框架名)
ISA(属性)Person(人)(父框架)
SEX(性别)Male(男性)(实例值)
AGE(年龄)Under 12 yrs.(小于12岁)(过程附件——集合约束)
HOME(家)A Place(某一地点)(另一框架)
NUM_LEGS(腿数量)Default = 2 (默认值 = 2)(从父框架“人”继承的默认值)

以下框架示例表示一个名为亚历克斯(Alex)的男孩。该框架是“男孩”框架的一个实例。其“性别”槽的值是从父框架继承而来的默认值。但因为他只有一条腿,所以其“腿数量”槽的值为1,与父框架中的默认值2并不同。另外其“年龄”槽包含了需要该值时(IF-NEEDED)才触发的一个过程附件(procedural attachment)。

类型
ALEX(亚历克斯)_(框架名)
NAME(名字)Alex(亚历克斯)(关键值)
ISA(属性)Boy(男孩)(父框架)
SEX(性别)Male(男性)(继承值)
AGE(年龄)IF-NEEDED(如需): Subtract(current,BIRTHDATE);(过程附件)
HOME(家)100 Main St.(主街100号)(实例值)
BIRTHDATE(出生日期)8/4/2000(2000年8月4日)(实例值)
FAVORITE_FOOD(喜爱食物)Spaghetti(意大利面)(实例值)
CLIMBS(攀爬)Trees(树)(实例值)
BODY_TYPE(身体类型)Wiry(结实)(实例值)
NUM_LEGS(腿数量)1(例外)

参见

参考文献

  • Russell, Stuart J.; Norvig, Peter (2010), Artificial Intelligence: A Modern Approach (2nd ed.), Upper Saddle River, New Jersey: Prentice Hall, ISBN 0-13-604259-7, ch. 1.
  • Daniel G. Bobrow, Terry Winograd, An Overview of KRL, A Knowledge Representation Language[永久失效連結], Stanford Artificial Intelligence Laboratory Memo AIM 293, 1976.
  • R. Bruce Roberts and Ira P. Goldstein, The FRL Primer, 1977
  • R. Bruce Roberts and Ira P. Goldstein, The FRL Manual, 1977
  • Brachman, R.; Schmolze, J. An overview of the KL-ONE Knowledge Representation System. Cognitive Science. 1985, 9 (2): 171–216. doi:10.1016/s0364-0213(85)80014-8 . 
  • Fikes, R. E.; Kehler, T. The role of frame-based representation in knowledge representation and reasoning. Communications of the ACM. 1985, 28 (9): 904–920. S2CID 9868560. doi:10.1145/4284.4285. 
  • Peter Clark & Bruce Porter: KM - The Knowledge Machine 2.0: Users Manual, http://www.cs.utexas.edu/users/mfkb/RKF/km.html页面存档备份,存于互联网档案馆).
  • Peter D. Karp, The Design Space of Frame Knowledge Representation Systems页面存档备份,存于互联网档案馆), Technical Note 520. Artificial Intelligence Center, SRI International, 1992