Example: air traffic controller

7 LOGICAL AGENTS

7 LOGICALAGENTSI nwhich wedesignagentsthatcanformrepresentations oftheworld,usea pro-cessof inferenceto derivenew representationsabouttheworld, therepre-sentationofknowledgeandthereaso ningprocessesthatbringknowledgeto life ,it seems, enablesuccessfulbehaviorsthatwouldbevery hardto achieve have seenthatknowledgeofactionoutcomesenables problem-solvingagentstoperformwellincomp lex reflex ,however, ,butdoesnotknowinany usefulsensethatnopiececanbeontwo , ,thisprocesscanbequitefarremovedfromthen eedsofthemoment aswhena mathematicianprovesa theoremoranastronomercalculatestheearth s ,aphysiciandiagnosesa patient thatis,infersa diseasestatethatis notdirectlyobservable priortochoosinga ,andsomeis itsinsidethephysician s head,it ,namely, theinten-tionofthespeaker.

all the basic concepts of logic. There is also a well-developed technology for reasoning in propositional logic, which we describe in sections 7.5 and 7.6. Finally, Section 7.7 combines the concept of logical agents with the technology of propositional logic to build some simple agents for the wumpus world.

Tags:

  Reasoning, Logical

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of 7 LOGICAL AGENTS

1 7 LOGICALAGENTSI nwhich wedesignagentsthatcanformrepresentations oftheworld,usea pro-cessof inferenceto derivenew representationsabouttheworld, therepre-sentationofknowledgeandthereaso ningprocessesthatbringknowledgeto life ,it seems, enablesuccessfulbehaviorsthatwouldbevery hardto achieve have seenthatknowledgeofactionoutcomesenables problem-solvingagentstoperformwellincomp lex reflex ,however, ,butdoesnotknowinany usefulsensethatnopiececanbeontwo , ,thisprocesscanbequitefarremovedfromthen eedsofthemoment aswhena mathematicianprovesa theoremoranastronomercalculatestheearth s ,aphysiciandiagnosesa patient thatis,infersa diseasestatethatis notdirectlyobservable priortochoosinga ,andsomeis itsinsidethephysician s head,it ,namely, theinten-tionofthespeaker.

2 Whenwehear, Johnsaw thediamondthroughthewindow andcovetedit, weknow it referstothediamondandnotthewindow wereason,perhapsuncon-sciously, withourknowledgeofrelative , whenwehear, Johnthrewthebrickthroughthewindow andbroke it, weknow it refersto thewindow. difficultywiththiskindofambiguitybecause theirrepresentationofcontingency problemsis theirflexibility. They areabletoacceptnewtasksintheformofexplic itlydescribedgoals,they canachieve competencequicklybybeingtoldorlearningne w knowledgeabouttheenvironment,andthey simplenewenvironment,thewumpusworld,andi llustratestheoperationofa knowledge-basedagentwithoutgoingintoany , ,weexplainthegeneralprinciplesoflogic.

3 Alwaysdefinite eachpropositioniseithertrueorfalseinthew orld, representationforknowledge-basedagents, , a largeportionofthereasoningcarriedoutbyhu mansandotheragentsinpartiallyobservablee nvironmentsde-pendsonhandlingknowledgeth atisuncertain. Logiccannotrepresentthisuncertaintywell, soinPartVwecoverprobability, repre-sentations,includingsomebasedoncon tinuousmathematicssuchasmixturesofGaussi ans,neuralnetworks, simplelogiccalledpropositionallogic. Whilemuchlessexpressive thanfirst-orderlogic(Chapter8),propositi onallogicservesto alsoa well-developedtechnologyforreasoninginpr opositionallogic, , , knowledge-basedagentis itsknowledgebase, ,KNOWLEDGEBASEa knowledgebaseis a setofsentences.

4 (Here sentence is usedasa isSENTENCE relatedbut is notidenticalto thesentencesofEnglishandothernaturallang uages.)Eachsen-tenceis expressedin a waytoaddnewsentencestotheknowledgebasean da waytoquerywhatis , respectively. Bothtasksmayinvolveinference thatis, ,INFERENCELOGICALAGENTS whicharethemainsubjectofstudyinthischapt er, inferencemustobey thefundamentalrequirementthatwhenoneASKs a questionoftheknowledgebase,theanswershou ldfollowfromwhathasbeentold(orrather, TELLed)totheknowledgebasepreviously. (percept)returnsanactionstatic:KB, a knowledgebaset, a counter, initially0, indicatingtimeTELL(KB, MAKE-PERCEPT-SENTENCE(percept,t))action ASK(KB, MAKE-ACTION-QUERY(t))TELL(KB, MAKE-ACTION-SENTENCE(action,t))t t+ 1returnactionFigure , wewillbemorepreciseaboutthecrucialword follow.

