Knowledge-Representation-and-Reasoning-Villanova-University-维拉诺瓦大学知识表示与推理_第1页
Knowledge-Representation-and-Reasoning-Villanova-University-维拉诺瓦大学知识表示与推理_第2页
Knowledge-Representation-and-Reasoning-Villanova-University-维拉诺瓦大学知识表示与推理_第3页
Knowledge-Representation-and-Reasoning-Villanova-University-维拉诺瓦大学知识表示与推理_第4页
Knowledge-Representation-and-Reasoning-Villanova-University-维拉诺瓦大学知识表示与推理_第5页
已阅读5页,还剩39页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

KnowledgeRepresentationandReasoningFocusonSections10.1-10.3,10.6GuestLecturer:EricEatonUniversityofMarylandBaltimoreCountyLockheedMartinAdvancedTechnologyLaboratoriesAdaptedfromslidesbyTimFininandMariedesJardins.SomematerialadoptedfromnotesbyAndreasGeyer-Schulz,andChuckDyer.1OutlineApproachestoknowledgerepresentationSituationcalculusDeductive/logicalmethodsForward-chainingproductionrulesystemsSemanticnetworksFrame-basedsystemsDescriptionlogicsAbductive/uncertainmethodsWhat’sabduction?Whydoweneeduncertainty?BayesianreasoningOthermethods:Defaultreasoning,rule-basedmethods,Dempster-Shafertheory,fuzzyreasoning2IntroductionRealknowledgerepresentationandreasoningsystemscomeinseveralmajorvarieties.Thesedifferintheirintendeduse,expressivity,features,…SomemajorfamiliesareLogicprogramminglanguagesTheoremproversRule-basedorproductionsystemsSemanticnetworksFrame-basedrepresentationlanguagesDatabases(deductive,relational,object-oriented,etc.)ConstraintreasoningsystemsDescriptionlogicsBayesiannetworksEvidentialreasoning3OntologicalEngineeringStructuringknowledgeinausefulfashionAnontologyformallyrepresentsconceptsinadomainandrelationshipsbetweenthoseconceptsUsingtheproperrepresentationiskey!ItcanbethedifferencebetweensuccessandfailureOftencostlytoformallyengineerdomainknowledgeDomainexperts(a.k.a.subjectmatterexperts)Commercialontology,e.g.Cyc(cyc/,/)4RepresentingchangeRepresentingchangeintheworldinlogiccanbetricky.OnewayisjusttochangetheKBAddanddeletesentencesfromtheKBtoreflectchangesHowdowerememberthepast,orreasonaboutchanges?SituationcalculusisanotherwayAsituationisasnapshotoftheworldatsomeinstantintimeWhentheagentperformsanactionAinsituationS1,theresultisanewsituationS2.5Situations6SituationcalculusAsituationisasnapshotoftheworldatanintervaloftimeduringwhichnothingchangesEverytrueorfalsestatementismadewithrespecttoaparticularsituation.Addsituationvariablestoeverypredicate.at(hunter,1,1)becomesat(hunter,1,1,s0):at(hunter,1,1)istrueinsituation(i.e.,state)s0.Alternatively,addaspecial2nd-orderpredicate,holds(f,s),thatmeans“fistrueinsituations.”E.g.,holds(at(hunter,1,1),s0)Addanewfunction,result(a,s),thatmapsasituationsintoanewsituationasaresultofperformingactiona.Forexample,result(forward,s)isafunctionthatreturnsthesuccessorstate(situation)tosExample:Theactionagent-walks-to-location-ycouldberepresentedby(

x)(

y)(

s)(at(Agent,x,s)^~onbox(s))->at(Agent,y,result(walk(y),s))7DeducinghiddenpropertiesFromtheperceptualinformationweobtaininsituations,wecaninferpropertiesoflocations

l,sat(Agent,l,s)^Breeze(s)=>Breezy(l)

