Intelligent Agents Philipp Koehn 18 February 2020 Philipp Koehn - - PowerPoint PPT Presentation

intelligent agents
SMART_READER_LITE
LIVE PREVIEW

Intelligent Agents Philipp Koehn 18 February 2020 Philipp Koehn - - PowerPoint PPT Presentation

Intelligent Agents Philipp Koehn 18 February 2020 Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020 Agents and Environments 1 Agents include humans, robots, softbots, thermostats, etc. The agent function maps


slide-1
SLIDE 1

Intelligent Agents

Philipp Koehn 18 February 2020

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-2
SLIDE 2

1

Agents and Environments

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

f : P∗ → A

  • The agent program runs on the physical architecture to produce f

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-3
SLIDE 3

2

Vacuum Cleaner World

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

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-4
SLIDE 4

3

Vacuum Cleaner Agent

Table 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 . . . . . .

slide-5
SLIDE 5

3

Vacuum Cleaner Agent

Table 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 . . . . . . Input: location, status Output: action

1: if status = Dirty then 2:

return Suck

3: end if 4: if location = A then 5:

return Right

6: end if 7: if location = B then 8:

return Left

9: end if

  • What is the right function?
  • Can it be implemented in a small agent program?

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-6
SLIDE 6

4

Rationality

  • Fixed performance measure evaluates the environment sequence

– 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-7
SLIDE 7

4

Rationality

  • Fixed performance measure evaluates the environment sequence

– 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 chooses whichever action maximizes the expected value of the

performance measure given the percept sequence to date

slide-8
SLIDE 8

4

Rationality

  • Fixed performance measure evaluates the environment sequence

– 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 chooses whichever action maximizes the expected value of the

performance measure given the percept sequence to date

  • Rational = omniscient

→ percepts may not supply all relevant information

  • Rational = clairvoyant

→ action outcomes may not be as expected

  • Hence, rational = successful
  • Rational =

⇒ exploration, learning, autonomy

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-9
SLIDE 9

5

intelligent agent

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-10
SLIDE 10

6

Intelligent Agent

  • Definition:

An intelligent agent perceives its environment via sensors and acts rationally upon that environment with its effectors.

slide-11
SLIDE 11

6

Intelligent Agent

  • Definition:

An intelligent agent perceives its environment via sensors and acts rationally upon that environment with its effectors.

  • A discrete agent receives percepts one at a time, and maps this percept sequence

to a sequence of discrete actions.

slide-12
SLIDE 12

6

Intelligent Agent

  • Definition:

An intelligent agent perceives its environment via sensors and acts rationally upon that environment with its effectors.

  • A discrete agent receives percepts one at a time, and maps this percept sequence

to a sequence of discrete actions.

  • Properties

– autonomous – reactive to the environment – pro-active (goal-directed) – interacts with other agents via the environment

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-13
SLIDE 13

7

Sensors/Percepts and Effectors/Actions

  • For example: humans

– Sensors: Eyes (vision), ears (hearing), skin (touch), tongue (gustation), nose (olfaction), neuromuscular system (proprioception) – Percepts: ∗ At the lowest level: electrical signals from these sensors ∗ After preprocessing: objects in the visual field (location, textures, colors, ...), auditory streams (pitch, loudness, direction), ... – Effectors: limbs, digits, eyes, tongue, ... – Actions: lift a finger, turn left, walk, run, carry an object, ...

  • Percepts and actions need to be carefully defined,

possibly at different levels of abstraction

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-14
SLIDE 14

8

Example: Self-Driving Car

  • Percepts: Video, sonar, speedometer, odometer, engine sensors, keyboard input,

microphone, GPS, ...

  • Actions: Steer, accelerate, brake, horn, speak/display, ...
  • Goals: Maintain safety, reach destination, maximize profits (fuel, tire wear), obey

laws, provide passenger comfort, ...

  • Environment:

U.S. urban streets, freeways, traffic, pedestrians, weather, customers, ...

  • Different aspects of driving may require different types of agent programs

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-15
SLIDE 15

9

Rationality

  • An ideal rational agent should, for each possible percept sequence, do whatever

actions will maximize its expected performance measure based on – percept sequence – built-in and acquired knowledge

slide-16
SLIDE 16

9

Rationality

  • An ideal rational agent should, for each possible percept sequence, do whatever

actions will maximize its expected performance measure based on – percept sequence – built-in and acquired knowledge

  • Rationality includes information gathering, not ”rational ignorance”

(If you don’t know something, find out!)

slide-17
SLIDE 17

9

Rationality

  • An ideal rational agent should, for each possible percept sequence, do whatever

actions will maximize its expected performance measure based on – percept sequence – built-in and acquired knowledge

  • Rationality includes information gathering, not ”rational ignorance”

