56
LECTURE 2: INTELLIGENT AGENTS An Introduction to Multiagent Systems http://www.csc.liv.ac.uk/˜mjw/pubs/imas/

GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

LECTURE2:INTELLIGENTAGENTS

AnIntroductiontoMultiagentSystems

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/

Page 2: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

1WhatisanAgent?

�Themainpointaboutagentsistheyareautonomous:capableofactingindependently,exhibitingcontrolovertheirinternalstate.

�Thus:anagentisacomputersystemcapableofautonomousactioninsomeenvironment.

ENVIRONMENT

SYSTEM

output input

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/1

Page 3: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Trivial(non-interesting)agents:

–thermostat;

–UNIXdaemon(e.g.,biff).

�Anintelligentagentisacomputersystemcapableofflexibleautonomousactioninsomeenvironment.

Byflexible,wemean:

–reactive;

–pro-active;

–social.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/2

Page 4: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

1.1Reactivity

�Ifaprogram’senvironmentisguaranteedtobefixed,theprogramneedneverworryaboutitsownsuccessorfailure—programjustexecutesblindly.

Exampleoffixedenvironment:compiler.

�Therealworldisnotlikethat:thingschange,informationisincomplete.Many(most?)interestingenvironmentsaredynamic.

�Softwareishardtobuildfordynamicdomains:programmusttakeintoaccountpossibilityoffailure—askitselfwhetheritisworthexecuting!

�Areactivesystemisonethatmaintainsanongoinginteractionwithitsenvironment,andrespondstochangesthatoccurinit(intimefortheresponsetobeuseful).

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/3

Page 5: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

1.2Proactiveness

�Reactingtoanenvironmentiseasy(e.g.,stimulus�responserules).

�Butwegenerallywantagentstodothingsforus.

�Hencegoaldirectedbehaviour.

�Pro-activeness=generatingandattemptingtoachievegoals;notdrivensolelybyevents;takingtheinitiative.

�Recognisingopportunities.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/4

Page 6: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

1.3SocialAbility

�Therealworldisamulti-agentenvironment:wecannotgoaroundattemptingtoachievegoalswithouttakingothersintoaccount.

�Somegoalscanonlybeachievedwiththecooperationofothers.

�Similarlyformanycomputerenvironments:witnesstheINTERNET.

�Socialabilityinagentsistheabilitytointeractwithotheragents(andpossiblyhumans)viasomekindofagent-communicationlanguage,andperhapscooperatewithothers.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/5

Page 7: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

2OtherProperties

�Otherproperties,sometimesdiscussedinthecontextofagency:

–mobility:theabilityofanagenttomovearoundanelectronicnetwork;

–veracity:anagentwillnotknowinglycommunicatefalseinformation;

–benevolence:agentsdonothaveconflictinggoals,andthateveryagentwillthereforealwaystrytodowhatisaskedofit;

–rationality:agentwillactinordertoachieveitsgoals,andwillnotactinsuchawayastopreventitsgoalsbeingachieved—atleastinsofarasitsbeliefspermit;

–learning/adaption:agentsimproveperformanceovertime.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/6

Page 8: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

2.1AgentsandObjects

�Areagentsjustobjectsbyanothername?

�Object:

–encapsulatessomestate;

–communicatesviamessagepassing;

–hasmethods,correspondingtooperationsthatmaybeperformedonthisstate.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/7

Page 9: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Maindifferences:

–agentsareautonomous:agentsembodystrongernotionofautonomythanobjects,andinparticular,theydecideforthemselveswhetherornottoperformanactiononrequestfromanotheragent;

–agentsaresmart:capableofflexible(reactive,pro-active,social)behavior,andthestandardobjectmodelhasnothingtosayaboutsuchtypesofbehavior;

–agentsareactive:amulti-agentsystemisinherentlymulti-threaded,inthateachagentisassumedtohaveatleastonethreadofactivecontrol.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/8

Page 10: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Objectsdoitforfree...

�agentsdoitbecausetheywantto;

�agentsdoitformoney.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/9

Page 11: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

2.2AgentsandExpertSystems

�Aren’tagentsjustexpertsystemsbyanothername?

�Expertsystemstypicallydisembodied‘expertise’aboutsome(abstract)domainofdiscourse(e.g.,blooddiseases).

