Lec2 Agents lecture note- COMP 4106 Fall term PDF

Title Lec2 Agents lecture note- COMP 4106 Fall term
Course Artificial Intelligence
Institution Carleton University
Pages 14
File Size 1.1 MB
File Type PDF
Total Downloads 107
Total Views 135

Summary

ba bab aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba aba...


Description

1/12/22

COMP3106: Introduction to Artificial Intelligence Instructor: Yuhong Guo School of Computer Science Carleton University Winter 2022

Intelligent Agents Reading material: Chapter 2

1

1/12/22

Agents and Environments Agent

Environment

Sensors Percepts

? Actuators

Actions

§ An agent perceives its environment through sensors and acts upon it through actuators § Are humans agents? • Sensors = • Actuators =

Agents and Environments Agent

Environment

Sensors Percepts

? Actuators

Actions

§ An agent perceives its environment through sensors and acts upon it through actuators § Are self-driving cars agents? • Sensors = • Actuators =

2

1/12/22

Agents and Environments Agent

Environment

Sensors Percepts

? Actuators

Actions

§ An agent perceives its environment through sensors and acts upon it through actuators § Environment: § Percept: § Percept sequence:

Agent Function § The agent function maps from percept sequences (percept histories) to actions: – f : P* ® A – I.e., the agent’s actual response to percept sequences – External characterization of the agent. An abstract mathematical description Percept

Action

NEXT

NEXT

LEFT

NEXT

LEFT

NEXT

DROP

RIGHT

From Stuart Russell and Dawn Song’s lecture slides

3

1/12/22

Agent Program § The agent program l runs on some machine M to implement f : – f = Agent(l,M) – A concrete implementation, running within some physical system. – Real machines have limited speed and memory, so agent function f depends on M as well as l § Can every agent function be implemented by some agent program? From Stuart Russell and Dawn Song’s lecture slides

Example: Vacuum-cleaner World A

B

• Percepts: [location,status], e.g., [A,Dirty] • Actions: Left, Right, Suck, NoOp § Consider a simple agent function: if the current square is dirty, then suck; otherwise, move to the other square

From Stuart Russell and Dawn Song’s lecture slides

4

1/12/22

A

B

A

B

Example: Vacuum-cleaner World Partial tabulation of

Agent function Percept sequence

Action

[ A,Clean]

Right

[ A,Dirty]

Suck

[ B,Clean]

Left

[ B,Dirty]

Suck

[ A,Clean],[B,Clean]

Left

[ A,Clean],[B,Dirty]

Suck

etc

etc

From Stuart Russell and Dawn Song’s lecture slides

Example: Vacuum-cleaner World Partial tabulation of

Agent function Percept sequence

Action

[ A,Clean]

Right

[ A,Dirty]

Suck

[ B,Clean]

Left

[ B,Dirty]

Suck

[ A,Clean],[B,Clean]

Left

[ A,Clean],[B,Dirty]

Suck

etc

etc

Agent program function Reflex-Vacuum-Agent([location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

From Stuart Russell and Dawn Song’s lecture slides

5

1/12/22

A

B

Example: Vacuum-cleaner World Partial tabulation of

Agent program

Agent function Percept sequence

Action

[ A,Clean]

Right

[ A,Dirty]

Suck

[ B,Clean]

Left

[ B,Dirty]

Suck

[ A,Clean],[B,Clean]

Left

[ A,Clean],[B,Dirty]

Suck

etc

etc

function Reflex-Vacuum-Agent([location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

• We can fill the table above in various ways and have various agent functions • What is the right agent function? From Stuart Russell and Dawn Song’s lecture slides

Concept of Rationality § A rational agent is one that does the right thing. § Use a performance measure to evaluate the sequence of environment states. • A general rule: design performance measures based on what is desired to be achieved in the environment • Vacuum-cleaner agent, two performance measures: (1) one point per square cleaned up (2) one point per clean square per time step, for t = 1,…,T

6

1/12/22

Concept of Rationality § A rational agent is one that does the right thing. § Use a performance measure to evaluate the sequence of environment states. • A general rule: design performance measures based on what is desired to be achieved in the environment • Vacuum-cleaner agent, two performance measures: (1) one point per square cleaned up NO! Reward agent who dumps dirt and cleans it up (2) one point per clean square per time step, for t = 1,…,T

Concept of Rationality § A rational agent selects the action that maximizes the expected value of the performance measure – given the percept sequence to date and prior knowledge of environment § Does Reflex-Vacuum-Agent implement a rational agent function?

7

1/12/22

Concept of Rationality § Are rational agents omniscience?

§ Do rational agents explore and learn?

§ Are rational agents autonomous?

Specify Task Environment - PEAS § Performance measure - Desirable qualities for the agent - Multiple goals, may require tradeoffs § Environment • Real-world environment is often complicated. The more restricted the environment, the easier the agent design § Actuators - Determine actions § Sensors - Provide available percepts

8

1/12/22

PEAS: Automated Taxi § Performance measure - income, happy customer, fines, vehicle cost, insurance premiums… § Environment • Roads, other drivers, police, customers, weather, … § Actuators - Steering, brake, display/speaker, … § Sensors

- Camera, radar, LiDAR, GPS, engine sensors, microphones, touchscreen, speedometer, … Adapted From Stuart Russell and Dawn Song’s lecture slides

PEAS: Medical Diagnosis System § Performance measure § Environment § Actuators § Sensors

9

1/12/22

Properties of Task Environment § Fully observable vs. partially observable § Single-agent vs multiagent § Deterministic vs. nondeterministic/stochastic § Episodic vs. sequential § Static vs. dynamic § Discrete vs. continuous § Known vs. unknown

Properties of Task Environment Task Environ.

Crossword puzzle

Chess with a clock

Taxi driving

Medical diagnosis

Observable Agents Deterministic Episodic Static Discrete

10

1/12/22

Agent Types § agent = architecture + program § Four types of agent programs: – Simple reflex agents – Model-based reflex agents – Goal-based agents – Utility-based agents

Simple Reflex Agents Select actions based on the current percept Agent

Sensors What the world is like now

Environment

Condition-action rules

What action I should do now

Actuators

11

1/12/22

Model-based Reflex Agents Transition model + sensor model, keep track of the state of the world Sensors State How the world evolves

What my actions do

Condition-action rules

Agent

Environment

What the world is like now

What action I should do now Actuators

Goal-based Agents Sensors State How the world evolves

What the world is like now What it will be like if I do action A

Goals

What action I should do now

Agent

Environment

What my actions do

Actuators

12

1/12/22

Utility-based Agents § Sensors State What the world is like now

What my actions do

What it will be like if I do action A

Utility

How happy I will be in such a state

Environment

How the world evolves

What action I should do now

Agent

Actuators

Learning Agents

13

1/12/22

Spectrum of Representation

§ Represent the states and transitions (environment): in an order of increasing complexity and expressive power

Summary § Agents and environments § Rationality § Specify task environment: PEAS § Categorization of task environments § Agent types § All agents can improve their performance through learning

14...


Similar Free PDFs