l,sat(Agent,l,s)^Stench(s)=>Smelly(l)NeitherBreezynorSmellyneedsituationargumentsbecausepitsandWumpusesdonotmovearound8DeducinghiddenpropertiesIIWhybothcausalanddiagnosticrules?Maybediagnosticrulesareenough?However,itisverytrickytoensurethattheyderivethestrongestpossibleconclusionsfromtheavailableinformation.Forexample,theabsenceofstenchorbreezeimpliesthatadjacentsquaresareOK:(

x,y,g,u,c,s)Percept([None,None,g,u,c],t)^At(Agent,x,s)^Adjacent(x,y)=>OK(y)butsometimesasquarecanbeOKevenwhensmellsandbreezesabound.Considerthefollowingmodel-basedrule:(

x,t)(

t(Wumpus,x,t)^Pit(x))<=>OK(x)Iftheaxiomscorrectlyandcompletelydescribethewaytheworldworksandthewayperceptsareproduced,theinferenceprocedurewillcorrectlyinferthestrongestpossibledescriptionoftheworldstategiventheavailablepercepts.9DeducinghiddenpropertiesIIWeneedtowritesomerulesthatrelatevariousaspectsofasingleworldstate(asopposedtoacrossstates)Therearetwomainkindsofsuchrules:Causalrulesreflecttheassumeddirectionofcausalityintheworld:(Al1,l2,s)At(Wumpus,l1,s)^Adjacent(l1,l2)=>Smelly(l2)(Al1,l2,s)At(Pit,l1,s)^Adjacent(l1,l2)=>Breezy(l2)Systemsthatreasonwithcausalrulesarecalledmodel-basedreasoningsystemsDiagnosticrulesinferthepresenceofhiddenpropertiesdirectlyfromthepercept-derivedinformation.Wehavealreadyseentwodiagnosticrules:(Al,s)At(Agent,l,s)^Breeze(s)=>Breezy(l)(Al,s)At(Agent,l,s)^Stench(s)=>Smelly(l)10Representingchange:

TheframeproblemFrameaxiom:Ifpropertyxdoesn’tchangeasaresultofapplyingactionainstates,thenitstaysthesame.On(x,z,s)Clear(x,s)

On(x,table,Result(Move(x,table),s))

On(x,z,Result(Move(x,table),s))On(y,z,s)yxOn(y,z,Result(Move(x,table),s))Theproliferationofframeaxiomsbecomesverycumbersomeincomplexdomains11TheframeproblemIISuccessor-stateaxiom:Generalstatementthatcharacterizeseverywayinwhichaparticularpredicatecanbecometrue:Eitheritcanbemade

true,oritcanalreadybetrueandnotbechanged:On(x,table,Result(a,s))

[On(x,z,s)Clear(x,s)a=Move(x,table)]

