1人工智能原理2010年春季广西大学计算机学院Dr.Ou逻辑智能体LogicalAgents(知识,推理)Chapter72人工智能原理2010年春季广西大学计算机学院Dr.Ou“ThinkingRationally”Computationalmodelsofhuman“thought”processesComputationalmodelsofhumanbehaviorComputationalsystemsthat“think”rationallyComputationalsystemsthatbehaverationally3人工智能原理2010年春季广西大学计算机学院Dr.Ou逻辑智能体逻辑(基于知识)智能体Logic(Knowledge-Based)agents•通用知识+•当前的感知•在决定动作前推理(infer)出当前状态的隐含状况•这在部分可观察环境中至关重要4人工智能原理2010年春季广西大学计算机学院Dr.Ou要点基于知识的智能体Knowledge-basedagents怪兽世界Wumpusworld逻辑Logicingeneral命题逻辑与一阶逻辑Propositionalandfirst-orderlogic•推理,合法,等价,可满足•模式推理Reasoningpatterns—归结Resolution—前向/后向链Forward/backwardchaining5人工智能原理2010年春季广西大学计算机学院Dr.Ou知识和推理Knowledge&Reasoning知识库knowledgebase(KB):智能体所知道的一系列知识根据推理的规则(rulesofinference)由旧的事实推出新事实逻辑Logic表示知识,并进行推理6人工智能原理2010年春季广西大学计算机学院Dr.Ou知识库KnowledgeBase知识库:一系列语句以一种知识表示语言的格式来表示(有关世界的)断言基于知识的智能体:Tellitwhatitneedstoknow.Askitwhattodo应遵循推理的规则由知识库得到答案telltellaskask7人工智能原理2010年春季广西大学计算机学院Dr.Ou通用的基于知识智能体GenericKB-BasedAgent8人工智能原理2010年春季广西大学计算机学院Dr.Ou基于知识智能体的特性能够:•表示状态和动作•综合新的感知•更新关于世界的内部认识•推导出世界的隐含性质•推导出适合的动作9人工智能原理2010年春季广西大学计算机学院Dr.OuMineSweeperDesignalogicalagenttoplayminesweeper10人工智能原理2010年春季广西大学计算机学院Dr.OuPEASAnalysisMineSweeperPerformancemeasure•+1foreachminecorrectlyidentified,-1forincorrectlyidentifyingamine,-1000forselectingalocationcontainingamine,+1000foridentifyingallmines.Environment•9x9board,eachsquarehasaminewithprobability0.1Actuators•Agentcanmarkalocationascontainingamine,canmarkalocationasunknown,orselectalocationforviewingSensors•Agentcansensethenumberofminessurroundingadjacentlocations•Agentknowsnumberofminesremaining11人工智能原理2010年春季广西大学计算机学院Dr.Ou怪兽问题WumpusWorld怪兽怪兽WumpusWumpus12人工智能原理2010年春季广西大学计算机学院Dr.Ou怪兽问题的PEAS描述Performancemeasure性能度量•gold:+1000,death:-1000•-1perstep,-10forusingthearrowEnvironment环境•Squaresadjacenttowumpusaresmelly•Squaresadjacenttopitarebreezy•Glitteriffgoldisinthesamesquare•Shootingkillswumpusifyouarefacingit.Itscreams•Shootingusesuptheonlyarrow•Grabbingpicksupgoldifinsamesquare•Releasingdropsthegoldinsamesquare•YoubumpifyouwalkintoawallSensors传感:Stench,Breeze,Glitter,Bump,ScreamActuators执行:Leftturn,Rightturn,Forward,Grab,Release,Shoot13人工智能原理2010年春季广西大学计算机学院Dr.OuWumpusworld的特征FullyObservableNo–onlylocalperceptionDeterministicYes–outcomesexactlyspecifiedEpisodicNo–thingswedohaveanimpact.StaticYes–WumpusandPitsdonotmoveDiscreteYesSingle-agentYes–Wumpusisessentiallyanaturalfeature14人工智能原理2010年春季广西大学计算机学院Dr.OuExploringtheWumpusWorld1.TheKBinitiallycontainstherulesoftheenvironment.2.[1,1]Thefirstperceptis[none,none,none,none,none],Movetosafecelle.g.2,13.[2,1]Breezeindicatesthatthereisapitin[2,2]or[3,1]4.Returnto[1,1]totrynextsafecell15人工智能原理2010...