Lecture Intelligent Agents
Lecture Intelligent Agents
Lecture Intelligent Agents
f : P∗ → A
• 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
• 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
• 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
• Table-driven agents
use a percept sequence/action table in memory to find the next action. They are implemented by a
(large) lookup table.
Example:
•Scenario: A simple vacuum cleaner robot.
•Lookup Table:
•Percept Sequence: [Dirty, Left] → Action: Suck
•Percept Sequence: [Clean, Left] → Action: Move Right
•Percept Sequence: [Clean, Right] → Action: Move Left
•Percept Sequence: [Dirty, Right] → Action: Suck
•The robot looks up the current state of the room and the robot’s location in the table and takes the
appropriate action.
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
• 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.
Example
• Scenario: Traffic light controller.
• Condition-Action Rules:
• Condition: Traffic light is green, car is in the intersection → Action: Let car pass
• Condition: Traffic light is red, car is approaching → Action: Stop car
• The traffic light controller decides actions purely based on the current state of the light and car’s
position, without any memory of past states.
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
• 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
•Scenario: Self-driving car.
•Internal State: Previous speed, direction, and nearby obstacles.
•Behavior: The car keeps track of its own speed and the surrounding traffic. If a car in front slows down,
the agent compares the current state with previous states and decides whether to slow down or change
lanes.
•This agent requires memory to safely navigate the environment.
• 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.
Example
•Scenario: Chess-playing agent.
•Goal: Checkmate the opponent.
•Behavior: The chess agent evaluates moves by predicting how they will bring it closer to checkmating
the opponent. It doesn’t just react to the current board but works toward achieving its goal in future steps.
•The agent makes moves that not only counter immediate threats but also advance towards the goal of
winning the game.
• Utility-based agents
base their decisions on classic axiomatic utility theory in order to act rationally.
Example:
Scenario: Investment advisor agent.
Utility: Maximize the return on investment while minimizing risk.
Behavior: The agent evaluates multiple investment options, assigning a utility score to each (based on
factors like risk, return, and market conditions) and then recommends the option with the highest expected
utility.
The agent balances different goals (e.g., high returns vs. low risk) to make rational decisions.
Architecture of Table-Driven/Reflex Agent
Architecture of Agent with Memory
Environment
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 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.