Basic terminology
•Percept:Refer to the agent's perceptual inputs at any given instant.
•percept sequence:
–An agent's percept sequence is the complete history of everything the agent has
ever perceived.
–In general, an agent's choice of action at any given instant can depend on the entire
percept sequence observed to date.
•Agent Function:
–The agent function is mathematical concept that maps percept sequence to
actions(agent‟s behavior).
f : P* A
•Agent Program: The agent program is a concrete implementation of agent function
,running within some physical architecture to produce f.
512/2/2018 By: Tekendra Nath Yogi
What do you mean, sensors, percepts effectors and actions?
•ForHumans
–Sensors:
•Eyes(vision),ears(hearing),skin(touch),tongue(gestation),nose
(olfaction).
–Percepts:
•Atthelowestlevel–electricalsignalsfromthesesensors
•Afterpreprocessing–objectsinthevisualfield,auditorystreams.
–Effectors:
•limbs,digits,eyes,tongue,…..
–Actions:
•liftafinger,turnleft,walk,run,carryanobject,…
612/2/2018 By: Tekendra Nath Yogi
Agents and Environments
•Anagentisjustsomethingthatacts.
•Toactanagentperceivesitsenvironmentviasensorsandactsrationallyuponthat
environmentwithitseffectors(actuators).
•Thissimpleideaisillustratedinthefollowingfigure:
Fig: Agents interact with environments through sensors and actuators
Presented By: Tekendra Nath Yogi 7
Contd..
The vacuum-cleaner world: Example of Agent
•Toillustratetheintelligentagent,averysimpleexample-thevacuum-cleanerworld
isusedasshowninFigurebelow:
•Thisworldissosimplethatwecandescribe
everythingthathappens;it'salsoamade-up
world,sowecaninventmanyvariations.
•Thisparticularworldhasjusttwolocations:squaresAandB.
–I.e.Environment:squareAandB
•Thevacuumagentperceiveswhichsquareitisinandwhetherthereisdirtinthe
square.
–i.e.,Percepts:[locationandcontent] E.g.[A,Dirty]
•Itcanchoosetomoveleft,moveright,suckupthedirt,ordonothing.
–i.e.,Actions:left,right,suck,andno-op
Presented By: Tekendra Nath Yogi 10
Contd..
The vacuum-cleaner world: Example of Agent
•One very simple agent function is the following:
–if the current square is dirty, then suck, otherwise move to the other square.
•A partial tabulation of agent function is shown in Table below:
•A simple agent program for this agent function is given in the next
slide.
Presented By: Tekendra Nath Yogi 11
Contd..
The vacuum-cleaner world: Example of Agent
•FunctionVacuumAgent[location,Status]returnsanaction
–Ifstatus=DirtythenReturnsuck
–Elseiflocation=AthenReturnRight
–Elseiflocation=BthenreturnLeft
Presented By: Tekendra Nath Yogi 12
Good Behavior: The concept of rationality
•Arationalagentisonethatdoestherightthingi.e.,onethatbehavesas
wellaspossible.
•Rightthingistheonethatwillcausetheagenttobemostsuccessful.
–Forexample:Whenanagentisinanenvironment,itgeneratesasequenceof
actionsaccordingtotheperceptsitreceives.Thissequenceofactionscauses
theenvironmenttogothroughasequenceofstates.Ifthesequenceis
desirable,thentheagenthasperformedwell.
•Thisnotionofdesirabilityiscapturedbyaperformanceevaluation.
Presented By: Tekendra Nath Yogi 13
Contd.. Performance Measures
•Evaluates any given sequence of environment states and determine the success of
the agent.
•But, It is not easy task to choose the performance measure of an agent. Because the
performance measure doesn‟t depends on the task and agent but it depends on the
circumstances.
•Therefore, It is better to design Performance measure according to what is wanted in
the environment instead of how the agents should behave.
–E.g., The possible performance measure of a vacuum-cleaner agent could be amount of
dirt cleaned up, amount of time taken, amount of electricity consumed, amount of noise
generated, etc.
–But if the performance measure for automated vacuum cleaner is ―The amount of dirt
cleaned within a certain time. Then a rational agent can maximize this performance by
cleaning up the dirt , then dumping it all on the floor, then cleaning it up again , and so
on.
–So, “How clean the floor is” is better choice for performance measure of vacuum cleaner.
Presented By: Tekendra Nath Yogi
14
Environments
•The first step to design a rational agent is the specification of its task
environment.
•Task environments are essentially the „problems‟ to which rational agents are
the „solutions‟.
•Generally task environments are specified by using the following four
parameter
–Performance
–Environment
–Actuators
–Sensors
•Therefore, task environment is also called PEAS description of the
environment.
Presented By: Tekendra Nath Yogi 17
Contd…
•Example:PEASdescriptionofthetaskenvironmentforanFullyautomatedtaxi
–Performance: The following can be the possible measures for the performance of
automated taxi:
•Getting to the correct destination(destination).
•Minimizing the fuel consumption and wear and tear(damage that naturally occurs
as a result of aging), and Minimizing the trip time or cost( Profit)
•Minimizing the violations of traffic laws and disturbances to other
drivers(legality)
•Maximizing the safety and passenger comfort ( Safety and comfort)
–Environment:This is the driving environment that the taxi will face
•Streets/freeways, other traffic, pedestrians, weather(rain , snow,..etc), police cars,
etc.
1812/2/2018 By: Tekendra Nath Yogi
The structure of the agents
•Agent‟s structure can be viewed as:
–Agent = Architecture + Agent Program
•Architecture = the machinery that an agent executes on.
•Agent Program = an implementation of an agent function.
Presented By: Tekendra Nath Yogi 28
Contd…
•ModelBasedReflexagent:
•Maintainainternalstatetokeeptrackofpartofworlditcannotsee
now.
•Internalstateisbasedonpercepthistoryandkeepstwokindsof
knowledge:
•how the world evolves independently of the agent
•How the agent's own actions affect the world
•Thenitcombinescurrentperceptwiththeoldinternalstatetogenerate
theupdateddescriptionofthecurrentstate.
•Itthenchoosesanactioninthesamewayasreflexagent.
3312/2/2018 By: Tekendra Nath Yogi