Artificial Intelligence (AI)�
Chapter Two
Intelligent Agent
Content
Intelligent Agents
3
Types of Intelligent Agents
4
Cont.
Cont.
6
| Human beings | Agents |
Sensors | Eyes, Ears, Nose | Cameras, Scanners, Mic, infrared range finders |
Effectors | Hands, Legs, Mouth | Various Motors (artificial hand, artificial leg), Speakers, Radio |
Examples of agents in different types of applications
7
Agent type
Percepts
Actions
Goals
Environment
Medical diagnosis system
Symptoms, patient's answers
Questions, tests, treatments
Healthy patients, minimize costs
Patient, hospital
Interactive English tutor
Typed words, questions, suggestions
Write exercises, suggestions, corrections
Maximize student's score on exams
Set of students, materials
Part-picking robot
Pixels of varying intensity
Pick up parts and sort into bins
Place parts in correct bins
Conveyor belts with parts
Satellite image analysis system
Pixels intensity, color
Print a categorization of scene
Correct categorization
Images from orbiting satellite
Refinery controller
Temperature, pressure readings
Open, close valves; adjust temperature
Maximize purity, yield, safety
Refinery
Rationality vs. Omniscience
8
Example
9
Rational agent
10
Performance measure
11
Designing an agent
12
Program Skeleton of Agent
13
function SKELETON-AGENT (percept) returns action
static: knowledge, the agent’s memory of the world
knowledge🡨 UPDATE-KNOWLEDGE(knowledge, percept)
action 🡨 SELECT-BEST-ACTION(knowledge)
knowledge🡨 UPDATE-KNOWLEDGE (knowledge, action)
return action
NOTE: Performance measure is not part of the agent
Intelligent Agents:
Following are the main four rules for an AI agent:
14
Rational agent PEAS Representation
P: Performance measure
E: Environment
A: Actuators
S: Sensors
PEAS for self-driving cars
16
Examples of agents structure and sample PEAS
17
Classes of Environments
18
Fully observable vs. partially observable
19
Deterministic vs. stochastic
20
Episodic vs. Sequential
21
Static vs. Dynamic
22
Discrete vs. Continuous
23
Environment Types
24
Problems | Observable | Deterministic | Episodic | Static | Discrete |
Crossword�Puzzle | Yes | Yes | No | Yes | Yes |
Part-picking�robot | No | No | Yes | No | No |
Web shopping�program | No | No | No | No | Yes |
Tutor | No | No | No | Yes | Yes |
Medical Diagnosis | No | No | No | No | No |
Taxi driving | No | No | No | No | No |
Below are lists of properties of a number of familiar environments
Five types of agents
Simple reflex agents
E.g. Smart light bulb, smart thermostat,
* If the car in front brakes, and its brake lights come on, then the driver should notice this and initiate braking,
26
Simple Reflex agent
Cont
27
Model-based reflex agents
Model-Based Reflex Agent
Is it a parking light? Is it a brake light? Is it a turn signal light?
28
Cont
29
Cont
function REFLEX-AGENT-WITH-STATE (percept) returns action
static: state, a description of the current world state
rules, a set of condition-action rules
state 🡨 UPDATE-STATE (state, percept)
rule 🡨 RULE-MATCH (state, rules)
action 🡨 RULE-ACTION [rule]
state 🡨 UPDATE-STATE (state, action)
return action
Thus a state based agent works as follows:
• information comes from sensors - percepts
• based on this, the agent changes the current state of the world
• based on state of the world and knowledge (memory), it triggers actions through the effectors
Goal-based agents
31
Cont.
Goal based agents
E.g. being at the passenger's destination.
32
Structure of a Goal-based agent
33
function GOAL_BASED_AGENT (percept) returns action
state 🡨 UPDATE-STATE (state, percept)
action 🡨 SELECT-ACTION [state, goal]
state 🡨 UPDATE-STATE (state, action)
return action
Utility based agents
Utility based agents
34
Structure of a utility-based agent
35
function UTILITY_BASED_AGENT (percept) returns action
state 🡨 UPDATE-STATE (state, percept)
action 🡨 SELECT-OPTIMAL_ACTION [state, goal]
state 🡨 UPDATE-STATE (state, action)
return action
Learning agents
Learning Agent
37
Thank You!
?