Agents Artificial Intelligence @ Allegheny College Janyl Jumadinova - - PowerPoint PPT Presentation

agents
SMART_READER_LITE
LIVE PREVIEW

Agents Artificial Intelligence @ Allegheny College Janyl Jumadinova - - PowerPoint PPT Presentation

Agents Artificial Intelligence @ Allegheny College Janyl Jumadinova 2227 January, 2020 Janyl Jumadinova 2227 January, 2020 1 / 32 Agents What is AI? Systems that think like humans Systems that think rationally Systems that act like


slide-1
SLIDE 1

Agents

Artificial Intelligence @ Allegheny College Janyl Jumadinova 22–27 January, 2020

Janyl Jumadinova Agents 22–27 January, 2020 1 / 32

slide-2
SLIDE 2

What is AI?

Systems that think like humans Systems that think rationally Systems that act like humans Systems that act rationally

Janyl Jumadinova Agents 22–27 January, 2020 2 / 32

slide-3
SLIDE 3

Agents and environments

An agent is something that acts in an environment.

Janyl Jumadinova Agents 22–27 January, 2020 3 / 32

slide-4
SLIDE 4

Agents and environments

An agent is something that acts in an environment. An agent acts intelligently if: its actions are appropriate for its goals and circumstances, it is flexible to changing environments and goals, it learns from experience, it makes appropriate choices given perceptual and computational limitations.

Janyl Jumadinova Agents 22–27 January, 2020 3 / 32

slide-5
SLIDE 5

Agents and environments

? agent percepts sensors actions environment actuators Janyl Jumadinova Agents 22–27 January, 2020 4 / 32

slide-6
SLIDE 6

Agents and environments

? agent percepts sensors actions environment actuators

Agents include humans, robots, softbots, thermostats, etc.

Janyl Jumadinova Agents 22–27 January, 2020 4 / 32

slide-7
SLIDE 7

Agents and environments

? 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 the physical architecture to produce f .

Janyl Jumadinova Agents 22–27 January, 2020 4 / 32

slide-8
SLIDE 8

A vacuum cleaner agent

A B

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

Janyl Jumadinova Agents 22–27 January, 2020 5 / 32

slide-9
SLIDE 9

A vacuum cleaner agent

What is the right function? What makes an agent good or bad, intelligent or stupid?

Janyl Jumadinova Agents 22–27 January, 2020 6 / 32

slide-10
SLIDE 10

Agents and environments

For any given class of environments and tasks, we seek the agent (or class

  • f agents) with the best performance.

Janyl Jumadinova Agents 22–27 January, 2020 7 / 32

slide-11
SLIDE 11

Agents and environments

For any given class of environments and tasks, we seek the agent (or class

  • f agents) with the best performance.

Caveat: computational limitations make perfect rationality unachievable.

Janyl Jumadinova Agents 22–27 January, 2020 7 / 32

slide-12
SLIDE 12

Agents and environments

For any given class of environments and tasks, we seek the agent (or class

  • f agents) with the best performance.

Caveat: computational limitations make perfect rationality unachievable. − → design best program for given machine resources.

Janyl Jumadinova Agents 22–27 January, 2020 7 / 32

slide-13
SLIDE 13

Restricting the definition of an agent: an ideal agent

Autonomy: The ability to operate without the direct intervention of humans or others, and have some kind of control over their actions and internal state.

Janyl Jumadinova Agents 22–27 January, 2020 8 / 32

slide-14
SLIDE 14

Restricting the definition of an agent: an ideal agent

Autonomy: The ability to operate without the direct intervention of humans or others, and have some kind of control over their actions and internal state. (Structural) Reactivity: The ability to perceive the environment, and respond regularly to changes that occur in it.

Janyl Jumadinova Agents 22–27 January, 2020 8 / 32

slide-15
SLIDE 15

Restricting the definition of an agent: an ideal agent

Autonomy: The ability to operate without the direct intervention of humans or others, and have some kind of control over their actions and internal state. (Structural) Reactivity: The ability to perceive the environment, and respond regularly to changes that occur in it. Social Ability: The ability to interact with other agents (and possibly humans).

Janyl Jumadinova Agents 22–27 January, 2020 8 / 32

slide-16
SLIDE 16

Restricting the definition of an agent: an ideal agent

Autonomy: The ability to operate without the direct intervention of humans or others, and have some kind of control over their actions and internal state. (Structural) Reactivity: The ability to perceive the environment, and respond regularly to changes that occur in it. Social Ability: The ability to interact with other agents (and possibly humans). Pro-Activity: The ability to exhibit goal-directed behavior by taking the initiative instead of just acting in response.

Janyl Jumadinova Agents 22–27 January, 2020 8 / 32

