AI - Lecture1402

Embed Size (px)

Text of AI - Lecture1402

  • 8/10/2019 AI - Lecture1402


    Artificial Intelligence (AI)

    Lecture2Sikandar S. Toor

    Textbook: Artificial Intelligence: A Modern Approachby Peter Norvig & Stuart Russel
  • 8/10/2019 AI - Lecture1402


    Intelligent Agent

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


    General assumption is that every agent canperceive its own actions but not always the


    Also calledbot.

  • 8/10/2019 AI - Lecture1402


    An Intelligent Agent







    The agents behavior is a mathematical functionthat maps given

    percept sequence to action:

    f : P* A

    P* = Percept History

    A = Actions

    The a ent ro ramruns on the h sical architecture to roduce f

  • 8/10/2019 AI - Lecture1402


    Agents - Examples

    A human agent has eyes, ears, and other organs forsensors and hands, legs, mouth and other body parts foractuators

    A robotic agent substitutes cameras and infrared rangefinders for the sensors and various motors for theactuators.

    A software agent receives keystrokes, network packets,file contents as sensory input and acts upon the

    environment by displaying on screen, sending networkpackets and writing files.

  • 8/10/2019 AI - Lecture1402


    Percept & Percept Sequence

    Percept refers to agents perceptual inputat any given instance

    Percept sequenceis the complete history ofeverything agent has ever perceived

    An agents choice of action at any giveninstance can depend on the entire percept

    sequence observed to-date

  • 8/10/2019 AI - Lecture1402


    Agent Function

    Mathematically, an agents behavior is described by theagent functionthat maps any given percept sequence toan action

    We may tabulate agent function that describe any given agent

    For most agent this would become a very large table. May be ofinfinite size

    We want to put a bound on the length of the percept sequence wewant to consider

    This table is an external characterization of an agent Internally, agent function for an artificial agent will be

    implementation by an agent program

  • 8/10/2019 AI - Lecture1402


    Vacuum-Cleaner Agent

    Locations: square A, square B

    Percepts: location and contents, e.g.,[A,Dirty]

    Actions: Left, Right, Suck, NoOp

  • 8/10/2019 AI - Lecture1402


    Vacuum-Cleaner Agent

    Percept 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



  • 8/10/2019 AI - Lecture1402


    Good Behavior - Rationality

    Rational Agent is the one which does the rightthing

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

    The environment shall change with agentssequence of actions

    If the sequence is desirable, the agent hasperformed well

  • 8/10/2019 AI - Lecture1402


    Performance Measure

    Performance measureis an objective criterion for successof an agent's behavior

    Performance measure can be defined by the designer whoconstructed the agent

    e.g., performance measure of a vacuum-cleaner agentcould be amount of dirt cleaned up, amount of time taken,amount of electricity consumed, amount of noisegenerated, etc

    No one universal criterion of performance measure forevery agent

    We could ask the agent for a subjective opinion of howhappy it is with its own performance

  • 8/10/2019 AI - Lecture1402


    Performance Measure

    The selection of performance measure is notalways easy

    As a general rule, it is better to design a

    performance measure according to what oneactually wants in the environment rather thanaccording to how one thinks the agent shouldbehave

  • 8/10/2019 AI - Lecture1402



    What is rational at given time depends uponfour things

    The performance measure that defines criterion

    for success

    The agents prior knowledge of the environment

    The actions that agent can perform

    The agents percept sequence to-date

  • 8/10/2019 AI - Lecture1402


    Rational Agent

    For each possible percept sequence, arational agent should select an action that isexpected to maximize its performancemeasure, given the evidence provided bythe percept sequence and whatever built-inknowledge the agent has.

  • 8/10/2019 AI - Lecture1402



    An omniscience agent knows the actualoutcomes of its actions and can actaccordingly

    Omniscience is impossible in reality

    Omniscience is different from rationality

  • 8/10/2019 AI - Lecture1402


    Perfection, Learning

    Rationality is NOT the same as Perfection

    Rationality maximizes expected performance

    Perfection maximizes actual performanceA rational agent not only gather information

    but also learnas much as possible from what

    it perceives

  • 8/10/2019 AI - Lecture1402



    Doing actions in order to modify futurepercepts, sometimes called informationgathering, is an important part of rationality

    Information gathering is an important part ofrationality

    It performs such actions to increase its


    This is called Exploration

  • 8/10/2019 AI - Lecture1402



    We do not want our rational agent to gatherinformation only

    We also want it to learn as much as it can from

    what it perceives Successful agents split the task of computing agent

    function (learning) into 3 different periods

    When designing

    When agent is deliberating on its next action

    When it learns from experience

  • 8/10/2019 AI - Lecture1402


    Agent Autonomy

    To what extent the agent is able to make decisionsand take actions on its own

    The capacity to compensate for partial or incorrect

    prior knowledge by learning An agent is called autonomous if its behavior is

    determined by its own experience (with ability tolearn and adopt)

    A truly autonomous agent should be able tooperate successfully in a wide variety ofenvironments

  • 8/10/2019 AI - Lecture1402


    Task Environment

    The task environment are essentially the problemsfor which the agent is solution


    PPerformance Measure E - Environment



    First step in designing an agent must be todefine the task environment


  • 8/10/2019 AI - Lecture1402


    PEAS - Example

    Automated Taxi Driver Agent Performance measure: Safe, correct destination,

    minimum fuel consumption, min wear and tear, fast,legal, comfortable trip, maximize profit

    Environment: Roads, other traffic, pedestrians,customers, stray animals, police cars, signals, potholes

    Actuators: Steering wheel, accelerator, brake, signal,horn, display, voice synthesizer

    Sensors: Cameras, sonar, speedometer, accelerometer,GPS, odometer, engine sensors, keyboard, mic

  • 8/10/2019 AI - Lecture1402


    Agent Type and PEAS

    Agent Type PerformanceMeasures

    Environment Actuators Sensors

    Medical Diagnostic Healthy patients,minimize costs,lawsuits

    Patients, hospital,staff

    Display questions,tests, diagnoses,treatments,referrals

    Keyboard entry ofsymptoms,findings, patientsanswers

    Satellite imageanalysis system

    Correct imagecharacterization

    Downlink fromorbiting satellite

    Displaycategorization ofscene

    Color pixel arrays

    Part picking robot Percentage of partsin correct bins

    Conveyor belt withparts, bins

    Valves, pumps,heaters, displays

    Cameras, jointangle sensors

    Refinery controller Maximize purity,yield, safety

    Refinery, operators Valves, pumps,heaters, displays

    Temperature,pressure, chemicalsensors