�Example:MYCINknowsaboutblooddiseasesinhumans.

Ithasawealthofknowledgeaboutblooddiseases,intheformofrules.

AdoctorcanobtainexpertadviceaboutblooddiseasesbygivingMYCINfacts,answeringquestions,andposingqueries.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/10

Page 12: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Maindifferences:

–agentssituatedinanenvironment:MYCINisnotawareoftheworld—onlyinformationobtainedisbyaskingtheuserquestions.

–agentsact:MYCINdoesnotoperateonpatients.

�Somereal-time(typicallyprocesscontrol)expertsystemsareagents.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/11

Page 13: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

2.3IntelligentAgentsandAI

�Aren’tagentsjusttheAIproject?

Isn’tbuildinganagentwhatAIisallabout?

�AIaimstobuildsystemsthatcan(ultimately)understandnaturallanguage,recogniseandunderstandscenes,usecommonsense,thinkcreatively,etc—allofwhichareveryhard.

�So,don’tweneedtosolveallofAItobuildanagent...?

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/12

Page 14: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Whenbuildinganagent,wesimplywantasystemthatcanchoosetherightactiontoperform,typicallyinalimiteddomain.

�WedonothavetosolvealltheproblemsofAItobuildausefulagent:

alittleintelligencegoesalongway!

�OrenEtzioni,speakingaboutthecommercialexperienceofNETBOT,Inc:

Wemadeouragentsdumberanddumberanddumber...untilfinallytheymademoney.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/13

Page 15: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

3Environments

�Accessiblevsinaccessible.

Anaccessibleenvironmentisoneinwhichtheagentcanobtaincomplete,accurate,up-to-dateinformationabouttheenvironment’sstate.

Mostmoderatelycomplexenvironments(including,forexample,theeverydayphysicalworldandtheInternet)areinaccessible.

Themoreaccessibleanenvironmentis,thesimpleritistobuildagentstooperateinit.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/14

Page 16: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Deterministicvsnon-deterministic.

Aswehavealreadymentioned,adeterministicenvironmentisoneinwhichanyactionhasasingleguaranteedeffect—thereisnouncertaintyaboutthestatethatwillresultfromperforminganaction.

Thephysicalworldcantoallintentsandpurposesberegardedasnon-deterministic.

Non-deterministicenvironmentspresentgreaterproblemsfortheagentdesigner.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/15

Page 17: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Episodicvsnon-episodic.

Inanepisodicenvironment,theperformanceofanagentisdependentonanumberofdiscreteepisodes,withnolinkbetweentheperformanceofanagentindifferentscenarios.

Episodicenvironmentsaresimplerfromtheagentdeveloper’sperspectivebecausetheagentcandecidewhatactiontoperformbasedonlyonthecurrentepisode—itneednotreasonabouttheinteractionsbetweenthisandfutureepisodes.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/16

Page 18: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Staticvsdynamic.

Astaticenvironmentisonethatcanbeassumedtoremainunchangedexceptbytheperformanceofactionsbytheagent.

Adynamicenvironmentisonethathasotherprocessesoperatingonit,andwhichhencechangesinwaysbeyondtheagent’scontrol.

Thephysicalworldisahighlydynamicenvironment.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/17

Page 19: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Discretevscontinuous.

Anenvironmentisdiscreteifthereareafixed,finitenumberofactionsandperceptsinit.RussellandNorviggiveachessgameasanexampleofadiscreteenvironment,andtaxidrivingasanexampleofacontinuousone.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/18

Page 20: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

4AgentsasIntentionalSystems

�Whenexplaininghumanactivity,itisoftenusefultomakestatementssuchasthefollowing:

Janinetookherumbrellabecauseshebelieveditwasgoingtorain.

MichaelworkedhardbecausehewantedtopossessaPhD.

�Thesestatementsmakeuseofafolkpsychology,bywhichhumanbehaviourispredictedandexplainedthroughtheattributionofattitudes,suchasbelievingandwanting(asintheaboveexamples),hoping,fearing,andsoon.

�Theattitudesemployedinsuchfolkpsychologicaldescriptionsarecalledtheintentionalnotions.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/19

