HIT3002: Introduction To Artificial Intelligence
HIT3002: Introduction To Artificial Intelligence
Intelligent Agents
Outline
Agents include human, robots, softbots, thermostats, etc. The agent function maps percept sequence to actions
An agent can perceive its own actions, but not always it effects.
f : P* A
The agent function will internally be represented by the agent program. The agent program runs on the physical architecture to produce f.
Environment: squares A and B Percepts: [location and content] e.g. [A, Dirty] Actions: left, right, suck, and no-op
Percept sequence [A,Clean] [A, Dirty] [B, Clean] [B, Dirty] [A, Clean],[A, Clean] [A, Clean],[A, Dirty]
Action
Right Suck Left Suck Right Suck
function REFLEX-VACUUM-AGENT ([location, status]) return an action if status == Dirty then return Suck else if location == A then return Right else if location == B then return Left
Performance measure according to what is wanted in the environment instead of how the agents should behave.
Rationality
DEF: A rational agent chooses whichever action that maximizes the expected value of the performance measure given the percept sequence to date and prior environment knowledge.
Rationality
Rationality omniscience
An omniscient agent knows the actual outcome
of its actions.
Rationality perfection
Rationality maximizes expected performance,
Rationality
The
Information gathering/exploration
To maximize future rewards
Agent autonomy
Compensate for incorrect prior knowledge
known
Clean squares stay clean, sucking cleans squares Left and Right dont take agent outside environment Available actions: Left, Right, Suck, NoOp Agent knows where it is and whether that location contains dirt
Environments
To
design a rational agent we must specify its task environment. description of the environment:
Performance Environment Actuators Sensors
PEAS
Environments
E.g.
Environment
Streets/freeways, other traffic, pedestrians, weather,
Actuators
Steering, accelerating, brake, horn, speaker/display,
Sensors
Video, sonar, speedometer, engine sensors, keyboard, GPS,
Environment types
Backgammom
Intenet shopping
Taxi
Environment types
Fully vs. partially observable: an environment is full observable when the sensors can detect all aspects that are relevant to the choice of action.
Solitaire
Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent??
Backgammom
Intenet shopping
Taxi
Environment types
Fully vs. partially observable: an environment is full observable when the sensors can detect all aspects that are relevant to the choice of action.
Backgammom FULL
Taxi PARTIAL
Environment types
Deterministic vs. stochastic: if the next environment state is completely determined by the current state the executed action then the environment is deterministic.
Backgammom FULL
Taxi PARTIAL
Environment types
Deterministic vs. stochastic: if the next environment state is completely determined by the current state the executed action then the environment is deterministic.
Backgammom FULL NO
Taxi PARTIAL NO
Environment types
Episodic vs. sequential: In an episodic environment the agents experience can be divided into atomic steps where the agents perceives and then performs A single action. The choice of action depends only on the episode itself Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES Backgammom FULL NO Intenet shopping PARTIAL YES Taxi PARTIAL NO
10
Environment types
Episodic vs. sequential: In an episodic environment the agents experience can be divided into atomic steps where the agents perceives and then performs A single action. The choice of action depends only on the episode itself Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO Backgammom FULL NO NO Intenet shopping PARTIAL YES NO Taxi PARTIAL NO NO
Environment types
Static vs. dynamic: If the environment can change while the agent is choosing an action, the environment is dynamic. Semi-dynamic if the agents performance changes even when the environment remains the same. Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO Backgammom FULL NO NO Intenet shopping PARTIAL YES NO Taxi PARTIAL NO NO
11
Environment types
Static vs. dynamic: If the environment can change while the agent is choosing an action, the environment is dynamic. Semi-dynamic if the agents performance changes even when the environment remains the same. Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO YES Backgammom FULL NO NO YES Intenet shopping PARTIAL YES NO SEMI Taxi PARTIAL NO NO NO
Environment types
Discrete vs. continuous: This distinction can be applied to the state of the environment, the way time is handled and to the percepts/actions of the agent.
Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO YES
Taxi PARTIAL NO NO NO
12
Environment types
Discrete vs. continuous: This distinction can be applied to the state of the environment, the way time is handled and to the percepts/actions of the agent.
Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO YES YES
Taxi PARTIAL NO NO NO NO
Environment types
Single vs. multi-agent: Does the environment contain other agents who are also maximizing some performance measure that depends on the current agents actions? Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO YES YES Backgammom FULL NO NO YES YES Intenet shopping PARTIAL YES NO SEMI YES Taxi PARTIAL NO NO NO NO
13
Environment types
Single vs. multi-agent: Does the environment contain other agents who are also maximizing some performance measure that depends on the current agents actions? Solitaire Observable?? Deterministic?? Episodic?? Static?? Discrete?? Single-agent?? FULL YES NO YES YES YES Backgammom FULL NO NO YES YES NO Intenet shopping PARTIAL YES NO SEMI YES NO Taxi PARTIAL NO NO NO NO NO
Environment types
The
simplest environment is
14
Agent types
Agent types
Function TABLE-DRIVEN_AGENT(percept) returns an action static: percepts, a sequence initially empty table, a table of actions, indexed by percept sequence append percept to the end of percepts action LOOKUP(percepts, table) return action
15
Agent types
Large reduction in possible percept/action situations(next page). Implemented through condition-action rules
If dirty then suck
16
function REFLEX-VACUUM-AGENT ([location, status]) return an action if status == Dirty then return Suck else if location == A then return Right else if location == B then return Left
Will only work if the environment is fully observable otherwise infinite loops may occur.
17
change.
How do actions affect
world.
Model of World
18
Typically investigated in search and planning research. Major difference: future is taken into account Is more flexible since knowledge is represented explicitly and can be manipulated.
utility.
Utility function maps a (sequence of) state(s) onto a real number. Improves on goals:
Selecting between conflicting
goals
Select appropriately between
19
programs
Problem generator: suggests actions that will lead to new and informative experiences.
Exploration vs. exploitation
20
Summary: Agents
An agent perceives and acts in an environment, has an architecture, and is implemented by an agent program. Task environment PEAS (Performance, Environment, Actuators, Sensors) An ideal agent always chooses the action which maximizes its expected performance, given its percept sequence so far. An autonomous learning agent uses its own experience rather than built-in knowledge of the environment by the designer. An agent program maps from percept to action and updates internal state.
Reflex agents respond immediately to percepts. Goal-based agents act in order to achieve their goal(s). Utility-based agents maximize their own utility function.
Representing knowledge is important for successful agent design. The most challenging environments are not fully observable, nondeterministic, dynamic, and continuous
21