[On(x,table,s)aMove(x,z)]Incomplexworlds,whereyouwanttoreasonaboutlongerchainsofaction,eventhesetypesofaxiomsaretoocumbersomePlanningsystemsusespecial-purposeinferencemethodstoreasonabouttheexpectedstateoftheworldatanypointintimeduringamulti-stepplan12QualificationproblemQualificationproblem:Howcanyoupossiblycharacterizeeverysingleeffectofanaction,oreverysingleexceptionthatmightoccur?WhenIputmybreadintothetoaster,andpushthebutton,itwillbecometoastedaftertwominutes,unless…Thetoasterisbroken,or…Thepowerisout,or…Iblowafuse,or…Aneutronbombexplodesnearbyandfriesallelectricalcomponents,or…Ameteorstrikestheearth,andtheworldweknowitceasestoexist,or…13RamificationproblemSimilarly,it’sjustaboutimpossibletocharacterizeeverysideeffectofeveryaction,ateverypossiblelevelofdetail:WhenIputmybreadintothetoaster,andpushthebutton,thebreadwillbecometoastedaftertwominutes,and…Thecrumbsthatfalloffthebreadontothebottomofthetoasterovertraywillalsobecometoasted,and…Someoftheaforementionedcrumbswillbecomeburnt,and…Theoutsidemoleculesofthebreadwillbecome“toasted,”and…Theinsidemoleculesofthebreadwillremainmore“breadlike,”and…Thetoastingprocesswillreleaseasmallamountofhumidityintotheairbecauseofevaporation,and…TheheatingelementswillbecomeatinyfractionmorelikelytoburnoutthenexttimeIusethetoaster,and…Theelectricitymeterinthehousewillmoveupslightly,and…14Knowledgeengineering!Modelingthe“right”conditionsandthe“right”effectsatthe“right”levelofabstractionisverydifficultKnowledgeengineering(creatingandmaintainingknowledgebasesforintelligentreasoning)isanentirefieldofinvestigationManyresearchershopethatautomatedknowledgeacquisitionandmachinelearningtoolscanfillthegap:Ourintelligentsystemsshouldbeabletolearnabouttheconditionsandeffects,justlikewedo!Ourintelligentsystemsshouldbeabletolearnwhentopayattentionto,orreasonabout,certainaspectsofprocesses,dependingonthecontext!15PreferencesamongactionsAproblemwiththeWumpusworldknowledgebasethatwehavebuiltsofaristhatitisdifficulttodecidewhichactionisbestamonganumberofpossibilities.Forexample,todecidebetweenaforwardandagrab,axiomsdescribingwhenitisOKtomovetoasquarewouldhavetomentionglitter.Thisisnotmodular!Wecansolvethisproblembyseparatingfactsaboutactionsfromfactsaboutgoals.Thiswayouragentcanbereprogrammedjustbyaskingittoachievedifferentgoals.16PreferencesamongactionsThefirststepistodescribethedesirabilityofactionsindependentofeachother.Indoingthiswewilluseasimplescale:actionscanbeGreat,Good,Medium,Risky,orDeadly.Obviously,theagentshouldalwaysdothebestactionitcanfind:(

a,s)Great(a,s)=>Action(a,s)(

a,s)Good(a,s)^~(

b)Great(b,s)=>Action(a,s)(a,s)Medium(a,s)^(~(

b)Great(b,s)vGood(b,s))=>Action(a,s)...17PreferencesamongactionsWeusethisactionqualityscaleinthefollowingway.Untilitfindsthegold,thebasicstrategyforouragentis:Greatactionsincludepickingupthegoldwhenfoundandclimbingoutofthecavewiththegold.Goodactionsincludemovingtoasquarethat’sOKandhasn'tbeenvisitedyet.MediumactionsincludemovingtoasquarethatisOKandhasalreadybeenvisited.RiskyactionsincludemovingtoasquarethatisnotknowntobedeadlyorOK.DeadlyactionsaremovingintoasquarethatisknowntohaveapitoraWumpus.18Goal-basedagentsOncethegoldisfound,itisnecessarytochangestrategies.Sonowweneedanewsetofactionvalues.Wecouldencodethisasarule:(

s)Holding(Gold,s)=>GoalLocation([1,1]),s)Wemustnowdecidehowtheagentwillworkoutasequenceofactionstoaccomplishthegoal.Threepossibleapproachesare:Inference:goodversuswastefulsolutionsSearch:makeaproblemwithoperatorsandsetofstatesPlanning:tobediscussedlater

