lec 02 intelligent agents

Upload: mohsiniqbal88816

Post on 05-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Lec 02 Intelligent Agents

    1/33

    1

    Intelligent Agents

    What is an Agent?

    The Concept of Rationality

    The Nature of Environments

    The Structure of Agents

  • 7/31/2019 Lec 02 Intelligent Agents

    2/33

    2

    What agents are ?

  • 7/31/2019 Lec 02 Intelligent Agents

    3/33

    3

    Agents

    An agent is an biologic (people or animals), robotic, orcomputational (a computer program) entity/tool that isable to carry out some task, usually to help a humanuser.

    For example, An agent might be set up to buy a particular stock

    when its price falls below a particular level.

    A simple Internet search agent might be designed to

    send queries to a number of search engines andcollate the results.

    In many ways, the field of Artificial Intelligence as awhole can be seen as the study of methods that can beused to build intelligent agents.

  • 7/31/2019 Lec 02 Intelligent Agents

    4/33

    4

    Intelligent agents continuously perform threefunctions: perception of dynamic conditions inthe environment; action to affect conditions in

    the environment; and reasoning to interpretperceptions, solve problems, draw inferences,and determine actions.

    Agents

  • 7/31/2019 Lec 02 Intelligent Agents

    5/33

    5

    Agent Properties

    Rationale: Able to act in a rational (or intelligent) wayAutonomous: Able to act independently, not subject toexternal control The ability to act and make decisions independently

    of the programmer or user of the agentPersistent: Able to run continuouslyCommunicative: Able to provide information, orcommand other agentsCooperative: Able to work with other agents to achieve

    goalsMobile: Able to move (typically related to networkmobility)Adaptive: Able to learn and adaptGoal-oriented: Able to achieve some goal

  • 7/31/2019 Lec 02 Intelligent Agents

    6/33

    6

    Agents

    An agent is anything that can be viewed asperceiving its environment through sensorsand acting upon that environment throughactuators

    Actuators are sometimes called effectors

  • 7/31/2019 Lec 02 Intelligent Agents

    7/33

    7

    Agents interact with environmentsthrough sensors and actuators.

    environmentpercepts

    actions

    ?

    agent

    sensors

    effectors

  • 7/31/2019 Lec 02 Intelligent Agents

    8/33

  • 7/31/2019 Lec 02 Intelligent Agents

    9/33

    9

    External Characterization of an Agent

    We use the term perceptto refer to the agent'sperceptual inputs at any given instant.

    An agent's percept sequenceis the complete history ofeverything the agent has ever perceived.

    An agent's choice of action at any given instant candepend on the entire percept sequence observed todate.

    If we can specify the agent's choice of action for everypossible percept sequence, then we have said more orless everything there is to say about the agent

    Mathematically speaking, we say that an agent'sbehavior is described by the agent function that mapsany given percept sequence to an action.

  • 7/31/2019 Lec 02 Intelligent Agents

    10/33

    10

    Agents

    Vacuum cleaner world

    Two locations: squares A and B

    Vacuum agents perceives which square it isin and whether there is dirt in the square

    Vacuum agent can choose to move left, moveright, Suck dirt, do nothing

    Agent function if current square is dirty, thensuck , otherwise move to the other square

  • 7/31/2019 Lec 02 Intelligent Agents

    11/33

  • 7/31/2019 Lec 02 Intelligent Agents

    12/33

    12

    AgentsPartial tabulation (external characterization) of simpleagent functionPercept sequence action

    ================ =======[A, clean] right

    [A, dirty] suck[B, clean] left[B, dirty] suck[A, clean], [A, clean] right[A, clean], [A, dirty] suck [A, clean], [A, clean], [A, clean] right[A, clean], [A, clean], [A, dirty] suck

  • 7/31/2019 Lec 02 Intelligent Agents

    13/33

    13

    The Concept of Rationality

    Rational agent does the right thing, that is,every entry in the table for the agent function isfilled out correctly

    The right action is the one that will cause theagent to be most successful

    Performance measure criterion for success ofan agents behavior

    Imposed by the designer who is constructing theagent

  • 7/31/2019 Lec 02 Intelligent Agents

    14/33

    14

    Rationality

    Vacuum cleaner agent measure performanceby the amount of dirt cleaned up in a single eighthour shift

    Clean, dump dirt, clean, dump dirt ?More suitable performance measure: rewardagent for having a clean floor

    Design performance measures according to

    what one wants in the environment - notaccording to how one thinks the agent shouldbehave

  • 7/31/2019 Lec 02 Intelligent Agents

    15/33

    15

    Rationality

    What is rational at any given time dependson

    Performance measure that defines the

    criterion of success

    Agents prior knowledge of the environment

    Actions that the agent can perform

    Agents percept sequence to date

  • 7/31/2019 Lec 02 Intelligent Agents

    16/33

    16

    Rationality

    Definition

    For each possible percept sequence, a rationalagent should select an action that is expected to

    maximize its performance measure, given theevidence provided by the percept sequence andwhatever built-in knowledge the agent has

    The simple vacuum-cleaner agent that cleans asquare if it is dirty and moves to the other squareif notis it a rational agent?

  • 7/31/2019 Lec 02 Intelligent Agents

    17/33

    17

    Vacuumcleaner agent rational?

    What is its performance measure

    Performance measure awards one point foreach clean square at each time step over a

    lifetime of 1000 times stepsWhat is known about the environment

    Geography of environment is known a priori.Dirt distribution and initial location of agent

    are not known. Clean squares stay clean.Sucking cleans the current square. Left andright move the agent

  • 7/31/2019 Lec 02 Intelligent Agents

    18/33

    18

    Vacuumcleaner agent rational?

    What sensors and actuators does it have

    Available actions left, right, suck,NoOp

    Agent perceives Its location andwhether that location contains dirt

    Under these conditions, the agent isrational

  • 7/31/2019 Lec 02 Intelligent Agents

    19/33

    19

    The Nature Of Environments

    We have a definition of rationality

    We can now think of building rationalagents

  • 7/31/2019 Lec 02 Intelligent Agents

    20/33

    20

    Specifying the task environment

    Task environment a problem for which a rational agents is the

    solution specified by the PEAS description:Performance measure, Environment, Actuators,SensorsMust first specify the setting for intelligent agentdesignConsider, e.g., the task of designing an automated

    taxi: Performance measure Environment Actuators Sensors

  • 7/31/2019 Lec 02 Intelligent Agents

    21/33

    21

    PEAS for Automated Taxi

    Performance measure: getting to correct destination;minimizing fuel consumption , wear and tear, trip time,cost, traffic law violations; maximizing safety, comfort,profitsEnvironment: Variety of roads , other traffic, pedestrians,customers,, traffic, road works, Interact with thepassengers, snow

    Actuators: Steering wheel, brake, signal, hornaccelerator, steering, output to a display screen or voicesynthesizer; communicate with other vehiclesSensors: controllable cameras, speedometer odometer,accelerometer, engine and other system sensors , GPS,sensors to detect distances to other cars and obstacles,keyboard or microphone for the passenger to request a

    destination

  • 7/31/2019 Lec 02 Intelligent Agents

    22/33

    22

    PEAS for a Medical DiagnosisSystem

    Performance measure: Healthy patient, minimizecosts

    Environment: Patient, hospital, staff

    Actuators: Screen display (questions, tests,diagnoses, treatments, referrals)

    Sensors: Keyboard (entry of symptoms, findings,

    patient's answers)

  • 7/31/2019 Lec 02 Intelligent Agents

    23/33

    23

    PEAS for an Interactive English Tutor

    Performance measure: Maximize student'sscore on test

    Environment: Set of students

    Actuators: Screen display (exercises,suggestions, corrections)

    Sensors: Keyboard

  • 7/31/2019 Lec 02 Intelligent Agents

    24/33

    24

    Properties of task environments

    Fully observable vs. partially observable

    Deterministic vs. stochastic

    Episodic vs. sequential

    Static vs. dynamic

    Discrete vs. continuous

    Single agent vs. multiagent

  • 7/31/2019 Lec 02 Intelligent Agents

    25/33

    25

    Fully observable vs. partially

    observable

    If an agent's sensors give it access to the complete stateof the environment at each point in time, then we saythat the task environment is fully observable a task environment is effectively fully observable if the sensors

    detect all aspects that are relevantto the choice of action

    Fully observable environments are convenient becausethe agent need not maintain any internal state to keeptrack of the world

    An environment might be partially observable because of

    noisy and inaccurate sensors or because parts of thestate are simply missing from the sensor data a vacuum agent with only a local dirt sensor cannot tell whether

    there is dirt in other squares

    automated taxi cannot see what other drivers are thinking

  • 7/31/2019 Lec 02 Intelligent Agents

    26/33

    26

    Deterministic vs. stochastic

    A deterministic environment is one in which any actionhas a single guaranteed effect there is no uncertaintyabout the state of the environment that will result fromperforming an action

    If the next state of the environment is completelydetermined by the current state and the action executedby the agent, then we say the environment isdeterministic; otherwise, it is stochastic Taxi driving is clearly stochastic in this sense, because one can

    never predict the behavior of traffic exactly The vacuum world as we described it is deterministic, but

    variations can include stochastic elements such as randomlyappearing dirt and an unreliable suction mechanism

    Non-deterministic environments present greater

    problems for the agent designer

  • 7/31/2019 Lec 02 Intelligent Agents

    27/33

    27

    Episodic vs. sequential

    In an episodic task environment, the agent's experienceis divided into atomic episodes. Each episode consists ofthe agent perceiving and then performing a single action the next episode does not depend on the actions

    taken in previous episodes

    an agent that has to spot defective parts on anassembly line bases each decision on the currentpart, regardless of previous decisions

    In sequential environments, on the other hand, thecurrent decision could affect all future decisions Chess and taxi driving are sequentialEpisodic environments are much simpler than sequentialenvironments because the agent does not need to thinkahead

  • 7/31/2019 Lec 02 Intelligent Agents

    28/33

    28

    Static vs. dynamic

    If the environment can change while an agent isdeliberating, then we say the environment is dynamic forthat agent; otherwise, it is static. Static environments are easy to deal with because

    the agent need not keep looking at the world while it

    is deciding on an action Crossword puzzles are staticDynamic environments, are continuously asking theagent what it wants to do. If the agent it hasn't decidedyet, that counts as deciding to do nothing Taxi driving is dynamicIf the environment itself does not change with thepassage of time but the agent's performance score does,then we say the environment is semidynamic Chess, when played with a clock, is semidynamic.

  • 7/31/2019 Lec 02 Intelligent Agents

    29/33

    29

    Discrete vs. continuous

    The discrete/continuous distinction can beapplied to the stateof the environment, to theway timeis handled

    For example, a discrete-state environment such as achess game has a finite number of distinct states.

    Chess also has a discrete set of percepts andactions.

    Taxi driving is a continuous state and continuous-timeproblem: the speed and location of the taxi and of theother vehicles sweep through a range of continuousvalues and do so smoothly over time

  • 7/31/2019 Lec 02 Intelligent Agents

    30/33

    30

    Single agent vs. multiagent

    Does the environment contain a single agent, or possiblymultiple agents acting in a cooperative or competitivefashion

    In chess, the opponent entity B is trying to maximize its

    performance measure, which, by the rules of chess,minimizes agent A's performance measure. Thus, chessis a competitivemultiagent environment.

    Avoiding collisions maximizes the performance measure

    of all agents, so it is a cooperativemultiagentenvironment.

  • 7/31/2019 Lec 02 Intelligent Agents

    31/33

    Examples

    31

    The environment type largely determines the agent design The real world is (of course) partially observable, stochastic,sequential, dynamic, continuous, multi-agent

  • 7/31/2019 Lec 02 Intelligent Agents

    32/33

    32

    Examples of task environments andtheir characteristics.

  • 7/31/2019 Lec 02 Intelligent Agents

    33/33

    33

    Environment Types

    The simplest environment is

    Fully observable, deterministic, episodic,static, discrete and single-agent.

    Most real situations are: Partially observable, stochastic, sequential,

    dynamic, continuous and multi-agent.