(If you don’t know something, find out!)

  • Need a performance measure to say how well a task has been achieved
  • Types of performance measures

– false alarm (false positive) rate – false dismissal (false negative) rate – speed – resources required – impact on environment – etc.

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-18
SLIDE 18

10

Autonomy

  • A system is autonomous to the extent that its own behavior is determined by its
  • wn experience
  • Therefore, a system is not autonomous if it is guided by its designer according to

a priori decisions

  • To survive, agents must have

– enough built-in knowledge to survive – ability to learn

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-19
SLIDE 19

11

agent types

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-20
SLIDE 20

12

Agent Types

  • Table-driven agents

use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table.

slide-21
SLIDE 21

12

Agent Types

  • Table-driven agents

use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table.

  • Simple reflex agents

are based on condition-action rules, implemented with an appropriate production system. They are stateless devices which do not have memory of past world states.

slide-22
SLIDE 22

12

Agent Types

  • Table-driven agents

use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table.

  • Simple reflex agents

are based on condition-action rules, implemented with an appropriate production system. They are stateless devices which do not have memory of past world states.

  • Agents with memory

have internal state, which is used to keep track of past states of the world.

slide-23
SLIDE 23

12

Agent Types

  • Table-driven agents

use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table.

  • Simple reflex agents

are based on condition-action rules, implemented with an appropriate production system. They are stateless devices which do not have memory of past world states.

  • Agents with memory

have internal state, which is used to keep track of past states of the world.

  • Agents with goals

are agents that, in addition to state information, have goal information that describes desirable situations. Agents of this kind take future events into consideration.

slide-24
SLIDE 24

12

Agent Types

  • Table-driven agents

use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table.

  • Simple reflex agents

are based on condition-action rules, implemented with an appropriate production system. They are stateless devices which do not have memory of past world states.

  • Agents with memory

have internal state, which is used to keep track of past states of the world.

  • Agents with goals

are agents that, in addition to state information, have goal information that describes desirable situations. Agents of this kind take future events into consideration.

  • Utility-based agents

base their decisions on classic axiomatic utility theory in order to act rationally.

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-25
SLIDE 25

13

Table-Driven Agents

  • Table lookup of percept-action pairs mapping from every possible perceived

state to the optimal action for that state

  • Problems

– too big to generate and to store (Chess has about 10120 states, for example) – no knowledge of non-perceptual parts of the current state – not adaptive to changes in the environment; requires entire table to be updated if changes occur – looping: can’t make actions conditional on previous actions/states

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-26
SLIDE 26

14

Simple Reflex Agents

  • Rule-based reasoning to map from percepts to optimal action;

each rule handles a collection of perceived states

  • Problems

– still usually too big to generate and to store – still no knowledge of non-perceptual parts of state – still not adaptive to changes in the environment; requires collection of rules to be updated if changes occur – still can’t make actions conditional on previous state

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-27
SLIDE 27

15

Architecture of Table-Driven/Reflex Agent

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-28
SLIDE 28

16

Agents with Memory

  • Encode ”internal state” of world to remember past contained in earlier percepts
  • Needed because sensors do not usually give the entire state of the world at each

input, so perception of the environment is captured over time.

  • ”State” is used to encode different ”world states” that generate the same

immediate percept

  • Requires ability to represent change in the world; one possibility is to represent

just the latest state, but then can’t reason about hypothetical courses of action

  • Example: Rodney Brooks’s Subsumption Architecture

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-29
SLIDE 29

17

Brooks’ Subsumption Architecture

  • Main idea: build complex, intelligent robots by decomposing behaviors into a

hierarchy of skills, each completely defining a complete percept-action cycle for

  • ne very specific task
  • Examples:

– avoiding contact – wandering – exploring – recognizing doorways

  • Each behavior is modeled by a finite-state machine with a few states
  • Behaviors are loosely coupled, asynchronous interactions

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-30
SLIDE 30

18

Architecture of Agent with Memory

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-31
SLIDE 31

19

Goal-Based Agent

  • Choose actions so as to achieve a (given or computed) goal.
  • A goal is a description of a desirable situation.
  • Keeping track of the current state is often not enough:

need to add goals to decide which situations are good

  • Deliberative instead of reactive.
  • May have to consider long sequences of possible actions before deciding if goal

is achieved (involves consideration of the future, ”what will happen if I do...?”)

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-32
SLIDE 32

20

Architecture of Goal-Based Agent

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-33
SLIDE 33

21

Utility-Based Agent

  • When there are multiple possible alternatives, how to decide which one is best?
  • A goal specifies a crude distinction between a happy and unhappy state, but
  • ften need a more general performance measure that describes ”degree of

happiness.”

  • Utility function

U: State → Real Numbers indicating a measure of success or happiness when at a given state.

  • Allows decisions comparing choice between conflicting goals, and choice

