0% found this document useful (0 votes)
71 views31 pages

Mansoura University Faculty of Computers and Information Department of Computer Science First Semester: 2020-2021

Here are 3 examples of different agent types: 1. A vacuum cleaning robot is a simple reflex agent that chooses actions like move forward, turn left/right based only on its current sensor readings without any internal model or goals. 2. A chess playing program is a model-based reflex agent as it maintains an internal representation of the chess board and pieces to decide its next move based on the current state and its prediction of future board states. 3. A personal assistant bot like Siri is a goal-based agent as it aims to be helpful, harmless, and honest in assisting users based on their perceived goals while having some internal priorities or utility function to resolve conflicting requests.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views31 pages

Mansoura University Faculty of Computers and Information Department of Computer Science First Semester: 2020-2021

Here are 3 examples of different agent types: 1. A vacuum cleaning robot is a simple reflex agent that chooses actions like move forward, turn left/right based only on its current sensor readings without any internal model or goals. 2. A chess playing program is a model-based reflex agent as it maintains an internal representation of the chess board and pieces to decide its next move based on the current state and its prediction of future board states. 3. A personal assistant bot like Siri is a goal-based agent as it aims to be helpful, harmless, and honest in assisting users based on their perceived goals while having some internal priorities or utility function to resolve conflicting requests.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Mansoura University

Faculty of Computers and Information


Department of Computer Science
First Semester: 2020-2021

[CS324P ] Artificial Intelligence - 1 : INTELLIGENT AGENTS


Grade: Third Year (Computer Science)

Ass. Prof. Taher Hamza


Dr. Sara El-Metwally
Faculty of Computers and Information,
Mansoura University,
Egypt.
Contents

1 Intelligent Agents

2 Agent design

3 Environment Properties

4 Agents Types

2
Intelligent Agents

 An agent is anything that can be viewed as perceiving its


environment through sensors and acting upon that
environment through actuators

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2003.

3
Intelligent Agents

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.

4
Intelligent Agents, examples

Human Agent
Sensors Eyes, ears, nose, skin,..
Actuators Hands, legs, mouth,..

Robotic Agent
Sensors Cameras, infrared ,…
Actuators Various motors, wheels,..

A software Agent
Keystrokes, file contents, received network
Sensors
packages…
displaying on the screen, writing files,
Actuators
sending network packets,…

5
Intelligent Agents

An agent’s behavior is described by the agent function which maps


from percept histories to actions:

f: P*  A

Agent function will be implemented by an agent program which runs


on the physical architecture to produce f

agent = architecture + program

6
Intelligent Agents, example
Vacuum-cleaner agent

 Percepts: location and contents, e.g: [A,Dirty]


 Actions: Left, Right, Suck

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2003.

7
Intelligent Agents
Agent function as look up Table:

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2003.

8
Intelligent Agents

Agent function as look up Table:

 An agent actions is completely specified by the


lookup table

 Drawbacks:
 Huge table
 Take a long time to build the table
 No autonomy

9
Intelligent Agents

Rational Agent:

 For each possible percept sequence, Ideal rational


agent should do whatever action expected to maximize
performance measure, on the basis of built-in
knowledge agent has

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2003.
10
Intelligent Agents

Rational Vs. Perfection !

 Omniscience is the unlimited knowledge

 An omniscient agent knows the actual outcome of its


actions, and can act accordingly

 Omniscience is impossible in reality

11
Agent design
Agent Design (PEAS)

 Performance: How agent be assessed?

 Environment: What elements exists around agent?

 Actuators: How agent change the environment?

 Sensors: How agent sense the environment?

12
Agent design
Agent Design (PEAS)

Automated taxi driver

 Performance: Safe, fast, legal, comfortable trip, profits

 Environment: Roads, other traffic, pedestrians, customers

 Actuators: Steering wheel, accelerator, brake, signal, horn

 Sensors: Cameras, speedometer, GPS, engine sensors, keyboard

13
Agent design
Agent Design (PEAS)

Part-picking robot

 Performance: Percentage of parts in correct bins, speed

 Environment: Conveyor belt with parts, bins

 Actuators: Jointed arm and hand

 Sensors: Camera, joint angle sensors

14
Agent design
Agent Design (PEAS)

Medical diagnosis system

 Performance: Healthy patient, minimize costs, lawsuits

 Environment: Patient, hospital, staff,…..


staff

 Actuators: Screen display (questions, tests, diagnoses,


treatments, referrals)
 Sensors: Keyboard (entry of symptoms, patient's answers)

15
Agent design

Assignment (1)

Design the agent for your projects?


(PEAS)

16
Environment Properties
Environment Properties (ODESDA)

 Observable (or, partially observable)


An agent's sensors give it access to the complete state of
the environment at each point in time

 Deterministic (or, stochastic)


The next state of the environment is completely determined by
the current state and the action executed by the agent

 Episodic (or, sequential)


The agent's experience is divided into episodes, in each episode
the agent receives a percept and then performs a single action

17
Environment Properties
Environment Properties (ODESDA)

 Static (or, Dynamic)


The environment is unchanged while an agent is deliberating

 Discrete (or, Continuous)


A limited number of distinct, clearly defined percepts and actions.

 Agent (single/ multi) (cooperative /competitive)


Number of agent in the environment

18
Note

https://www.geeksforgeeks.org/8-puzzle-problem-using-branch-and-bound/ https://www.fool.com/investing/what-does-the-future-hold-for-self-driving-cars.aspx

19
Environment Properties
Environment Properties (ODESDA)

The environment type largely determines the agent design


The real world is: partially observable, stochastic, sequential,
dynamic, continuous, multi-agent

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.

20
Environment Properties

Assignment (2)

Specify the agent’s environment for your project?


(ODESDA)

21
Agents Types
Agent Basic Types:

Simple reflex agents

Model-based reflex agents

Goal-based agents

Utility-based agents

22
Agents Types
Simple reflex agents

Choose actions only based on the current percept


Ignore the precept history (no memory)
Use condition-action rule
Very simple !
Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.
23
Agents Types
Simple reflex agents: (dis-advantage)

The agent will work only if the correct decision can be made on the
basis of the current percept that is only if the environment is fully
observable

Infinite loops are often unavoidable – escape could be possible by


randomizing

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2003.
24
Agents Types
Model-based reflex agents

Action depend on history or unperceived aspects of the world


Need to maintain internal world model (state)

Without clear goal it is unclear to know what to do!


Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.
25
Agents Types
Goal-based agents

Agents of this kind take future events into consideration

Agent has some goal information, choose actions according to goal

Some solutions to goal states are better than others!


What happed if we have conflicting goals!
Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.
26
Agents Types
Utility-based agents

Try to Maximize agent expected happiness

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.

27
Learning agent

Image Credit: Artificial Intelligence A Modern Approach Second Edition by Stuart J. Russell and Peter Norvig by 2010.

28
Agents Types, example

Consider a chess playing agent, What sort of


agent would it need to be?

Simple-reflex agent: If yes? but some actions require some


memory (e.g. castling in chess)
Model-based reflex agent: If yes? but needs to reason about
future
Goal-based agent: If yes? but what about confliction
goals?
Utility-based agent:
Might consider multiple goals

29
Agents Types

Assignment (3)

Describe the agent type for your project?

Simple-reflex agent? Why? Why not?


Model-based agent? Why? Why not?
Goal-based agent? Why? Why not?
utility-based agent? Why? Why not?

30
31

You might also like