5 Fornow, take it tomeanthattheinferenceprocessshouldnotju stmake thingsupasit allouragents,it takesa knowledgebase,KB,whichmayinitiallycontai nsomebackgroundknowledge. EachtimetheagentprogramisBACKGROUNDKNOWL EDGE called,it doestwo ,it TELLs theknowledgebasewhatit ,it ASKs theknowledgebasewhatactionit , extensive reasoningmaybedoneaboutthecurrentstateof theworld,abouttheoutcomesofpossibleactio nsequences, , necessarytolettheknowledgebaseknow perceptanda timeandreturnsa timeasinputandreturnsa , however, theknowledge-basedagentis is amenabletoa descriptionat theknowledgelevel, whereweneedspecifyonlywhattheagentknowsa ndwhatitsgoalsare,KNOWLEDGELEVEL inordertofixitsbehavior.

6 Forexample,anautomatedtaximighthave thegoalofdeliveringa passengertoMarinCountyandmightknow thatit is inSanFranciscoandthattheGoldenGateBridge is theonlylinkbetweenthetwo tocrosstheGoldenGateBridgebecauseit knowsthatthatwillachieveitsgoal. Noticethatthisanalysisis independentofhow thetaxiworksat theimplementationlevel. It doesn t matterwhetherIMPLEMENTATIONLEVEL itsgeographicalknowledgeis implementedaslinkedlistsorpixel maps,orwhetherit ,onecanbuilda knowledge-basedagentsimplybyTELL ingit whatit s initialprogram,beforeit startstoreceive percepts,isbuiltbyaddingonebyonethesente ncesthatrepresentthedesigner s iteasytoexpressthisknowledgeintheformofs entencessimplifiestheconstructionproblem enormously.

7 ,theDECLARATIVE proceduralapproachencodesdesiredbehavior sdirectlyasprogramcode;minimizingtherole ofexplicitrepresentationandreasoningcanr esultina , nowunderstandthata successfulagentmustcombinebothdeclarativ e whatit needstoknow, wecanprovidea knowledge-basedagentwithmechanismsthatal lowit ,whicharedis-cussedinChapter18,creategen eralknowledgeabouttheenvironmentoutofa s , representation, reasoning ,andlearning , however, wewillcreatea a cave is thewumpus,a ,buttheagenthasonlyonearrow. Someroomscontainbottomlesspitsthatwilltr apanyonewhowandersintotheserooms(exceptf orthewumpus,whichistoobigtofallin).

8 Theonlymitigatingfeatureoflivinginthisen vironmentis thepossibilityoffindinga rathertamebymoderncomputergamestandards, it given,assuggestedinChapter2, bythePEAS description:}Performancemeasure: +1000forpickingupthegold, 1000forfallingintoa pitorbeingeatenbythewumpus, 1foreachactiontakenand 10forusingupthearrow.}Environment: A4 [1,1], , witha uniformdistribution, ,eachsquareotherthanthestartcanbea pit, }Actuators: Theagentcanmove forward,turnleftby90 , orturnrightby90 . Theagentdiesa miserabledeathif it entersa squarecontaininga pitora live wumpus.(Itis safe,albeitsmelly, toentera squarewitha deadwumpus.)

9 Thereis a ina straightlineinthedirectiontheagentis continuesuntiliteitherhits(andhencekills )thewumpusorhitsa ,soonlythefirstShootactionhasany effect.}Sensors: Theagenthasfive sensors,eachofwhichgivesa singlebitofinformation: Inthesquarecontainingthewumpusandinthedi rectly(notdiagonally)adjacentsquaresthea gentwillperceive a stench. Inthesquaresdirectlyadjacenttoa pit,theagentwillperceive a breeze. Inthesquarewherethegoldis,theagentwillpe rceive a glitter. Whenanagentwalksintoa wall,it willperceive a bump. Whenthewumpusis killed,it emitsa theagentin theformofa listoffive symbols;forexample,if thereis a stenchanda breeze,butnoglitter, bump,orscream,theagentwillreceivetheperc ept[Stench;Breeze;None;None;None].

10 Itsinitialignoranceoftheconfigurationoft heenvironment; ,it is possiblefortheagenttoretrieve thegoldsafely. Occa-sionally, , becausethegoldis ina s initialknowledgebasecontainstherulesofth eenvironment,aslistedPIT12341234 STARTS tenchStenchBreezeGoldPITPITB reezeBreezeBreezeBreezeBreezeStenchFigur e ;inparticular, it knowsthatit is in[1,1]andthat[1,1]is a willseehow itsknowledgeevolvesasnew perceptsarrive [None;None;None;None;None], (a)showstheagent s list(someof)thesentencesintheknowledgeba seusingletterssuchasB(breezy)andOK(safe, neitherpitnorwumpus) ,ontheotherhand, = Agent = Breeze = Glitter, Gold = Pit = Stench = WumpusOK = Safe squareV = VisitedAOK 1,1 2,1 3,1 4,1 1,2 2,2 3,2 4,2 1,3 2,3 3,3 4,3 1,4 2,4 3,4 4,4 OKOKBP?


Related search queries