Page 21: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�ThephilosopherDanielDennettcoinedthetermintentionalsystemtodescribeentities‘whosebehaviourcanbepredictedbythemethodofattributingbelief,desiresandrationalacumen’.

�Dennettidentifiesdifferent‘grades’ofintentionalsystem:

‘Afirst-orderintentionalsystemhasbeliefsanddesires(etc.)butnobeliefsanddesiresaboutbeliefsanddesires....Asecond-orderintentionalsystemismoresophisticated;ithasbeliefsanddesires(andnodoubtotherintentionalstates)aboutbeliefsanddesires(andotherintentionalstates)—boththoseofothersanditsown’.

�Isitlegitimateorusefultoattributebeliefs,desires,andsoon,tocomputersystems?

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/20

Page 22: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�McCarthyarguedthatthereareoccasionswhentheintentionalstanceisappropriate:

‘Toascribebeliefs,freewill,intentions,consciousness,abilities,orwantstoa

machineislegitimatewhensuchanascriptionexpressesthesameinformationaboutthemachinethatitexpressesaboutaperson.Itisusefulwhenthe

ascriptionhelpsusunderstandthestructureofthemachine,itspastorfuture

behaviour,orhowtorepairorimproveit.Itisperhapsneverlogicallyrequiredevenforhumans,butexpressingreasonablybrieflywhatisactuallyknownabout

thestateofthemachineinaparticularsituationmayrequirementalqualitiesorqualitiesisomorphictothem.Theoriesofbelief,knowledgeandwantingcanbe

constructedformachinesinasimplersettingthanforhumans,andlaterappliedtohumans.Ascriptionofmentalqualitiesismoststraightforwardformachinesof

knownstructuresuchasthermostatsandcomputeroperatingsystems,butismostusefulwhenappliedtoentitieswhosestructureisincompletelyknown’.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/21

Page 23: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Whatobjectscanbedescribedbytheintentionalstance?

�Asitturnsout,moreorlessanythingcan...consideralightswitch:

‘Itisperfectlycoherenttotreatalightswitchasa(verycooperative)agentwiththecapabilityoftransmittingcurrentatwill,whoinvariablytransmitscurrentwhenitbelievesthatwewantittransmittedandnototherwise;flickingtheswitchissimplyourwayofcommunicatingourdesires’.(YoavShoham)

�Butmostadultswouldfindsuchadescriptionabsurd!

Whyisthis?

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/22

Page 24: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Theanswerseemstobethatwhiletheintentionalstancedescriptionisconsistent,

...itdoesnotbuyusanything,sinceweessentiallyunderstandthemechanismsufficientlytohaveasimpler,mechanisticdescriptionofitsbehaviour.(YoavShoham)

�Putcrudely,themoreweknowaboutasystem,thelessweneedtorelyonanimistic,intentionalexplanationsofitsbehaviour.

�Butwithverycomplexsystems,amechanistic,explanationofitsbehaviourmaynotbepracticable.

�Ascomputersystemsbecomeevermorecomplex,weneedmorepowerfulabstractionsandmetaphorstoexplaintheiroperation—lowlevelexplanationsbecomeimpractical.

Theintentionalstanceissuchanabstraction.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/23

Page 25: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Theintentionalnotionsarethusabstractiontools,whichprovideuswithaconvenientandfamiliarwayofdescribing,explaining,andpredictingthebehaviourofcomplexsystems.

�Remember:mostimportantdevelopmentsincomputingarebasedonnewabstractions:

–proceduralabstraction;

–abstractdatatypes;

–objects.

Agents,andagentsasintentionalsystems,representafurther,andincreasinglypowerfulabstraction.

�Soagenttheoristsstartfromthe(strong)viewofagentsasintentionalsystems:onewhosesimplestconsistentdescriptionrequirestheintentionalstance.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/24

Page 26: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Thisintentionalstanceisanabstractiontool—aconvenientwayoftalkingaboutcomplexsystems,whichallowsustopredictandexplaintheirbehaviourwithouthavingtounderstandhowthemechanismactuallyworks.

�Now,muchofcomputerscienceisconcernedwithlookingforabstractionmechanisms(witnessproceduralabstraction,ADTs,objects,...)

Sowhynotusetheintentionalstanceasanabstractiontoolincomputing—toexplain,understand,and,crucially,programcomputersystems?