slide-17
SLIDE 17

Restricting the definition of an agent: an ideal agent

Other attributes: Mobility: The ability to move around an electronic network.

Janyl Jumadinova Agents 22–27 January, 2020 9 / 32

slide-18
SLIDE 18

Restricting the definition of an agent: an ideal agent

Other attributes: Mobility: The ability to move around an electronic network. Veracity: The assumption of not communicating false information knowingly.

Janyl Jumadinova Agents 22–27 January, 2020 9 / 32

slide-19
SLIDE 19

Restricting the definition of an agent: an ideal agent

Other attributes: Mobility: The ability to move around an electronic network. Veracity: The assumption of not communicating false information knowingly. Benevolence: The assumption of not having conflicting goals.

Janyl Jumadinova Agents 22–27 January, 2020 9 / 32

slide-20
SLIDE 20

Restricting the definition of an agent: an ideal agent

Other attributes: Mobility: The ability to move around an electronic network. Veracity: The assumption of not communicating false information knowingly. Benevolence: The assumption of not having conflicting goals. Rationality: The assumption of acting with a view to achieve its goals, instead of preventing them.

Janyl Jumadinova Agents 22–27 January, 2020 9 / 32

slide-21
SLIDE 21

Agents vs. Objects

“Agent-Oriented Programming”, Y. Shoham Janyl Jumadinova Agents 22–27 January, 2020 10 / 32

slide-22
SLIDE 22

Agents vs. Objects

Object-Oriented Design: objects have identity, state and behaviour and communicate via messages. Agent-Oriented Approach: agents have identity, state (knowledge, beliefs, desires, intentions) and behaviour(goal-achieving, actions, reactions) and communication abilities.

Janyl Jumadinova Agents 22–27 January, 2020 11 / 32

slide-23
SLIDE 23

Agents vs. Objects

Object-Oriented Design: objects have identity, state and behaviour and communicate via messages. Agent-Oriented Approach: agents have identity, state (knowledge, beliefs, desires, intentions) and behaviour(goal-achieving, actions, reactions) and communication abilities. Then, are objects agents?

Janyl Jumadinova Agents 22–27 January, 2020 11 / 32

slide-24
SLIDE 24

Agents vs. Objects

Agents exhibit autonomy, they have control over their state, execution and behavior. Agents exhibit goal-directed, reactive and social behavior. Agents are persistent, self-aware and able to learn and adapt. Control in multi-agent systems is distributed.

Janyl Jumadinova Agents 22–27 January, 2020 12 / 32

slide-25
SLIDE 25

Agents vs. Objects

Agents exhibit autonomy, they have control over their state, execution and behavior. Agents exhibit goal-directed, reactive and social behavior. Agents are persistent, self-aware and able to learn and adapt. Control in multi-agent systems is distributed. Objects do not have these characteristics.

Janyl Jumadinova Agents 22–27 January, 2020 12 / 32

slide-26
SLIDE 26

Agents vs. Objects

Agents have the quality of volition.

  • using AI techniques, intelligent agents are able to judge their results,

and then modify their behavior (and thus their own internal structure) to improve their perceived fitness.

Janyl Jumadinova Agents 22–27 January, 2020 13 / 32

slide-27
SLIDE 27

Agents vs. Objects

Agents have the quality of volition.

  • using AI techniques, intelligent agents are able to judge their results,

and then modify their behavior (and thus their own internal structure) to improve their perceived fitness. Objects are abstractions of things like invoices. Agents are abstractions of intelligent beings – they are essentially anthropomorphic.

Note that this does not mean that agents are intelligent in the human sense,

  • nly that they are modeled after an anthropomorphic architecture, with

beliefs, desires, etc.

Janyl Jumadinova Agents 22–27 January, 2020 13 / 32

slide-28
SLIDE 28

Agents vs. Objects

Group Think Tank

  • Design an object-oriented solution and an agent-oriented solution for a

car wash task.

  • Identify why it is an object-oriented or an agent-oriented solution.
  • List agents and objects for both solutions.

Janyl Jumadinova Agents 22–27 January, 2020 14 / 32

slide-29
SLIDE 29

Getting to an ideal agent

Agent types in order of increasing generality: simple reflex agents reflex agents with state goal-based agents utility-based agents learning agents

Janyl Jumadinova Agents 22–27 January, 2020 15 / 32

slide-30
SLIDE 30

Simple Reflex Agent

Agent Environment

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

Janyl Jumadinova Agents 22–27 January, 2020 16 / 32

slide-31
SLIDE 31

Simple Reflex Agent - An Example

Janyl Jumadinova Agents 22–27 January, 2020 17 / 32

slide-32
SLIDE 32

Reflex Agent 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

