版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1,逻辑智能体 Logical Agents (知识,推理),Chapter 7,2,“Thinking Rationally”,Computational models of human “thought” processes Computational models of human behavior Computational systems that “think” rationally Computational systems that behave rationally,3,逻辑智能体,逻辑(基于知识)智能体 Logic (Knowledge-Based) agents 通用知识
2、 当前的感知 在决定动作前推理(infer)出当前状态的隐含状况 这在部分可观察环境中至关重要,4,要点,基于知识的智能体 Knowledge-based agents 怪兽世界 Wumpus world 逻辑 Logic in general 命题逻辑与一阶逻辑 Propositional and first-order logic 推理,合法,等价,可满足 模式推理 Reasoning patterns 归结 Resolution 前向/后向链 Forward/backward chaining,5,知识和推理 Knowledge & Reasoning,知识库 knowledge bas
3、e (KB): 智能体所知道的一系列知识 根据推理的规则( rules of inference )由旧的事实推出新事实 逻辑 Logic 表示知识,并进行推理,6,知识库 Knowledge Base,知识库 : 一系列 语句 以一种 知识表示语言 的格式 来 表示(有关世界的)断言 基于知识的智能体: Tell it what it needs to know. Ask it what to do 应遵循推理的规则由知识库得到答案,tell,ask,7,通用的基于知识智能体 Generic KB-Based Agent,8,基于知识智能体的特性,能够: 表示状态和动作 综合新的感知 更新关
4、于世界的内部认识 推导出世界的隐含性质 推导出适合的动作,9,Mine Sweeper,Design a logical agent to play minesweeper,10,PEAS Analysis Mine Sweeper,Performance measure +1 for each mine correctly identified, -1 for incorrectly identifying a mine, -1000 for selecting a location containing a mine, +1000 for identifying all mines. En
5、vironment 9 x 9 board, each square has a mine with probability 0.1 Actuators Agent can mark a location as containing a mine, can mark a location as unknown, or select a location for viewing Sensors Agent can sense the number of mines surrounding adjacent locations Agent knows number of mines remaini
6、ng,11,怪兽问题 Wumpus World,怪兽 Wumpus,12,怪兽问题的 PEAS 描述,Performance measure 性能度量 gold: +1000, death: -1000 -1 per step, -10 for using the arrow Environment 环境 Squares adjacent to wumpus are smelly Squares adjacent to pit are breezy Glitter iff gold is in the same square Shooting kills wumpus if you are f
7、acing it. It screams Shooting uses up the only arrow Grabbing picks up gold if in same square Releasing drops the gold in same square You bump if you walk into a wall Sensors 传感: Stench, Breeze, Glitter, Bump, Scream Actuators 执行: Left turn, Right turn, Forward, Grab, Release,Shoot,13,Wumpus world 的
8、特征,Fully ObservableNo only local perception Deterministic Yes outcomes exactly specified Episodic No things we do have an impact. Static Yes Wumpus and Pits do not move Discrete Yes Single-agent Yes Wumpus is essentially a natural feature,14,Exploring the Wumpus World,The KB initially contains the r
9、ules of the environment. 1,1 The first percept is none, none,none,none,none, Move to safe cell e.g. 2,1 2,1 Breeze indicates that there is a pit in 2,2 or 3,1 Return to 1,1 to try next safe cell,15,Exploring the Wumpus World,1,2 Stench in cell: wumpus is in 1,3 or 2,2YET not in 1,1 Thus not in 2,2 o
10、r stench would have been detected in 2,1 Thus wumpus is in 1,3 Thus 2,2 is safe because of lack of breeze in 1,2 Thus pit in 3,1 Move to next safe cell 2,2,16,Exploring the Wumpus World,2,2 Detect nothing Move to unvisited safe cell e.g. 2,3 2,3 Detect glitter , smell, breezeThus pick up goldThus pi
11、t in 3,3 or 2,4,17,What is a logic?,一种格式化的语言 语法 Syntax 怎样的表达是合法的 语义 Semantics 一个合法的表达式表示什么样的意义 逻辑中每一条语句的真值都对应着世界里的一种可能 例如算数语言 X+2 = y is a sentence, x2+y is not a sentence X+2 = y is true in a world where x=7 and y =1 X+2 = y is false in a world where x=0 and y =6,18,蕴涵Entailment,蕴涵 Entailment 意味着一个
12、东西跟随另外一个东西: KB 知识库 KB 蕴涵语句 当且仅当 KB 为真的所有情况里也为真 例如 一条语句的知识库KB “the Giants won and the Reds won” 蕴涵 “The Giants won”. 又如, x+y = 4 蕴涵 4 = x+y 蕴涵其实就是语句之间基于语义的一种关系,19,模型 models,逻辑学家的就是以模型的方式来进行思维的 如果在m中为真,则m是语句的一个模型 M() 表示语句的所有模型的集合 则 KB iff M(KB) M() 例如 KB = Giants won and Reds won = Giants won,20,怪兽问题里
13、的蕴涵Entailment in the wumpus world,为说明方便,对Wumpus world进行简化,只考虑有关陷阱的模型 下图为探测到方格1,1什么都没有,然后向右到方格2,1,感知到2,1有微风之后的情形,21,Wumpus models I,All possible models (exactly 8) in this reduced Wumpus world.,Pit,Breeze,22,Wumpus models II,KB = 怪兽世界的规则 由感知得到的观察,23,Wumpus models III,1 = “1,2 is safe”, KB 1, 通过模型检验(m
14、odel checking)得证,24,Wumpus models IV,2 = 2,2 is safe, KB 2,25,推理过程Inference Procedures,KB i 即 语句通过过程i从KB导出 可靠 Soundness: 只要 KB i , 就有KB 为真 ,则称i 是可靠的(推理不会出错,但不一定能够导出所有的正确结论) 完备 Completeness: 只要KB , 就有KB i 为真 ,则称i 是完备的 (所有的正确结论都会被导出,但是可能会导出一些多余的错误结论),26,语义透视图,当知识库KB为真时,由一个可靠的推理过程导出的 语句也一定是为真的,27,命题逻辑:
15、 语法,命题逻辑是最简单的逻辑 命题符号 P1, P2 等,表示语句 If S is a sentence, S is a sentence (negation) If S1 and S2 are sentences, S1 S2 is a sentence (conjunction) If S1 and S2 are sentences, S1 S2 is a sentence (disjunction) If S1 and S2 are sentences, S1 S2 is a sentence (implication) If S1 and S2 are sentences, S1 S
16、2 is a sentence (biconditional),28,命题逻辑: 语义,Each model/world specifies true or false for each proposition symbol E.g. P1,2 P2,2 P3,1 falsetruefalse With these symbols, 8 possible models, can be enumerated automatically. Rules for evaluating truth with respect to a model m: Sis true iff S is false S1
17、 S2 is true iff S1 is true and S2 is true S1 S2 is true iff S1is true or S2 is true S1 S2 is true iffS1 is false orS2 is true i.e., is false iffS1 is true andS2 is false S1 S2is true iffS1S2 is true andS2S1 is true P1,2 (P2,2 P3,1) = true (true false) = true true = true,命题逻辑不要求S1和S2之间存在任何相关性或因果关系;如果S1为真,则我主张S2为真,否则我不做任何声明,29,Truth tables for connectives,30,Wumpus world sentences,Let Pi,j be true if there is a pit in i, j. Let Bi,j be true if there is a breeze in i, j. start: P1,1 B1,1 B2,1 Pits cau
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安全生产分管报告讲解
- 企业安全生产纪律讲解
- 建筑工程公司技术总监述职报告
- 会计班试题及答案大全
- 会考化学试题及答案
- 2026广东广州番禺区实验中学编外教师招聘备考题库含完整答案详解【有一套】
- 2026梧州中茶茶业有限公司招聘岗位2人模拟试卷附参考答案详解(培优A卷)
- 2026云南丽江市宁蒗彝族自治县工业经贸和信息化局面向社会招聘公益性岗位2人考前冲刺试卷附答案详解(综合题)
- 2026年郑州航空工业管理学院招聘高层次人才及博士研究生95人模拟试卷及完整答案详解(各地真题)
- 2026福建厦门市集美区侨英中心幼儿园产假顶岗教师招聘1人考前冲刺试卷附参考答案详解(满分必刷)
- 化学灾害事故现场的应急洗消课件市公开课一等奖省赛课微课金奖课件
- 城管协管员笔试考题试题(含答案)大全五篇
- 货物生产、采购、运输方案(技术方案)
- 模板:科室医疗质量与安全管理小组成员及职责分工
- 环卫清扫保洁、垃圾清运及绿化服务投标方案(技术标 )
- 血糖监测操作流程及考核标准(100分)
- 武汉市建筑物停车配建指标
- 英文心理学文献
- 四川省绵阳市部分校2023届下学期初三期末考试数学试题试卷试题含解析
- 冠寓运营管理手册正式版
- 液相色谱柱基础知识
评论
0/150
提交评论