�Thisisanimportantargumentinfavourofagents.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/25

Page 27: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Other3pointsinfavourofthisidea:

CharacterisingAgents

�Itprovidesuswithafamiliar,non-technicalwayofunderstanding&explaingagents.

NestedRepresentations

�Itgivesusthepotentialtospecifysystemsthatincluderepresentationsofothersystems.

Itiswidelyacceptedthatsuchnestedrepresentationsareessentialforagentsthatmustcooperatewithotheragents.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/26

Page 28: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Post-DeclarativeSystems

�Thisviewofagentsleadstoakindofpost-declarativeprogramming:

–inproceduralprogramming,wesayexactlywhatasystemshoulddo;

–indeclarativeprogramming,westatesomethingthatwewanttoachieve,givethesystemgeneralinfoabouttherelationshipsbetweenobjects,andletabuilt-incontrolmechanism(e.g.,goal-directedtheoremproving)figureoutwhattodo;

–withagents,wegiveaveryabstractspecificationofthesystem,andletthecontrolmechanismfigureoutwhattodo,knowingthatitwillactinaccordancewithsomebuilt-intheoryofagency(e.g.,thewell-knownCohen-Levesquemodelofintention).

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/27

Page 29: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Anaside...

�Wefindthatresearchersfromamoremainstreamcomputingdisciplinehaveadoptedasimilarsetofideas...

�Indistributedsystemstheory,logicsofknowledgeareusedinthedevelopmentofknowledgebasedprotocols.

�Therationaleisthatwhenconstructingprotocols,oneoftenencountersreasoningsuchasthefollowing:

IFprocessiknowsprocessjhasreceivedmessagem�

THENprocessishouldsendprocessjthemessagem�.

�InDStheory,knowledgeisgrounded—givenapreciseinterpretationintermsofthestatesofaprocess;returntothislater...we’llexaminethispointindetaillater.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/28

Page 30: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

5AbstractArchitecturesforAgents

�AssumetheenvironmentmaybeinanyofafinitesetEofdiscrete,instantaneousstates:

E��e�e��������

�Agentsareassumedtohavearepertoireofpossibleactionsavailabletothem,whichtransformthestateoftheenvironment.

Ac����� �������

�Arun,r,ofanagentinanenvironmentisasequenceofinterleavedenvironmentstatesandactions:

re�� �e�

�� �e�

�� �e��� �����u�� �eu

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/29

Page 31: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Let:

–�bethesetofallsuchpossiblefinitesequences(overEandAc);

–�

Acbethesubsetofthesethatendwithanaction;and

–�

Ebethesubsetofthesethatendwithanenvironmentstate.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/30

Page 32: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

StateTransformerFunctions

�Astatetransformerfunctionrepresentsbehaviouroftheenvironment:

��

Ac

���E�

�Notethatenvironmentsare...

–historydependent.

–non-deterministic.

�If��r���,thentherearenopossiblesuccessorstatestor.Inthiscase,wesaythatthesystemhasendeditsrun.

�Formally,wesayanenvironmentEnvisatripleEnv��E�e���

where:Eisasetofenvironmentstates,e�Eistheinitialstate;and�isastatetransformerfunction.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/31

Page 33: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Agents

�Agentisafunctionwhichmapsrunstoactions:

Ag�

E�Ac

Anagentmakesadecisionaboutwhatactiontoperformbasedonthehistoryofthesystemthatithaswitnessedtodate.Let��

bethesetofallagents.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/32

Page 34: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Systems

�Asystemisapaircontaininganagentandanenvironment.

�Anysystemwillhaveassociatedwithitasetofpossibleruns;wedenotethesetofrunsofagentAginenvironmentEnvby

��Ag�Env�.

�(Weassume��Ag�Env�containsonlyterminatedruns.)

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/33

Page 35: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Formally,asequence

�e� ��e�� ���e�������

representsarunofanagentAginenvironmentEnv��E�e���if:

1.eistheinitialstateofEnv

2.��Ag�e�;and

3.foru��,

eu����e� ������ �u����where

�u�Ag��e� �������eu��

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/34

Page 36: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

6PurelyReactiveAgents

�Someagentsdecidewhattodowithoutreferencetotheirhistory—theybasetheirdecisionmakingentirelyonthepresent,withnoreferenceatalltothepast.