19SemanticNetworksAsemanticnetworkisasimplerepresentationschemethatusesagraphoflabelednodesandlabeled,directedarcstoencodeknowledge.Usuallyusedtorepresentstatic,taxonomic,conceptdictionariesSemanticnetworksaretypicallyusedwithaspecialsetofaccessingproceduresthatperform“reasoning”e.g.,inheritanceofvaluesandrelationshipsSemanticnetworkswereverypopularinthe‘60sand‘70sbutarelessfrequentlyusedtoday.OftenmuchlessexpressivethanotherKRformalismsThegraphicaldepictionassociatedwithasemanticnetworkisasignificantreasonfortheirpopularity.20NodesandArcsArcsdefinebinaryrelationshipsthatholdbetweenobjectsdenotedbythenodes.john5Sueagemothermother(john,sue)age(john,5)wife(sue,max)age(max,34)...34agefatherMaxwifehusbandage21SemanticNetworksTheISA(is-a)orAKO(a-kind-of)relationisoftenusedtolinkinstancestoclasses,classestosuperclassesSomelinks(e.g.hasPart)areinheritedalongISApaths.ThesemanticsofasemanticnetcanberelativelyinformalorveryformaloftendefinedattheimplementationlevelisaisaisaisaRobinBirdAnimalRedRustyhasPartWing22ReificationNon-binaryrelationshipscanberepresentedby“turningtherelationshipintoanobject”Thisisanexampleofwhatlogicianscall“reification”reifyv:consideranabstractconcepttoberealWemightwanttorepresentthegenericgiveeventasarelationinvolvingthreethings:agiver,arecipientandanobject,give(john,mary,book32)givemarybook32johnrecipientgiverobject23IndividualsandClassesManysemanticnetworksdistinguishnodesrepresentingindividualsandthoserepresentingclassesthe“subclass”relationfromthe“instance-of”relationsubclasssubclassinstanceinstanceRobinBirdAnimalRedRustyhasPartWinginstanceGenus24Linktypes25InferencebyInheritanceOneofthemainkindsofreasoningdoneinasemanticnetistheinheritanceofvaluesalongthesubclassandinstancelinks.Semanticnetworksdifferinhowtheyhandlethecaseofinheritingmultipledifferentvalues.Allpossiblevaluesareinherited,orOnlythe“lowest”valueorvaluesareinherited26Conflictinginheritedvalues27MultipleinheritanceAnodecanhaveanynumberofsuperclassesthatcontainit,enablinganodetoinheritpropertiesfrommultiple“parent”nodesandtheirancestorsinthenetwork.Theserulesareoftenusedtodetermineinheritanceinsuch“tangled”networkswheremultipleinheritanceisallowed:IfX<A<BandbothAandBhavepropertyP,thenXinheritsA’sproperty.IfX<AandX<BbutneitherA<BnorB<Z,andAandBhavepropertyPwithdifferentandinconsistentvalues,thenXdoesnotinheritpropertyPatall.28NixonDiamondThiswastheclassicexamplecirca1980.PersonRepublicanPersonQuakerinstanceinstancesubclasssubclassFALSEpacifistTRUEpacifist29FromSemanticNetstoFramesSemanticnetworksmorphedintoFrameRepresentationLanguagesinthe‘70sand‘80s.AframeisalotlikethenotionofanobjectinOOP,buthasmoremeta-data.Aframehasasetofslots.Aslotrepresentsarelationtoanotherframe(orvalue).Aslothasoneormorefacets.Afacetrepresentssomeaspectoftherelation.30FacetsAslotinaframeholdsmorethanavalue.Otherfacetsmightinclude:currentfillers(e.g.,values)defaultfillersminimumandmaximumnumberoffillerstyperestrictiononfillers(usuallyexpressedasanotherframeobject)attachedprocedures(if-needed,if-added,if-removed)saliencemeasureattachedconstraintsoraxiomsInsomesystems,theslotsthemselvesareinstancesofframes.3132DescriptionLogicsDescriptionlogicsprovideafamilyofframe-likeKRsystemswithaformalsemantics.E.g.,KL-ONE,LOOM,Classic,…Anadditionalkindofinferencedonebythesesystemsisautomaticclassificationfindingtherightplaceinahierarchyofobjectsforanewdescription

Currentsystemstakecaretokeepthelanguagessimple,sothatallinferencecanbedoneinpolynomialtime(inthenumberofobjects)ensuringtractabilityofinference33AbductionAbductionisareasoningprocessthattriestoformplausibleexplanationsforabnormalobservationsAbductionisdistinctlydifferentfromdeductionandinductionAbductionisinherentlyuncertainUncertaintyisanimportantissueinabductivereasoningSomemajorformalismsforrepresentingandreasoningaboutuncertaintyMycin’scertaintyfactors(anearlyrepresentative)Probabilitytheory(esp.Bayesianbeliefnetworks)Dempster-ShafertheoryFuzzylogicTruthmaintenancesystemsNonmonotonicreasoning34AbductionDefinition(Encyclopedia

Britannica):reasoningthatderivesanexplanatoryhypothesisfromagivensetoffactsTheinferenceresultisahypothesis

