AI Lec2-1
AI Lec2-1
AI Lec2-1
AI Agents
• Artificial intelligence is defined as the study of
rational agents. A rational agent could be
anything that makes decisions, as a person,
firm, machine, or software. It carries out an
action with the best outcome after
considering past and current percepts (agent’s
perceptual inputs at a given instance).
AI Agents
• An AI system is composed of an agent and its
environment. The agents act in their
environment. The environment may contain
other agents.
• An agent is anything that can be viewed as :
• perceiving its environment
through sensors and
• acting upon that environment
through actuators
AI Agents
• To understand the structure of Intelligent Agents, we should be familiar
with Architecture and Agent programs. Architecture is the machinery that
the agent executes on. It is a device with sensors and actuators, for
example, a robotic car, a camera, a PC. Agent program is an
implementation of an agent function. An agent function is a map from the
percept sequence(history of all that an agent has perceived to date) to an
action.
SimpleReflexAgent(percept)
state = InterpretInput(percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
Example: Vacuum Agent
• Performance?
– 1 point for each square cleaned in time T?
– #clean squares per time step - #moves per time step?
• Environment: vacuum, dirt, multiple areas defined by square
regions
• Actions: left, right, suck, idle
• Sensors: location and contents
– [A, dirty]
ReflexAgentWithState(percept)
state = UpdateDate(state,action,percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
Reflex Vacuum Agent
• If status=Dirty then Suck
else if have not visited other square in >3
time units, go there
Goal-based agents
• A learning agent in AI is the type of agent that can learn from its
past experiences or it has learning capabilities. It starts to act with
basic knowledge and then is able to act and adapt automatically
through learning.
A learning agent has mainly four conceptual components, which
are:
1. Learning element: It is responsible for making improvements by
learning from the environment
2. Critic: The learning element takes feedback from critics which
describes how well the agent is doing with respect to a fixed
performance standard.
3. Performance element: It is responsible for selecting external action
4. Problem Generator: This component is responsible for suggesting
actions that will lead to new and informative experiences.
Learning Agents
Xavier mail delivery robot
• Performance: Completed tasks
• Environment: See for yourself
• Actuators: Wheeled robot actuation
• Sensors: Vision, sonar
• Reasoning: Bayes classification
Pathfinder Medical Diagnosis System