�Wecallsuchagentspurelyreactive:

actionE�Ac

�Athermostatisapurelyreactiveagent.

action�e���

��

��

��

offife=temperatureOKonotherwise.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/35

Page 37: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

7Perception

�Nowintroduceperceptionsystem:

ENVIRONMENT

action

AGENT

see

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/36

Page 38: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Theseefunctionistheagent’sabilitytoobserveitsenvironment,whereastheactionfunctionrepresentstheagent’sdecisionmakingprocess.

�Outputoftheseefunctionisapercept:

seeE�Per

whichmapsenvironmentstatestopercepts,andactionisnowafunction

actionPer

�A

whichmapssequencesofperceptstoactions.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/37

Page 39: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

8AgentswithState

�Wenowconsideragentsthatmaintainstate:

action see

nextstate

AGENT

ENVIRONMENT

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/38

Page 40: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Theseagentshavesomeinternaldatastructure,whichistypicallyusedtorecordinformationabouttheenvironmentstateandhistory.LetIbethesetofallinternalstatesoftheagent.

�Theperceptionfunctionseeforastate-basedagentisunchanged:

seeE�Per

Theaction-selectionfunctionactionisnowdefinedasamapping

actionI�Ac

frominternalstatestoactions.Anadditionalfunctionnextisintroduced,whichmapsaninternalstateandpercepttoaninternalstate:

nextI�Per�I

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/39

Page 41: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

8.1Agentcontrolloop

1.Agentstartsinsomeinitialinternalstatei.

2.Observesitsenvironmentstatee,andgeneratesaperceptsee�e�.

3.Internalstateoftheagentisthenupdatedvianextfunction,becomingnext�i�see�e��.

4.Theactionselectedbytheagentisaction�next�i�see�e���.

Thisactionisthenperformed.

5.Goto(2).

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/40

Page 42: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9TasksforAgents

�Webuildagentsinordertocarryouttasksforus.

�Thetaskmustbespecifiedbyus...

�Butwewanttotellagentswhattodowithouttellingthemhowtodoit.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/41

Page 43: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.1UtilitiesFunctionsoverStates

�Onepossibility:associateutilitieswithindividualstates—thetaskoftheagentisthentobringaboutstatesthatmaximiseutility.

�Ataskspecificationisafunction

uE�IR

whichassociatedarealnumberwitheveryenvironmentstate.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/42

Page 44: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Butwhatisthevalueofarun...

–minimumutilityofstateonrun?

–maximumutilityofstateonrun?

–sumofutilitiesofstatesonrun?

–average?

�Disadvantage:difficulttospecifyalongtermviewwhenassigningutilitiestoindividualstates.

(Onepossibility:adiscountforstateslateron.)

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/43

Page 45: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.2UtilitiesoverRuns

�Anotherpossibility:assignsautilitynottoindividualstates,buttorunsthemselves:

u��IR

�Suchanapproachtakesaninherentlylongtermview.

�Othervariations:incorporateprobabilitiesofdifferentstatesemerging.

�Difficultieswithutility-basedapproaches:

–wheredothenumberscomefrom?

–wedon’tthinkintermsofutilities!

–hardtoformulatetasksintheseterms.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/44

Page 46: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

UtilityintheTileworld

�Simulatedtwodimensionalgridenvironmentonwhichthereareagents,tiles,obstacles,andholes.

�Anagentcanmoveinfourdirections,up,down,left,orright,andifitislocatednexttoatile,itcanpushit.

�Holeshavetobefilledupwithtilesbytheagent.Anagentscorespointsbyfillingholeswithtiles,withtheaimbeingtofillasmanyholesaspossible.

�TILEWORLDchangeswiththerandomappearanceanddisappearanceofholes.

�Utilityfunctiondefinedasfollows:

u�r�

��numberofholesfilledinr

numberofholesthatappearedinr

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/45

Page 47: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.3ExpectedUtility&OptimalAgents

�WriteP�r�Ag�Env�todenoteprobabilitythatrunroccurswhenagentAgisplacedinenvironmentEnv.

Note:�

r���Ag�Env�P�r�Ag�Env����

�ThenoptimalagentAgoptinanenvironmentEnvistheonethatmaximizesexpectedutility:

