Intelligent Agents Chapter 2 Outline Agents and environments - - PowerPoint PPT Presentation

intelligent agents
SMART_READER_LITE
LIVE PREVIEW

Intelligent Agents Chapter 2 Outline Agents and environments - - PowerPoint PPT Presentation

Intelligent Agents Chapter 2 Outline Agents and environments Rationality Task environment: PEAS: Performance measure Environment Actuators Sensors Environment types Agent types Agents and Environments An


slide-1
SLIDE 1

Intelligent Agents

Chapter 2

slide-2
SLIDE 2

Outline

  • Agents and environments
  • Rationality
  • Task environment:

PEAS:

  • Performance measure
  • Environment
  • Actuators
  • Sensors
  • Environment types
  • Agent types
slide-3
SLIDE 3

Agents and Environments

  • An agent is anything that can be viewed as perceiving its

environment through sensors and acting in that environment through actuators.

? agent percepts sensors actions environment actuators

slide-4
SLIDE 4

Agents and Environments

  • An agent is anything that can be viewed as perceiving its

environment through sensors and acting in that environment through actuators.

? agent percepts sensors actions environment actuators

  • Agents include humans, robots, softbots, thermostats, etc.
  • The agent function maps from percept histories to actions:

f : P∗ → A

  • The agent program runs on a physical architecture to give f
slide-5
SLIDE 5

Vacuum-cleaner world

A B

Percepts: location and contents, e.g., [A, Dirty] Actions: Left, Right, Suck, NoOp

slide-6
SLIDE 6

A vacuum-cleaner agent

Agent function:

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 · · · · · · Note: This says how the agent should function.

  • It says nothing about how this should be implemented.
slide-7
SLIDE 7

A vacuum-cleaner agent

Agent program:

Function Reflex-Vacuum-Agent([location,status])returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

Ask:

  • What is the right function for implementing a specification?
  • Can it be implemented in a small agent program?
slide-8
SLIDE 8

Rationality

Informally a rational agent is one that does the “right thing”.

slide-9
SLIDE 9

Rationality

Informally a rational agent is one that does the “right thing”.

  • How well an agent does is given by a performance measure.
slide-10
SLIDE 10

Rationality

Informally a rational agent is one that does the “right thing”.

  • How well an agent does is given by a performance measure.
  • A fixed performance measure evaluates a sequence of

environment states

  • Examples:
  • one point per square cleaned up in time T?
  • one point per clean square per time step, minus one per move?
  • penalize for > k dirty squares?
slide-11
SLIDE 11

Rationality

Informally a rational agent is one that does the “right thing”.

  • How well an agent does is given by a performance measure.
  • A fixed performance measure evaluates a sequence of

environment states

  • Examples:
  • one point per square cleaned up in time T?
  • one point per clean square per time step, minus one per move?
  • penalize for > k dirty squares?
  • A rational agent selects an action which maximizes the

expected value of the performance measure given the percept sequence to date and its own knowledge.

  • The action selection may range from being hardwired (e.g. in

an insect or reflexive agent) to involving substantial reasoning.

slide-12
SLIDE 12

Rationality

Notes:

  • Rational = omniscient
  • percepts may not supply all the relevant information
slide-13
SLIDE 13

Rationality

Notes:

  • Rational = omniscient
  • percepts may not supply all the relevant information
  • Rational = clairvoyant
  • action outcomes may not be as expected
slide-14
SLIDE 14

Rationality

Notes:

  • Rational = omniscient
  • percepts may not supply all the relevant information
  • Rational = clairvoyant
  • action outcomes may not be as expected
  • Hence, rational = successful
  • Full, general rationality requires exploration, learning,

autonomy

slide-15
SLIDE 15

The Task Environment

  • To design a rational agent, we must specify the task

environment

  • The task environment has the following components:
  • Performance measure
  • Environment
  • Actuators
  • Sensors
  • Acronym: PEAS
slide-16
SLIDE 16

PEAS

Consider, e.g., the task of designing an automated taxi: Performance measure: safety, destination, profits, legality, comfort, . . . Environment: streets/freeways, traffic, pedestrians, weather, . . . Actuators: steering, accelerator, brake, horn, speaker, . . . Sensors: video, accelerometers, gauges, engine sensors, keyboard, GPS, . . .

slide-17
SLIDE 17

Internet shopping agent

Performance measure: ?? Environment: ?? Actuators: ?? Sensors: ??

slide-18
SLIDE 18

Internet shopping agent

Performance measure: price, quality, appropriateness, efficiency Environment: ?? Actuators: ?? Sensors: ??

slide-19
SLIDE 19

Internet shopping agent

Performance measure: price, quality, appropriateness, efficiency Environment: current and future WWW sites, vendors, shippers Actuators: ?? Sensors: ??

slide-20
SLIDE 20

Internet shopping agent

Performance measure: price, quality, appropriateness, efficiency Environment: current and future WWW sites, vendors, shippers Actuators: display to user, follow URL, fill in form Sensors: ??

slide-21
SLIDE 21

Internet shopping agent

Performance measure: price, quality, appropriateness, efficiency Environment: current and future WWW sites, vendors, shippers Actuators: display to user, follow URL, fill in form Sensors: HTML pages (text, graphics, scripts)

slide-22
SLIDE 22

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
slide-23
SLIDE 23

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

slide-24
SLIDE 24

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

☞ Uncertain: not fully observable or not deterministic

slide-25
SLIDE 25

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

