




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
Artificialintelligencepart3
Knowledgeandreasoning
Autumn2012Instructor:WangXiaolongHarbinInstituteofTechnology,ShenzhenGraduateSchoolIntelligentComputationResearchCenter(HITSGSICRC)ArtificialintelligencepartVII.LogicalAgentsAutumn2012Instructor:WangXiaolongHarbinInstituteofTechnology,ShenzhenGraduateSchoolIntelligentComputationResearchCenter(HITSGSICRC)
VII.LogicalAgentsAutumn2012OutlineKnowledge-basedagentsWumpusworldLogicingeneral-modelsandentailmentPropositional(Boolean)logicEquivalence,validity,satisfiabilityInferencerulesandtheoremprovingforwardchainingbackwardchainingresolutionOutlineKnowledge-basedagentsKnowledge-BasedAgentAgentthatusespriororacquiredknowledgetoachieveitsgoalsCanmakemoreefficientdecisionsCanmakeinformeddecisionsKnowledgeBase(KB):containsasetofrepresentationsoffactsabouttheAgent’senvironmentEachrepresentationiscalledasentenceUsesomeknowledgerepresentationlanguage,toTELLitwhattoknowe.g.,(temperature72F)ThenitcanAskitselfwhattodo-answersshouldfollowfromtheKBAgentcanuseinferencetodeducenewfactsfromTELLedfactsKnowledgeBaseInferenceengineDomainindependentalgorithmsDomainspecificcontentTELLASKKnowledge-BasedAgentAgentthaGenericknowledge-basedagentTELLKBwhatwasperceived
UsesaKRLtoinsertnewsentences,representationsoffacts,intoKB
ASKKBwhattodo.
Useslogicalreasoningtoexamineactionsandselectbest.Genericknowledge-basedagentWumpusWorldPEASdescriptionPerformancemeasuregold+1000,death-1000-1perstep,-10forusingthearrowEnvironmentSquaresadjacenttowumpusaresmellySquaresadjacenttopitarebreezyGlitteriffgoldisinthesamesquareShootingkillswumpusifyouarefacingitShootingusesuptheonlyarrowGrabbingpicksupgoldifinsamesquareReleasingdropsthegoldinsamesquareSensors:Stench,Breeze,Glitter,Bump,ScreamActuators:Leftturn,Rightturn,Forward,Grab,Release,ShootWumpusWorldPEASdescriptionPWumpusworldcharacterizationFully
Observable?No–onlylocalperceptionDeterministic? Yes–outcomesexactlyspecifiedEpisodic? No–sequentialatthelevelofactionsStatic? Yes–WumpusandPitsdonotmoveDiscrete? YesSingle-agent?Yes–WumpusisessentiallyanaturalfeatureWumpusworldcharacterizationFExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeOthertightspotsOthertightspotsAnotherexamplesolutionNoperception1,2and2,1OKMoveto2,1Bin2,12,2or3,1P?1,1VnoPin1,1Moveto1,2(onlyoption)AnotherexamplesolutionNoperExamplesolutionSandNoSwhenin2,11,3or1,2hasW1,2OK1,3WNoBin1,22,2OK&3,1PExamplesolutionSandNoSwheLogicingeneralLogicsareformallanguagesforrepresentinginformationsuchthatconclusionscanbedrawnSyntaxdefinesthesentencesinthelanguageSemanticsdefinethe"meaning"ofsentences;i.e.,definetruthofasentenceinaworldE.g.,thelanguageofarithmeticx+2≥yisasentence;x2+y>{}isnotasentencex+2≥yistrueiffthenumberx+2isnolessthanthenumberyx+2≥yistrueinaworldwherex=7,y=1x+2≥yisfalseinaworldwherex=0,y=6LogicingeneralLogicsareforEntailmentEntailmentmeansthatonethingfollowsfromanother:KB╞
αKnowledgebaseKBentailssentenceαifandonlyifαistrueinallworldswhereKBistrueE.g.,theKBcontaining“theGiantswon”and“theRedswon”entails“EithertheGiantswonortheRedswon”E.g.,x+y=4entails4=x+yEntailmentisarelationshipbetweensentences(i.e.,syntax)thatisbasedonsemanticsEntailmentEntailmentmeansthaModelsLogicianstypicallythinkintermsofmodels,whichareformallystructuredworldswithrespecttowhichtruthcanbeevaluatedWesaym
isamodelofasentenceαifαistrueinmM(α)isthesetofallmodelsofαThenKB╞αiffM(KB)M(α)E.g.KB=GiantswonandReds
won,α=GiantswonModelsLogicianstypicallythinEntailmentinthewumpusworldSituationafterdetectingnothingin[1,1],movingright,breezein[2,1]ConsiderpossiblemodelsforKBassumingonlypits3Booleanchoices8possiblemodelsEntailmentinthewumpusworldWumpusmodelsWumpusmodelsWumpusmodelsKB=wumpus-worldrules+observationsWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsα1="[1,2]issafe",KB╞α1,provedbymodelcheckingWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsα2="[2,2]issafe",KB╞α2WumpusmodelsKB=wumpus-worldInferenceKB├iα=sentenceαcanbederivedfromKBbyprocedureiSoundness:iissoundifwheneverKB├iα,itisalsotruethatKB╞αCompleteness:iiscompleteifwheneverKB╞α,itisalsotruethatKB├iαInferenceKB├iα=sentenceαLogicasarepresentationoftheWorldSentencesSentencesEntailsFactsFactsFollowsSemanticsSemanticsRepresentationWorld
Sentencearephysicalconfigurationsoftheagent,andreasoningisaprocessofconstructingnewphysicalconfigurationsfromoldones.Logicalreasoningshouldensurethatthenewconfigurationsrepresentaspectsoftheworldthatactuallyfollowfromtheaspectsthattheoldconfigurationsrepresent.LogicasarepresentationoftPropositionallogic:SyntaxPropositionallogicisthesimplestlogic–illustratesbasicideasThepropositionsymbolsP1,P2etcaresentencesIfSisasentence,Sisasentence(negation)IfS1andS2aresentences,S1
S2isasentence(conjunction)IfS1andS2aresentences,S1
S2isasentence(disjunction)IfS1andS2aresentences,S1
S2isasentence(implication)IfS1andS2aresentences,S1
S2isasentence(biconditional)Propositionallogic:SyntaxProPropositionallogic:SemanticsEachmodelspecifiestrue/falseforeachpropositionsymbolE.g. P1,2 P2,2 P3,1 false true falseWiththesesymbols,8possiblemodels,canbeenumeratedautomatically.Rulesforevaluatingtruthwithrespecttoamodelm: S istrueiff Sisfalse S1
S2istrueiff S1istrueand S2istrue S1
S2istrueiff S1istrueor S2istrue S1
S2 istrueiff S1isfalseor S2istrue i.e., isfalseiff S1istrueand S2isfalse S1
S2 istrueiff S1S2istrueandS2S1istrueSimplerecursiveprocessevaluatesanarbitrarysentence,e.g.,P1,2(P2,2
P3,1)=true
(truefalse)=true
true=truePropositionallogic:SemanticsTruthtablesforconnectivesTruthtablesforconnectivesWumpusworldsentencesLetPi,jbetrueifthereisapitin[i,j].LetBi,jbetrueifthereisabreezein[i,j].P1,1B1,1B2,1"Pitscausebreezesinadjacentsquares"B1,1
(P1,2
P2,1)B2,1 (P1,1
P2,2P3,1)WumpusworldsentencesLetPi,jTruthtablesforinferenceTruthtablesforinferenceInferencebyenumerationDepth-firstenumerationofallmodelsissoundandcompleteFornsymbols,timecomplexityisO(2n),spacecomplexityisO(n)InferencebyenumerationDepth-LogicalequivalenceTwosentencesarelogicallyequivalentifftrueinsamemodels:α≡?iffα╞βandβ╞αLogicalequivalenceTwosentencValidityandsatisfiabilityAsentenceisvalidifitistrueinallmodels,e.g.,True, AA, AA, (A(AB))BValidityisconnectedtoinferenceviatheDeductionTheorem:KB╞αifandonlyif(KB
α)isvalidAsentenceissatisfiableifitistrueinsomemodele.g.,AB, CAsentenceisunsatisfiableifitistrueinnomodelse.g.,AASatisfiabilityisconnectedtoinferenceviathefollowing:KB╞αifandonlyif(KB
α)isunsatisfiable--refutationValidityandsatisfiabilityAsProofmethodsProofmethodsdivideinto(roughly)twokinds:ApplicationofinferencerulesLegitimate(sound)generationofnewsentencesfromoldProof=asequenceofinferenceruleapplications
CanuseinferencerulesasoperatorsinastandardsearchalgorithmTypicallyrequiretransformationofsentencesintoanormalformModelcheckingtruthtableenumeration(alwaysexponentialinn)improvedbacktracking,e.g.,Davis--Putnam-Logemann-Loveland(DPLL)heuristicsearchinmodelspace(soundbutincomplete) e.g.,min-conflicts-likehill-climbingalgorithmsProofmethodsProofmethodsdivInferenceRulesInferenceRulesInferenceRulesInferenceRulesResolutionConjunctiveNormalForm(CNF)
conjunctionofdisjunctionsofliterals clauses E.g.,(A
B)(B
C
D)Resolutioninferencerule(forCNF):li
…
lk, m1
…
mnli
…
li-1
li+1
…
lk
m1
…
mj-1
mj+1
...
mn
whereliandmjarecomplementaryliterals. E.g.,P1,3
P2,2, P2,2
P1,3Resolutionissoundandcomplete
forpropositionallogicResolutionConjunctiveNormalFResolutionSoundnessofresolutioninferencerule:(li
…
li-1
li+1
…
lk)li mj(m1
…
mj-1
mj+1
...
mn)(li
…
li-1
li+1
…
lk)(m1
…
mj-1
mj+1
...
mn)ResolutionSoundnessofresolutConversiontoCNFB1,1
(P1,2
P2,1)Eliminate,replacingαβwith(αβ)(βα).(B1,1
(P1,2
P2,1))((P1,2
P2,1)B1,1)2.Eliminate,replacingαβwithαβ.(B1,1
P1,2
P2,1)((P1,2
P2,1)B1,1)3.MoveinwardsusingdeMorgan'srulesanddouble-negation:(B1,1P1,2
P2,1)((P1,2
P2,1)B1,1)4.Applydistributivitylaw(over)andflatten:(B1,1
P1,2
P2,1)(P1,2B1,1)(P2,1
B1,1)ConversiontoCNFB1,1(P1,2ResolutionalgorithmProofbycontradiction,i.e.,showKBαunsatisfiableResolutionalgorithmProofbycResolutionexampleKB=(B1,1
(P1,2P2,1))B1,1α=P1,2ResolutionexampleKB=(B1,1ForwardandbackwardchainingHornForm(restricted) KB=conjunctionofHornclauses(clauseswith≤1positiveliteral)Hornclause=propositionsymbol;or(conjunctionofsymbols)symbolE.g.,C(BA)(CDB)ModusPonens(forHornForm):completeforHornKBsα1,…,αn, α1
…
αn
ββCanbeusedwithforwardchainingorbackwardchaining.ThesealgorithmsareverynaturalandruninlineartimeForwardandbackwardchainingHForwardchainingIdea:findanyrulewhosepremisesaresatisfiedintheKB,additsconclusiontotheKB,untilqueryisfoundForwardchainingIdea:findanyForwardchainingalgorithmForwardchainingissoundandcompleteforHornKBForwardchainingalgorithmForwForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleForwardchainingexampleProofofcompletenessFCderiveseveryatomicsentencethatisentailedbyKBFCreachesafixedpointwherenonewatomicsentencesarederivedConsiderthefinalstateasamodelm,assigningtrue/falsetosymbolsEveryclauseintheoriginalKBistrueinm
a1
…
akbHencemisamodelofKBIfKB╞q,qistrueineverymodelofKB,includingmProofofcompletenessFCderiveBackwardchainingIdea:workbackwardsfromthequeryq:toproveqbyBC,checkifqisknownalready,orprovebyBCallpremisesofsomeruleconcludingqAvoidloops:checkifnewsubgoalisalreadyonthegoalstackAvoidrepeatedwork:checkifnewsubgoalhasalreadybeenprovedtrue,orhasalreadyfailedBackwardchainingIdea:workbaBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleBackwardchainingexampleForwardvs.backwardchainingFCisdata-driven,automatic,unconsciousprocessing,e.g.,objectrecognition,routinedecisionsMaydolotsofworkthatisirrelevanttothegoalBCisgoal-driven,appropriateforproblem-solving,e.g.,Wherearemykeys?HowdoIgetintoaPhDprogram?ComplexityofBCcanbemuchlessthanlinearinsizeofKBForwardvs.backwardchainingFEfficientpropositionalinferenceTwofamiliesofefficientalgorithmsforpropositionalinference:BasedonbacktrackingsearchBasedonhillclimbingsearchCompletebacktrackingsearchalgorithmsDPLLalgorithm(Davis,Putnam,Logemann,Loveland)IncompletelocalsearchalgorithmsWalkSATalgorithmEfficientpropositionalinfereTheDPLLalgorithmDetermineifaninputpropositionallogicsentence(inCNF)issatisfiable.Arecursivedepth-firstenumerationofpossiblemodels.Improvementsovertruthtableenumeration:EarlyterminationAclauseistrueifanyliteralistrue.Asentenceisfalseifanyclauseisfalse.PuresymbolheuristicPuresymbol:alwaysappearswiththesame"sign"inallclauses.e.g.,Inthethreeclauses(A
B),(B
C),(CA),AandBarepure,Cisimpure.Makeapuresymbolliteraltrue.UnitclauseheuristicUnitclause:onlyoneliteralintheclauseTheonlyliteralinaunitclausemustbetrue.TheDPLLalgorithmDetermineifTheDPLLalgorithmTheDPLLalgorithmTheWalkSATalgorithmIncomplete,localsearchalgorithmEvaluationfunction:Themin-conflictheuristicofminimizingthenumberofunsatisfiedclausesBalancebetweengreedinessandrandomnessTheWalkSATalgorithmIncompletTheWalkSATalgorithmTheWalkSATalgorithmHardsatisfiabilityproblemsConsiderrandom3-CNFsentences.e.g., (D
BC)(B
A
C)(C
BE)(E
DB)(BE
C)m=numberofclausesn=numberofsymbolsHardproblemsseemtoclusternearm/n=4.3(criticalpoint)HardsatisfiabilityproblemsCoHardsatisfiabilityproblemsHardsatisfiabilityproblemsHardsatisfiabilityproblemsMedianruntimefor100satisfiablerandom3-CNFsentences,n=50HardsatisfiabilityproblemsMeInference-basedagentsinthewumpusworldAwumpus-worldagentusingpropositionallogic:P1,1
W1,1
Bx,y
(Px,y+1
Px,y-1
Px+1,y
Px-1,y)Sx,y
(Wx,y+1
Wx,y-1
Wx+1,y
Wx-1,y)W1,1
W1,2
…W4,4
W1,1
W1,2
W1,1
W1,3
…64distinctpropositionsymbols,155sentencesInference-basedagentsinthe人工智能的課件CH7LogicAgentsExpressivenesslimitationofpropositionallogicKBcontains"physics"sentencesforeverysinglesquareForeverytimetandeverylocation[x,y],Lx,y
FacingRightt
Forwardt
Lx+1,y
RapidproliferationofclausestExpressivenesslimitationofpSummaryLogicalagentsapplyinferencetoaknowledgebasetoderivenewinformationandmakedecisionsBasicconceptsoflogic:syntax:formalstructureofsentencessemantics:truthofsentenceswrtmodelsentailment:necessarytruthofonesentencegivenanotherinference:derivingsentencesfromothersentencessoundness:derivationsproduceonlyentailedsentencescompleteness:derivationscanproduceallentailedsentencesWumpusworldrequirestheabilitytorepresentpartialandnegatedinformation,reasonbycases,etc.Resolutioniscompleteforpropositionallogic
Forward,backwardchainingarelinear-time,completeforHornclausesPropositionallogiclacksexpressivepowerSummaryLogicalagentsapplyinAssignmentsEx7.4,7.12,7.17.AssignmentsEx7.4,7.12,7.17.
Artificialintelligencepart3
Knowledgeandreasoning
Autumn2012Instructor:WangXiaolongHarbinInstituteofTechnology,ShenzhenGraduateSchoolIntelligentComputationResearchCenter(HITSGSICRC)ArtificialintelligencepartVII.LogicalAgentsAutumn2012Instructor:WangXiaolongHarbinInstituteofTechnology,ShenzhenGraduateSchoolIntelligentComputationResearchCenter(HITSGSICRC)
VII.LogicalAgentsAutumn2012OutlineKnowledge-basedagentsWumpusworldLogicingeneral-modelsandentailmentPropositional(Boolean)logicEquivalence,validity,satisfiabilityInferencerulesandtheoremprovingforwardchainingbackwardchainingresolutionOutlineKnowledge-basedagentsKnowledge-BasedAgentAgentthatusespriororacquiredknowledgetoachieveitsgoalsCanmakemoreefficientdecisionsCanmakeinformeddecisionsKnowledgeBase(KB):containsasetofrepresentationsoffactsabouttheAgent’senvironmentEachrepresentationiscalledasentenceUsesomeknowledgerepresentationlanguage,toTELLitwhattoknowe.g.,(temperature72F)ThenitcanAskitselfwhattodo-answersshouldfollowfromtheKBAgentcanuseinferencetodeducenewfactsfromTELLedfactsKnowledgeBaseInferenceengineDomainindependentalgorithmsDomainspecificcontentTELLASKKnowledge-BasedAgentAgentthaGenericknowledge-basedagentTELLKBwhatwasperceived
UsesaKRLtoinsertnewsentences,representationsoffacts,intoKB
ASKKBwhattodo.
Useslogicalreasoningtoexamineactionsandselectbest.Genericknowledge-basedagentWumpusWorldPEASdescriptionPerformancemeasuregold+1000,death-1000-1perstep,-10forusingthearrowEnvironmentSquaresadjacenttowumpusaresmellySquaresadjacenttopitarebreezyGlitteriffgoldisinthesamesquareShootingkillswumpusifyouarefacingitShootingusesuptheonlyarrowGrabbingpicksupgoldifinsamesquareReleasingdropsthegoldinsamesquareSensors:Stench,Breeze,Glitter,Bump,ScreamActuators:Leftturn,Rightturn,Forward,Grab,Release,ShootWumpusWorldPEASdescriptionPWumpusworldcharacterizationFully
Observable?No–onlylocalperceptionDeterministic? Yes–outcomesexactlyspecifiedEpisodic? No–sequentialatthelevelofactionsStatic? Yes–WumpusandPitsdonotmoveDiscrete? YesSingle-agent?Yes–WumpusisessentiallyanaturalfeatureWumpusworldcharacterizationFExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeExploringaWumpusworldA=AgentB=BreezeS=SmellP=PitW=WumpusOK=SafeV=VisitedG=GlitterExploringaWumpusworldA=AgeOthertightspotsOthertightspotsAnotherexamplesolutionNoperception1,2and2,1OKMoveto2,1Bin2,12,2or3,1P?1,1VnoPin1,1Moveto1,2(onlyoption)AnotherexamplesolutionNoperExamplesolutionSandNoSwhenin2,11,3or1,2hasW1,2OK1,3WNoBin1,22,2OK&3,1PExamplesolutionSandNoSwheLogicingeneralLogicsareformallanguagesforrepresentinginformationsuchthatconclusionscanbedrawnSyntaxdefinesthesentencesinthelanguageSemanticsdefinethe"meaning"ofsentences;i.e.,definetruthofasentenceinaworldE.g.,thelanguageofarithmeticx+2≥yisasentence;x2+y>{}isnotasentencex+2≥yistrueiffthenumberx+2isnolessthanthenumberyx+2≥yistrueinaworldwherex=7,y=1x+2≥yisfalseinaworldwherex=0,y=6LogicingeneralLogicsareforEntailmentEntailmentmeansthatonethingfollowsfromanother:KB╞
αKnowledgebaseKBentailssentenceαifandonlyifαistrueinallworldswhereKBistrueE.g.,theKBcontaining“theGiantswon”and“theRedswon”entails“EithertheGiantswonortheRedswon”E.g.,x+y=4entails4=x+yEntailmentisarelationshipbetweensentences(i.e.,syntax)thatisbasedonsemanticsEntailmentEntailmentmeansthaModelsLogicianstypicallythinkintermsofmodels,whichareformallystructuredworldswithrespecttowhichtruthcanbeevaluatedWesaym
isamodelofasentenceαifαistrueinmM(α)isthesetofallmodelsofαThenKB╞αiffM(KB)M(α)E.g.KB=GiantswonandReds
won,α=GiantswonModelsLogicianstypicallythinEntailmentinthewumpusworldSituationafterdetectingnothingin[1,1],movingright,breezein[2,1]ConsiderpossiblemodelsforKBassumingonlypits3Booleanchoices8possiblemodelsEntailmentinthewumpusworldWumpusmodelsWumpusmodelsWumpusmodelsKB=wumpus-worldrules+observationsWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsα1="[1,2]issafe",KB╞α1,provedbymodelcheckingWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsWumpusmodelsKB=wumpus-worldWumpusmodelsKB=wumpus-worldrules+observationsα2="[2,2]issafe",KB╞α2WumpusmodelsKB=wumpus-worldInferenceKB├iα=sentenceαcanbederivedfromKBbyprocedureiSoundness:iissoundifwheneverKB├iα,itisalsotruethatKB╞αCompleteness:iiscompleteifwheneverKB╞α,itisalsotruethatKB├iαInferenceKB├iα=sentenceαLogicasarepresentationoftheWorldSentencesSentencesEntailsFactsFactsFollowsSemanticsSemanticsRepresentationWorld
Sentencearephysicalconfigurationsoftheagent,andreasoningisaprocessofconstructingnewphysicalconfigurationsfromoldones.Logicalreasoningshouldensurethatthenewconfigurationsrepresentaspectsoftheworldthatactuallyfollowfromtheaspectsthattheoldconfigurationsrepresent.LogicasarepresentationoftPropositionallogic:SyntaxPropositionallogicisthesimplestlogic–illustratesbasicideasThepropositionsymbolsP1,P2etcaresentencesIfSisasentence,Sisasentence(negation)IfS1andS2aresentences,S1
S2isasentence(conjunction)IfS1andS2aresentences,S1
S2isasentence(disjunction)IfS1andS2aresentences,S1
S2isasentence(implication)IfS1andS2aresentences,S1
S2isasentence(biconditional)Propositionallogic:SyntaxProPropositionallogic:SemanticsEachmodelspecifiestrue/falseforeachpropositionsymbolE.g. P1,2 P2,2 P3,1 false true falseWiththesesymbols,8possiblemodels,canbeenumeratedautomatically.Rulesforevaluatingtruthwithrespecttoamodelm: S istrueiff Sisfalse S1
S2istrueiff S1istrueand S2istrue S1
S2istrueiff S1istrueor S2istrue S1
S2 istrueiff S1isfalseor S2istrue i.e., isfalseiff S1istrueand S2isfalse S1
S2 istrueiff S1S2istrueandS2S1istrueSimplerecursiveprocessevaluatesanarbitrarysentence,e.g.,P1,2(P2,2
P3,1)=true
(truefalse)=true
true=truePropositionallogic:SemanticsTruthtablesforconnectivesTruthtablesforconnectivesWumpusworldsentencesLetPi,jbetrueifthereisapitin[i,j].LetBi,jbetrueifthereisabreezein[i,j].P1,1B1,1B2,1"Pitscausebreezesinadjacentsquares"B1,1
(P1,2
P2,1)B2,1 (P1,1
P2,2P3,1)WumpusworldsentencesLetPi,jTruthtablesforinferenceTruthtablesforinferenceInferencebyenumerationDepth-firstenumerationofallmodelsissoundandcompleteFornsymbols,timecomplexityisO(2n),spacecomplexityisO(n)InferencebyenumerationDepth-LogicalequivalenceTwosentencesarelogicallyequivalentifftrueinsamemodels:α≡?iffα╞βandβ╞αLogicalequivalenceTwosentencValidityandsatisfiabilityAsentenceisvalidifitistrueinallmodels,e.g.,True, AA, AA, (A(AB))BValidityisconnectedtoinferenceviatheDeductionTheorem:KB╞αifandonlyif(KB
α)isvalid
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 質檢公章使用管理制度
- 質量安全控制管理制度
- 購買公司全套管理制度
- 車輛管理用油管理制度
- 車間人員健康管理制度
- 車間蟲害控制管理制度
- 新能源汽車充電基礎設施投資策略與充電站盈利模式研究報告
- 禮儀學院規章管理制度
- 秋林隧道維護管理制度
- 設置公司會計管理制度
- 大學生選課申請表
- GB∕T 24202-2021 光纜增強用碳素鋼絲
- GB 18582-2020 建筑用墻面涂料中有害物質限量
- 十大直播電商基地企業參評報名表
- 道路施工安全應急方案
- 生產安全事故風險評估報告(參考模板)
- 消防安全工作臺賬表格匯總
- 廣州舊城改造三元里文本
- 教科版五年級科學下冊知識點總結與歸納(填空版)含答案
- 概率論與數理統計公式整理
- 國家標準色卡電子word圖片
評論
0/150
提交評論