between likelihood of success and importance of goal (if achievement is uncertain).

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-34
SLIDE 34

22

Architecture of Utility-Based Agent

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-35
SLIDE 35

23

environment

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-36
SLIDE 36

24

Properties of Environments

  • Accessible/Inaccessible.

– if an agent’s sensors give it access to the complete state of the environment needed to choose an action, the environment is accessible. – such environments are convenient, since the agent is freed from the task of keeping track of the changes in the environment.

slide-37
SLIDE 37

24

Properties of Environments

  • Accessible/Inaccessible.

– if an agent’s sensors give it access to the complete state of the environment needed to choose an action, the environment is accessible. – such environments are convenient, since the agent is freed from the task of keeping track of the changes in the environment.

  • Deterministic/Nondeterministic

– an environment is deterministic if the next state of the environment is completely determined by the current state of the environment and the action

  • f the agent.

– in an accessible and deterministic environment, the agent need not deal with uncertainty.

slide-38
SLIDE 38

24

Properties of Environments

  • Accessible/Inaccessible.

– if an agent’s sensors give it access to the complete state of the environment needed to choose an action, the environment is accessible. – such environments are convenient, since the agent is freed from the task of keeping track of the changes in the environment.

  • Deterministic/Nondeterministic

– an environment is deterministic if the next state of the environment is completely determined by the current state of the environment and the action

  • f the agent.

– in an accessible and deterministic environment, the agent need not deal with uncertainty.

  • Episodic/Sequential

– an episodic environment means that subsequent episodes do not depend on what actions occurred in previous episodes. – such environments do not require the agent to plan ahead.

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-39
SLIDE 39

25

Properties of Environments

  • Static/Dynamic

– a static environment does not change while the agent is thinking. – the passage of time as an agent deliberates is irrelevant. – the agent doesn’t need to observe the world during deliberation.

slide-40
SLIDE 40

25

Properties of Environments

  • Static/Dynamic

– a static environment does not change while the agent is thinking. – the passage of time as an agent deliberates is irrelevant. – the agent doesn’t need to observe the world during deliberation.

  • Discrete/Continuous

– if the number of distinct percepts and actions is limited, the environment is discrete, otherwise it is continuous.

slide-41
SLIDE 41

25

Properties of Environments

  • Static/Dynamic

– a static environment does not change while the agent is thinking. – the passage of time as an agent deliberates is irrelevant. – the agent doesn’t need to observe the world during deliberation.

  • Discrete/Continuous

– if the number of distinct percepts and actions is limited, the environment is discrete, otherwise it is continuous.

  • With/Without intelligent adversaries

– if the environment contains intelligent, adversarial agents, the agent needs to be concerned about strategic, game-theoretic aspects of the environment – most engineering environments don’t have rational adversaries, whereas most social and economic systems get their complexity from the interactions of (more or less) rational agents.

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-42
SLIDE 42

26

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification Solitaire Backgammon Taxi driving Internet shopping Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-43
SLIDE 43

27

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire Backgammon Taxi driving Internet shopping Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-44
SLIDE 44

28

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire no yes no yes yes Backgammon Taxi driving Internet shopping Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-45
SLIDE 45

29

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire no yes no yes yes Backgammon yes no no yes yes Taxi driving Internet shopping Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-46
SLIDE 46

30

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire no yes no yes yes Backgammon yes no no yes yes Taxi driving no no no no no Internet shopping Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-47
SLIDE 47

31

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire no yes no yes yes Backgammon yes no no yes yes Taxi driving no no no no no Internet shopping no no no no no Medical diagnosis

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-48
SLIDE 48

32

Properties of Environments

Accessible Deterministic Episodic Static Discrete Image Classification yes yes yes yes no Solitaire no yes no yes yes Backgammon yes no no yes yes Taxi driving no no no no no Internet shopping no no no no no Medical diagnosis no no no no no ⇒ lots of real-world domains fall into the hardest case

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-49
SLIDE 49

33

summary

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020

slide-50
SLIDE 50

34

Summary

  • An agent perceives and acts in an environment, has an architecture, and is

implemented by an agent program.

  • An ideal agent always chooses the action which maximizes its expected

performance, given its percept sequence so far.

  • An autonomous agent uses its own experience rather than built-in knowledge
  • f the environment by the designer.
  • An agent program maps from percept to action and updates its internal state.

– reflex agent responds immediately to percepts. – goal-based agent acts in order to achieve their goal(s). – utility-based agent maximizes their own utility function.

  • Representing knowledge is important for successful agent design.
  • Most challenging environments are inaccessible, nondeterministic, nonepisodic,

dynamic, and continuous, and contain intelligent adversaries.

Philipp Koehn Artificial Intelligence: Intelligent Agents 18 February 2020