☞ Uncertain: not fully observable or not deterministic

  • Episodic vs. sequential
  • Episodic: Agent’s experience is divided into independent

episodes (e.g. classification)

slide-26
SLIDE 26

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

☞ Uncertain: not fully observable or not deterministic

  • Episodic vs. sequential
  • Episodic: Agent’s experience is divided into independent

episodes (e.g. classification)

  • Static vs. dynamic
  • Dynamic: Environment may change while agent is deliberating.
slide-27
SLIDE 27

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

☞ Uncertain: not fully observable or not deterministic

  • Episodic vs. sequential
  • Episodic: Agent’s experience is divided into independent

episodes (e.g. classification)

  • Static vs. dynamic
  • Dynamic: Environment may change while agent is deliberating.
  • Discrete vs. continuous
slide-28
SLIDE 28

Environment Types

  • Fully observable vs. partially observable
  • If the agent has access to full state of the environment or not
  • Deterministic vs. stochastic
  • Deterministic: Next state is completely determined by the

agent’s actions. (Or the set of agents in a multiagent env.)

☞ Uncertain: not fully observable or not deterministic

  • Episodic vs. sequential
  • Episodic: Agent’s experience is divided into independent

episodes (e.g. classification)

  • Static vs. dynamic
  • Dynamic: Environment may change while agent is deliberating.
  • Discrete vs. continuous
  • Single-agent vs. multiagent
slide-29
SLIDE 29

Environment types

Crossword Backgammon Internet shopping Taxi Observable Deterministic Episodic Static Discrete Single-agent

slide-30
SLIDE 30

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Episodic Static Discrete Single-agent

slide-31
SLIDE 31

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic Static Discrete Single-agent

slide-32
SLIDE 32

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Discrete Single-agent

slide-33
SLIDE 33

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Yes Yes Semi No Discrete Single-agent

slide-34
SLIDE 34

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Yes Yes Semi No Discrete Yes Yes Yes No Single-agent

slide-35
SLIDE 35

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Yes Yes Semi No Discrete Yes Yes Yes No Single-agent Yes No Yes No

slide-36
SLIDE 36

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Yes Yes Semi No Discrete Yes Yes Yes No Single-agent Yes No Yes No ☞ The environment type largely determines the agent design

  • The real world is:
slide-37
SLIDE 37

Environment types

Crossword Backgammon Internet shopping Taxi Observable Yes Yes No No Deterministic Yes No Partly No Episodic No No No No Static Yes Yes Semi No Discrete Yes Yes Yes No Single-agent Yes No Yes No ☞ The environment type largely determines the agent design

  • The real world is:
  • partially observable,

stochastic, sequential, dynamic, continuous, and multi-agent

slide-38
SLIDE 38

Agent types

There are four basic types in order of increasing generality:

  • simple reflex agents
  • reflex agents with state
  • goal-based agents
  • utility-based agents

All these can have a learning component added

slide-39
SLIDE 39

Simple reflex agents

Agent Environment

Sensors What the world is like now What action I should do now Condition−action rules Actuators

  • Action is selected according to the current percept
  • No knowledge of percept history.
slide-40
SLIDE 40

A simple reflex agent algorithm

Function Simple-Reflex-Agent(percept) returns an action persistent: rules a set of condition-action rules state ← Interpret-Input(percept) rule ← Rule-Match(state,rules) action ← rule.Action return action

slide-41
SLIDE 41

Example

Function Reflex-Vacuum-Agent([location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

slide-42
SLIDE 42

Reflex agents with state

Agent Environment

Sensors What action I should do now State How the world evolves What my actions do Condition−action rules Actuators What the world is like now

  • Also called a “model-based reflex agent”
  • Agent keeps track of what it knows about the world.
  • Useful for partial observability
slide-43
SLIDE 43

A simple reflex agent algorithm

Function Reflex-Agent-With-State(percept) returns an action persistent: state: the agent’s conception of the world state model: The transition model – how the next state depends on the present state and action rules: a set of condition-action rules action: the most recent action (initially none) state ← Update-State(state,action,percept,model) rule ← Rule-Match(state,rules) action ← rule.Action return action

slide-44
SLIDE 44

Goal-based agents

Agent Environment

Sensors What it will be like if I do action A What action I should do now State How the world evolves What my actions do Goals Actuators What the world is like now

  • Agent’s actions are determined in part by its goals.
  • Example: Classical planning.
slide-45
SLIDE 45

Utility-based agents

Agent Environment

Sensors What it will be like if I do action A How happy I will be in such a state What action I should do now State How the world evolves What my actions do Utility Actuators What the world is like now

  • In addition to goals, use a notion of how “good” an action

sequence is.

  • E.g.: Taxi to airport should be safe, efficient, etc.
slide-46
SLIDE 46

Learning agents

Performance standard

Agent Environment

Sensors Performance element changes knowledge learning goals Problem generator feedback Learning element Critic Actuators

slide-47
SLIDE 47

Summary

  • Agents interact with environments through actuators and

sensors

  • The agent function describes what the agent does in all

circumstances

  • The performance measure evaluates the environment sequence
  • A rational agent maximizes expected performance
  • Agent programs implement agent functions
  • PEAS descriptions define task environments
  • Environments are categorized along several dimensions:
  • bservable? deterministic? episodic? static? discrete?

single-agent?

  • Several basic agent architectures exist:

reflex, reflex with state, goal-based, utility-based