Agopt����� Ag� ��

r���Ag�Env�

u�r�P�r�Ag�Env� �(1)

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/46

Page 48: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.4BoundedOptimalAgents

�Someagentscannotbeimplementedonsomecomputers

(AfunctionAg�E�Acmayneedmorethanavailablememory

toimplement.)

�Write��mtodenotetheagentsthatcanbeimplementedonmachine(computer)m:

��m��Ag�Ag���andAgcanbeimplementedonm��

�Wecanreplaceequation(1)withthefollowing,whichdefinestheboundedoptimalagentAgopt:

Agopt����� Ag� �m�

r���Ag�Env�

u�r�P�r�Ag�Env� �(2)

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/47

Page 49: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.5PredicateTaskSpecifications

�Aspecialcaseofassigningutilitiestohistoriesistoassign0(false)or1(true)toarun.

�Ifarunisassigned1,thentheagentsucceedsonthatrun,otherwiseitfails.

�Callthesepredicatetaskspecifications.

�Denotepredicatetaskspecificationby�.

Thus��������.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/48

Page 50: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

9.6TaskEnvironments

�Ataskenvironmentisapair�Env���,whereEnvisanenvironment,and

��������

isapredicateoverruns.

Let��bethesetofalltaskenvironments.

�Ataskenvironmentspecifies:

–thepropertiesofthesystemtheagentwillinhabit;

–thecriteriabywhichanagentwillbejudgedtohaveeitherfailedorsucceeded.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/49

Page 51: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Write���Ag�Env�todenotesetofallrunsoftheagentAginenvironmentEnvthatsatisfy�:

���Ag�Env���r�r���Ag�Env�and��r�����

�WethensaythatanagentAgsucceedsintaskenvironment

�Env���if

���Ag�Env����Ag�Env�

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/50

Page 52: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

TheProbabilityofSuccess

�LetP�r�Ag�Env�denoteprobabilitythatrunroccursifagentAgisplacedinenvironmentEnv.

�ThentheprobabilityP���Ag�Env�that�issatisfiedbyAginEnvwouldthensimplybe:

P���Ag�Env���

r����Ag�Env�P�r�Ag�Env�

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/51

Page 53: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

Achievement&MaintenanceTasks

�Twomostcommontypesoftasksareachievementtasksandmaintenancetasks:

1.AchievementtasksArethoseoftheform“achievestateofaffairs�”.

2.MaintenancetasksArethoseoftheform“maintainstateofaffairs�”.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/52

Page 54: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�AnachievementtaskisspecifiedbyasetGof“good”or“goal”states:G�E.

Theagentsucceedsifitisguaranteedtobringaboutatleastoneofthesestates(wedonotcarewhichone—theyareallconsideredequallygood).

�AmaintenancegoalisspecifiedbyasetBof“bad”states:B�E.

TheagentsucceedsinaparticularenvironmentifitmanagestoavoidallstatesinB—ifitneverperformsactionswhichresultinanystateinBoccurring.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/53

Page 55: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

10AgentSynthesis

�Agentsynthesisisautomaticprogramming:goalistohaveaprogramthatwilltakeataskenvironment,andfromthistaskenvironmentautomaticallygenerateanagentthatsucceedsinthisenvironment:

syn� ����������� �

(Thinkof�asbeinglikenullinJAVA.

�Synthesisalgorithmis:

–soundif,wheneveritreturnsanagent,thenthisagentsucceedsinthetaskenvironmentthatispassedasinput;and

–completeifitisguaranteedtoreturnanagentwheneverthereexistsanagentthatwillsucceedinthetaskenvironmentgivenasinput.

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/54

Page 56: GENTS A INTELLIGENT 2: LECTUREparsons/courses/840-fall-2003/notes/le… · 1.1 Reactivity If a prog r am’ s en vironment is guar anteed to be fix ed, the prog r am need ne v er

Lecture2AnIntroductiontoMultiagentSystems

�Synthesisalgorithmsynissoundifitsatisfiesthefollowingcondition:

syn��Env�����Agimplies��Ag�Env�����Ag�Env� �

andcompleteif:

�Ag���s.t.��Ag�Env�����Ag�Env�impliessyn��Env����� ���

http://www.csc.liv.ac.uk/˜mjw/pubs/imas/55