Janyl Jumadinova Agents 22–27 January, 2020 18 / 32

slide-33
SLIDE 33

Reflex Agent with State - An Example

Janyl Jumadinova Agents 22–27 January, 2020 19 / 32

slide-34
SLIDE 34

Goal-based Agent

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

Janyl Jumadinova Agents 22–27 January, 2020 20 / 32

slide-35
SLIDE 35

Utility-based Agent

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

Janyl Jumadinova Agents 22–27 January, 2020 21 / 32

slide-36
SLIDE 36

Learning Agent

All the previous agents can be turned into learning agents

Performance standard

Agent Environment

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

Janyl Jumadinova Agents 22–27 January, 2020 22 / 32

slide-37
SLIDE 37

Rational Agents

A rational agent chooses whichever action maximizes the expected value of the performance measure given the percept sequence to date. A system is rational if it does the “right thing”, given what it knows.

Janyl Jumadinova Agents 22–27 January, 2020 23 / 32

slide-38
SLIDE 38

Rationality

Fixed performance measure evaluates the environment sequence

  • ne point per square cleaned up in time T?
  • ne point per clean square per time step, minus one per move?

penalize for > k dirty squares?

Janyl Jumadinova Agents 22–27 January, 2020 24 / 32

slide-39
SLIDE 39

Rationality

Fixed performance measure evaluates the environment sequence

  • ne point per square cleaned up in time T?
  • ne 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

  • f the performance measure given the percept sequence to date

Janyl Jumadinova Agents 22–27 January, 2020 24 / 32

slide-40
SLIDE 40

Rationality

Rational = omniscient – percepts may not supply all relevant information

Janyl Jumadinova Agents 22–27 January, 2020 25 / 32

slide-41
SLIDE 41

Rationality

Rational = omniscient – percepts may not supply all relevant information Rational = clairvoyant – action outcomes may not be as expected

Janyl Jumadinova Agents 22–27 January, 2020 25 / 32

slide-42
SLIDE 42

Rationality

Rational = omniscient – percepts may not supply all relevant information Rational = clairvoyant – action outcomes may not be as expected Hence, rational = successful

Janyl Jumadinova Agents 22–27 January, 2020 25 / 32

slide-43
SLIDE 43

Rationality

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

Janyl Jumadinova Agents 22–27 January, 2020 25 / 32

slide-44
SLIDE 44

PEAS

To design a rational agent, we must specify the task environment: Performance measure Environment Actuators Sensors

Janyl Jumadinova Agents 22–27 January, 2020 26 / 32

slide-45
SLIDE 45

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . .

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-46
SLIDE 46

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-47
SLIDE 47

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment US streets/freeways, traffic, pedestrians, weather, . . .

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-48
SLIDE 48

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment US streets/freeways, traffic, pedestrians, weather, . . . Actuators

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-49
SLIDE 49

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment US streets/freeways, traffic, pedestrians, weather, . . . Actuators steering, accelerator, brake, horn, speaker/display, . . .

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-50
SLIDE 50

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment US streets/freeways, traffic, pedestrians, weather, . . . Actuators steering, accelerator, brake, horn, speaker/display, . . . Sensors

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-51
SLIDE 51

PEAS

To design a rational agent, we must specify the task environment. Consider, e.g., the task of designing an automated taxi: Performance measure safety, destination, profits, legality, comfort, . . . Environment US streets/freeways, traffic, pedestrians, weather, . . . Actuators steering, accelerator, brake, horn, speaker/display, . . . Sensors video, accelerometers, gauges, engine sensors, keyboard, GPS, . . .

Janyl Jumadinova Agents 22–27 January, 2020 27 / 32

slide-52
SLIDE 52

Internet shopping agent?

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-53
SLIDE 53

Internet shopping agent?

Performance measure

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-54
SLIDE 54

Internet shopping agent?

Performance measure price, quality, appropriateness, efficiency, . . .

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-55
SLIDE 55

Internet shopping agent?

Performance measure price, quality, appropriateness, efficiency, . . . Environment

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-56
SLIDE 56

Internet shopping agent?

Performance measure price, quality, appropriateness, efficiency, . . . Environment current and future WWW sites, vendors, shippers, . . .

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-57
SLIDE 57

Internet shopping agent?

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

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-58
SLIDE 58

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

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-59
SLIDE 59

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

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-60
SLIDE 60

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), . . .

Janyl Jumadinova Agents 22–27 January, 2020 28 / 32

slide-61
SLIDE 61

Environment Types

Fully Observable: the agent can observe the state of the world, vs. Partially Observable: there can be a number states that are possible given the agent’s observations

Janyl Jumadinova Agents 22–27 January, 2020 29 / 32

slide-62
SLIDE 62

Environment Types

