CS480 Lecture August 29th
CS480 Lecture August 29th
2
Teaching Assistants
Name e-mail Office hours
Donthula, Sumanth [email protected] TBD
Nagaraju, Ashish [email protected] TBD
Sun, Haoyu [email protected] TBD
Vishwanath, Tejass [email protected] TBD
TAs will:
• assist you with your assignments,
• hold office hours to answer your questions,
• grade your lab work (a specific TA will be assigned to you).
3
Turing Test: Optional Viewing Material
4
Plan for Today
Intelligent Agents
5
Identyfing Problems Suitable for AI
Most AI problems will exhibit the following three
characteristics:
tend to be large,
computationally complex and cannot be solved by
a straightforward algorithm,
tend to require a significant amount of human
expertise to be solved
6
Agent-Based Modeling
Source: https://www.youtube.com/watch?v=E_-9hFzmxkw
7
Intelligent (Autonomous) Agents
8
Intelligent Agents in Action
Source: https://www.youtube.com/watch?v=kopoLzvh5jY
9
Agent
Agent:
An agent is just something that acts (from the Latin
agere, to do).
11
AI: Constructing Agents
You can say that:
AI is focused on the study and construction of
agents that do the right thing.
12
Agent
13
Agent
Agent:
An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through actuators.
14
Percepts and Percept Sequences
Percept: content / information that agent’s
sensors are perceiving / capturing currently
15
Percepts, Knowledge, Actions, States
Agent’s choice of action / decision at any given
moment:
CAN depend on:
built-in knowledge
entire percept sequence
CANNOT depend anything it hasn’t perceived
Now what
about this?
17
Agent Function / Program
Agent
Function /
Program
18
Agent Function / Program
Specifying an action choice for every possible
percept sequence would define an agent
19
Vacuum Cleaner Agent Example
20
Vacuum Cleaner Agent Example
21
Actions Have Consequences
An agent can act upon its environment, but how
do we know if the end result is “right”?
After all, actions have consequences: either good
or bad.
Recall that agent actions change environment
state!
If state changes are desirable, an agent performs
well.
Performance measure evaluates state changes.
22
Performance Measure: A Tip
It is better to design performance
measures according to what one actually
wants to be achieved in the
environment, rather than according to
how one thinks the agent should behave.
23
Performance Measure: A Warning
If it is difficult to specify the
performance measure, agents may end
up optimizing a wrong objective. Handle
uncertainty well in such cases.
24
Rationality
Rational decisions at the moment depend on:
The performance measure that defines success
criteria
The agent’s prior knowledge of the environment
The actions that the agent can perform
The agent’s percept sequence so far
25
Rational Agent
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.
26
Rationality in Reality
An omniscient agent will ALWAYS know the
final outcome of its action. Impossible in
reality. That would be perfection.
Rationality maximizes what is EXPECTED to
happen
Perfection maximizes what WILL happen
Performance can be improved by
information gathering and learning
27
Designing the Agent for the Task
28
Task Environment | PEAS
In order to start the agent design process we need
to specify / define:
The Performance measure
The Environment in which the agent will operate
The Actuators that the agent will use to affect
the environment
The Sensors that the agent will use to perceive
the environment
29
PEAS: Taxi Driver Example
30
PEAS: Other Examples
31
Task Environment Properties
Key dimensions by which task environments can be
categorized:
Fully vs partially observable (can be unobservable too)
Single agent vs multiagent
multiagent: competitive vs. cooperative
Deterministic vs. nonderministic (stochastic)
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Known vs. unknown (to the agent)
32
Fully Observable Environment
33
Partially Observable Environment
Source: https://en.wikipedia.org/wiki/Fog_of_war
34
Partially Observable Environment
Undiscovered
Source: https://en.wikipedia.org/wiki/Fog_of_war
35
Single-agent System
36
Single-agent System
Environment
Agent
37
Multiagent System
38
Multiagent System
Agents
Environment
39
Deterministic vs. Nondeterministic
Deterministic environment:
next state is completely determined by the current
state and agent action
deterministic AND fully observable environment: no
need to worry about uncertainty
deterministic AND partially observable ***may***
appear nondeterministic
Nondeterministic (stochastic) environment:
next state is NOT completely determined by the current
state and agent action
40
Episodic vs. Sequential
Episodic environment:
agent experience is divided into individual,
independent, and atomic episodes
one percept - one action.
next action is not a function of previous action: not
necessary to memorize it
Sequential environment:
current decision / action COULD affect all future
decisions / actions
better keep track of it
41
Static vs. Dynamic
Static environment:
environment CANNOT change while the agent is
taking its time to decide
Dynamic environment:
environment CAN change while the agent is taking its
time to decide -> decision / action may be dated
speed is important
42
Discrete vs. Continuous
Discrete environment:
state changes are discrete
time changes are discrete
percepts are discrete
Continuous environment:
state changes are continuous (“fluid”)
time changes are continuous
percepts / actions can be continuous
43
Known vs. Unknown (to Agent)
Known environment:
agent knows all outcomes to its actions (or their
probabilities)
agent “knows how the environment works”
Unknown environment:
agent “doesn’t know all the details about the inner
workings of the environment”
learning and exploration can be necessary
44
Task Environment Characteristics
45
Hardest Case / Problem
Partially observable (incomplete information,
uncertainty)
Multiagent (complex interactions)
Nondeterministic (uncertainty)
Sequential (planning usually necessary)
Dynamic (changing environment, uncertainty)
Continuous (infinite number of states)
Unknown (agent needs to learn / explore,
uncertainty)
46
Designing the Agent for the Task
47
Agent Structure / Architecture
48
Typical Agent Architectures
Simple reflex agent
Model-based reflex agent:
Goal-based reflex agent
Utility-based reflex agent
49
Simple Reflex Agent
50
Simple Reflex Agent
51
Simple Reflex Agent: Challenges?
52
Model-based Reflex Agent
53
Model-based Reflex Agent
54
Model-based Goal-based Agent
55
Model-based Utility-based Agent
56
Model-based Agents: Challenges?
57
Typical Agent Architectures
Simple reflex agent: uses condition-action rules
Model-based reflex agent: keeps track of the
unobserved parts of the environment by maintaing
internal state:
“how the world works”: state transition model
how percepts and environment is related: sensor model
58
Learning Agent
59
Designing the Agent for the Task
60
State and Transition Representations
61
State and Transition Representations
62
Representations and Algorithms
63
Designing the Agent for the Task
64