Docsity

Unit 1 Part 2 introd, Slides of Artificial Intelligence

Partial preview of the text

Download Unit 1 Part 2 introd and more Slides Artificial Intelligence in PDF only on Docsity!

Chapter 2

Intelligent Agents

Source: Getty Images/iStockpho

Outline

Agents and environments

• Rationality

• PEAS (Performance measure,

Environment, Actuators, Sensors)

• Environment types

• Agent types

Agents

An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators Percepts: agents perceptual inputs at any given instance Percept sequence: complete history of agents perceived inputs Agent functions: describes the agent’s behavior The agent function maps from percept histories to actions:

[ f: P*  A]
The agent program runs on the physical architecture to produce f

agent = architecture + program

Vacuum-cleaner world

• Percepts: location and contents, e.g.,

[A, Dirty]

Actions: Left, Right, Suck, NoOp

Good behavior: Concept of Rationality

Rational agent

  • (^) An agent should strive to "do the right thing", based on what it can perceive and the actions it can perform.
  • (^) All entry in the table for the agent function are filled correctly.
  • (^) The right action is the one that will cause the agent to be most successful How to measure success????
  • (^) Performance measure: A criterion for success of an agent's behavior
  • (^) E.g., performance measure of vacuum cleaner
    • (^) amount of dirt cleaned up,
    • (^) amount of time taken,
    • (^) amount of electricity consumed,
    • (^) amount of noise generated, etc. Selection of performance measure:
  • (^) Average performance Vs energetic performance with long breaks
  • (^) Reckless life or safe but simple existence
  • (^) Economy with moderate poverty for all or some are super rich + some are very poor

Good behavior: Concept of Rationality

What is rational??

  • (^) The Performance measure that defines the criterion of success
  • (^) The agent’s prior knowledge of environment
  • (^) The actions that the agent performs
  • (^) The agent’s percept sequence to data
Def: For each possible percept sequence, a rational agent should
select an action that is expected to maximize its performance
measure, given the evidence provided by the percept sequence and
whatever built-in knowledge the agent has.

How to check if Vacuum cleaner is a rational agent? Performance measure: award one point for each clean square

  • (^) Environment: Geography of environment is known apriori – two squares A & B
  • (^) Actions: Left, Right, Suck and NoOp
  • (^) Sensors: Agent perceives its location and checks if contains dirt or not Under these circumstances Vacuum cleaner agent is rational.

Nature of Environment

  • (^) Building rational agents
    • (^) Task environments : “problems”
    • (^) Rational agent : “solutions”
  • (^) Specifying task environment
    • (^) PEAS: (Performance measure, Environment, Actuators, Sensors)
    • (^) e.g., the task of designing an automated taxi driver:
      • (^) Performance measure : Safe, fast, legal, comfortable trip, maximize profits
      • (^) Environment : Roads, other traffic, pedestrians, customers
      • (^) Actuators : Steering wheel, accelerator, brake, signal, horn
      • (^) Sensors : Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard

PEAS

Medical Diagnosis

• Part-picking robot

Environment types

  • (^) Fully observable vs. partially observable:
    • (^) Fully observable - An agent's sensors give it access to the complete state of the environment at each point in time.
    • (^) Sensors detect all aspects relevant to choice of action (performance measure)
    • (^) Agent need not maintain any internal state to keep track of the world
    • (^) Partially observable - due to noise or inaccurate sensors or parts of state are missing
    • (^) E.g. taxi cannot what other drivers are thinking
  • (^) Deterministic vs. stochastic:
    • (^) Deterministic - The next state of the environment is completely determined by the current state and the action executed by the agent.
    • (^) if we had a pawn while playing chess and we moved that piece from A2 to A3, that would always work. There is no uncertainty in the outcome of that move.
    • (^) For a given current state and action executed by agent, the next state or outcome cannot be exactly determined
    • (^) E.g. if agent kicks the ball in a particular direction, then the ball may or may not be stopped by other players, or the soccer field can change in many different ways depending on how players move.
    • (^) E.g. taxi driver is stochastic, vacuum cleaner example is deterministic
    • (^) (If the environment is deterministic except for the actions of other agents, then the environment is strategic)
  • (^) Episodic vs. sequential:
    • (^) The agent's experience is divided into atomic "episodes"
    • (^) each episode consists of the agent perceiving and then performing a single action, and the choice of action in each episode depends only on the episode itself.
    • (^) In sequential environment, the current decision could affect all future decision
    • (^) E.g chess playing , taxi driver – sequential
    • (^) Fault detecting robot in assembly line - episodic

Environment types

  • (^) Static vs. dynamic:
    • (^) The environment is changed while an agent is deliberating – dynamic else static.
    • (^) Static – easy to deal, no importance to time
    • (^) (The environment is semi dynamic if the environment itself does not change with the passage of time but the agent's performance score does)
    • (^) E.g. taxi – dynamic, crossword puzzle – static, chess with clock - semidynamic
  • (^) Discrete vs. continuous:
    • (^) Applied to state of environment, way time is handled, percepts/actions of agents
    • (^) Discrete - A limited number of distinct, clearly defined percepts and actions.
    • (^) E.g taxi – continuous ,
    • (^) chess, crossword - discrete
  • (^) Single agent vs. multi agent:
    • (^) Single - An agent operating by itself in an environment
    • (^) E.g. crossword - single
    • (^) Competitive multiagent – chess with opponent
    • (^) Cooperative multiagent – taxi driving

Agent functions and

programs

An agent is completely specified by

the agent function mapping percept

sequences to actions

• One agent function (or a small

equivalence class) is rational

Aim: find a way to implement the

rational agent function concisely

Table-lookup agent

action  LOOKUP( percepts, table)

• Drawbacks:

– Huge table

– Take a long time to build the table

– No autonomy

– Even with learning, need a long time to learn

the table entries

Agent types

Four basic types in order of increasing

generality:

• Simple reflex agents

• Model-based reflex agents

• Goal-based agents

• Utility-based agents

• Learning agents

Simple reflex agents

  • (^) Select action on current percept
  • (^) Ignore percept history
  • (^) Actions based on condition-action rule
  • (^) Problems?? – works only in fully observable environment
  • (^) Ex. A thermostat in a heating system.