2.2 Intelligent Agents
2.2 Intelligent Agents
2.2 Intelligent Agents
f:P
∗
→A
Table Function
Percept sequence Action Input: location, status
[A, Clean] Right Output: action
[A, Dirty] Suck 1: if status = Dirty then
[B, Clean] Lef t 2: return Suck
[B, Dirty] Suck 3: end if
[A, Clean], [A, Clean] Right 4: if location = A then
[A, Clean], [A, Dirty] Suck 5: return Right
.. .. 6: end if
7: if location = B then
8: return Left
9: end if
• A rational agent chooses whichever action maximizes the expected value of the
performance measure given the percept sequence to date
• Rational 6= omniscient
→ percepts may not supply all relevant information
• Rational 6= clairvoyant
→ action outcomes may not be as expected
• 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
Sensors/Percepts and Effectors/Actions
7
• Goals: Maintain safety, reach destination, maximize profits (fuel, tire wear),
obey laws, provide passenger comfort, ...
• Need a performance measure to say how well a task has been achieved
• A system is autonomous to the extent that its own behavior is determined by its
own experience
• Problems
120
– too big to generate and to store (Chess has about 10 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
Simple Reflex Agents
• 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
Architecture of Agent with Memory
Agents with Memory
• 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
• Examples:
– avoiding contact
– wandering
– exploring
– recognizing doorways
• 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...?”)
Architecture of Utility-Based Agent
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
often need a more general performance measure that describes ”degree of
happiness.”
• Utility function
• 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
of 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.
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.
• 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
of 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.