that,iftrue,couldexplaintheoccurrenceofthegivenfactsExamplesDendral,anexpertsystemtoconstruct3DstructureofchemicalcompoundsFact:massspectrometerdataofthecompoundanditschemicalformulaKB:chemistry,esp.strengthofdifferenttypesofboundsReasoning:formahypothetical3Dstructurethatsatisfiesthechemicalformula,andthatwouldmostlikelyproducethegivenmassspectrum35MedicaldiagnosisFacts:symptoms,labtestresults,andotherobservedfindings(calledmanifestations)KB:causalassociationsbetweendiseasesandmanifestationsReasoning:oneormorediseaseswhosepresencewouldcausallyexplaintheoccurrenceofthegivenmanifestationsManyotherreasoningprocesses(e.g.,wordsensedisambiguationinnaturallanguageprocess,imageunderstanding,criminalinvestigation)canalsobeenseenasabductivereasoningAbductionexamples(cont.)36Comparingabduction,deduction,

andinductionDeduction:majorpremise: Allballsintheboxareblackminorpremise: Theseballsarefromtheboxconclusion: TheseballsareblackAbduction:rule: Allballsintheboxareblackobservation: Theseballsareblackexplanation: TheseballsarefromtheboxInduction:case: Theseballsarefromtheboxobservation: Theseballsareblackhypothesizedrule: Allballintheboxareblack

A=>BA---------BA=>BB-------------PossiblyAWheneverAthenB-------------PossiblyA=>BDeduction

reasonsfromcausestoeffectsAbductionreasonsfromeffectstocausesInductionreasonsfromspecificcasestogeneralrules37Characteristicsofabductivereasoning“Conclusions”arehypotheses,nottheorems(maybefalseevenifrulesandfactsaretrue)E.g.,misdiagnosisinmedicineTheremaybemultipleplausiblehypothesesGivenrulesA=>BandC=>B,andfactB,bothAandCareplausiblehypothesesAbductionisinherentlyuncertainHypothesescanberankedbytheirplausibility(ifitcanbedetermined)38Characteristicsofabductivereasoning(cont.)Reasoningisoftenahypothesize-and-testcycle

Hypothesize:Postulatepossiblehypotheses,anyofwhichwouldexplainthegivenfacts(oratleastmostoftheimportantfacts)Test:TesttheplausibilityofallorsomeofthesehypothesesOnewaytotestahypothesisHistoaskwhethersomethingthatiscurrentlyunknown–butcanbepredictedfromH–isactuallytrueIfwealsoknowA=>DandC=>E,thenaskifDandEaretrueIfDistrueandEisfalse,thenhypothesisAbecomesmoreplausible(supportforAisincreased;supportforCisdecreased)39Characteristicsofabductivereasoning(cont.)Reasoningisnon-monotonic

Thatis,theplausibilityofhypothesescanincrease/decreaseasnewfactsarecollectedIncontrast,deductiveinferenceismonotonic:itneverchangeasentence’struthvalue,onceknownInabductive(andinductive)reasoning,somehypothesesmaybediscarded,andnewonesformed,whennewobservationsaremade40SourcesofuncertaintyUncertaininputsMissingdataNoisydataUncertainknowledgeMultiplecausesleadtomultipleeffectsIncompleteenumerationofconditionsoreffectsIncompleteknowledgeofcausalityinthedomainProbabilistic/stochasticeffectsUncertainoutputsAbductionandinductionareinherentlyuncertainDefaultreasoning,evenindeductivefashion,isuncertainIncompletedeductiveinferencemaybeuncertain

Probabilisticreasoningonlygivesprobabilisticresult

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论