Fully Observable: the agent can observe the state of the world, vs. Partially Observable: there can be a number states that are possible given the agent’s observations Deterministic: the resulting state is determined from the action and the state, vs. Stochastic: there is uncertainty about the resulting state

Janyl Jumadinova Agents 22–27 January, 2020 29 / 32

slide-63
SLIDE 63

Environment Types

Fully Observable: the agent can observe the state of the world, vs. Partially Observable: there can be a number states that are possible given the agent’s observations Deterministic: the resulting state is determined from the action and the state, vs. Stochastic: there is uncertainty about the resulting state Episodic: agent’s experience is divided into atomic episodes, vs. Sequential: the current decision could affect all future decisions

Janyl Jumadinova Agents 22–27 January, 2020 29 / 32

slide-64
SLIDE 64

Environment Types

Static: environment does not change, vs. Dynamic: the environment can change while an agent is deliberating, vs. Semi: the environment itself does not change with the passage of time but the agent’s performance score does

Janyl Jumadinova Agents 22–27 January, 2020 30 / 32

slide-65
SLIDE 65

Environment Types

Static: environment does not change, vs. Dynamic: the environment can change while an agent is deliberating, vs. Semi: the environment itself does not change with the passage of time but the agent’s performance score does Discrete vs. Continuous: applies to the state of the environment, to the way time is handled, and to the percepts and actions of the agent

Janyl Jumadinova Agents 22–27 January, 2020 30 / 32

slide-66
SLIDE 66

Environment Types

Static: environment does not change, vs. Dynamic: the environment can change while an agent is deliberating, vs. Semi: the environment itself does not change with the passage of time but the agent’s performance score does Discrete vs. Continuous: applies to the state of the environment, to the way time is handled, and to the percepts and actions of the agent Single-agent vs. Multi-agent

Janyl Jumadinova Agents 22–27 January, 2020 30 / 32

slide-67
SLIDE 67

Environment Types

Static: environment does not change, vs. Dynamic: the environment can change while an agent is deliberating, vs. Semi: the environment itself does not change with the passage of time but the agent’s performance score does Discrete vs. Continuous: applies to the state of the environment, to the way time is handled, and to the percepts and actions of the agent Single-agent vs. Multi-agent The environment type largely determines the agent design

Janyl Jumadinova Agents 22–27 January, 2020 30 / 32

slide-68
SLIDE 68

Environment Types

Solitaire Observable Yes Deterministic Yes Episodic No Static Yes Discrete Yes Single-agent Yes

Janyl Jumadinova Agents 22–27 January, 2020 31 / 32

slide-69
SLIDE 69

Environment Types

Solitaire Internet shopping Observable Yes No Deterministic Yes Partly Episodic No No Static Yes Semi Discrete Yes Yes Single-agent Yes Yes (except auctions)

Janyl Jumadinova Agents 22–27 January, 2020 31 / 32

slide-70
SLIDE 70

Environment Types

Solitaire Internet shopping Taxi Observable Yes No No Deterministic Yes Partly No Episodic No No No Static Yes Semi No Discrete Yes Yes No Single-agent Yes Yes (except auctions) No

Janyl Jumadinova Agents 22–27 January, 2020 31 / 32

slide-71
SLIDE 71

Environment Types

Solitaire Internet shopping Taxi Observable Yes No No Deterministic Yes Partly No Episodic No No No Static Yes Semi No Discrete Yes Yes No Single-agent Yes Yes (except auctions) No The real world is partially observable, stochastic, sequential, dynamic, continuous, multi-agent

Janyl Jumadinova Agents 22–27 January, 2020 31 / 32

slide-72
SLIDE 72

Agent Summary

Agents interact with environments through actuators and sensors

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-73
SLIDE 73

Agent Summary

Agents interact with environments through actuators and sensors The agent function describes what the agent does in all circumstances

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-74
SLIDE 74

Agent 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

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-75
SLIDE 75

Agent 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 perfectly rational agent maximizes expected performance

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-76
SLIDE 76

Agent 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 perfectly rational agent maximizes expected performance Agent programs implement (some) agent functions

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-77
SLIDE 77

Agent 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 perfectly rational agent maximizes expected performance Agent programs implement (some) agent functions PEAS descriptions define task environments

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-78
SLIDE 78

Agent 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 perfectly rational agent maximizes expected performance Agent programs implement (some) agent functions PEAS descriptions define task environments Environments are categorized along several dimensions:

  • bservable? deterministic? episodic? static? discrete? single-agent?

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32

slide-79
SLIDE 79

Agent 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 perfectly rational agent maximizes expected performance Agent programs implement (some) 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, learning

Janyl Jumadinova Agents 22–27 January, 2020 32 / 32