Smart and Adaptive Cyber-Physical Systems Chapters 1,2 - - PowerPoint PPT Presentation

smart and adaptive cyber physical systems
SMART_READER_LITE
LIVE PREVIEW

Smart and Adaptive Cyber-Physical Systems Chapters 1,2 - - PowerPoint PPT Presentation

Smart and Adaptive Cyber-Physical Systems Chapters 1,2 Cyber-Physical Systems Smart mobility Smart factory Smart grid Smart XX Smart health care Smart city But what does it mean to be smart ?


slide-1
SLIDE 1

Smart and Adaptive Cyber-Physical Systems

Chapters 1,2

slide-2
SLIDE 2

Cyber-Physical Systems

§ Smart mobility

§ Smart factory § Smart grid § Smart health care § Smart city

But what does it mean to be smart ?

⎫ ⎬ ⎪ ⎪ ⎭ ⎪ ⎪ Smart XX

slide-3
SLIDE 3

Being Smart

§ How do we perceive, understand, predict and manipulate § A world far larger and more complicated than ourselves?

Understanding human intelligence

§ Originally: the aim of artificial intelligence § Nowadays: control and decision theory, CPS theory, etc

Building intelligent systems We call ourselves Home Sapiens = Wise Man

slide-4
SLIDE 4

Thinking Humanly

Make computers think, make machines with mind Automation of all activities we associate with human thinking

Thinking Rationally

Study of mental faculties through computational models Computations allowing to perceive, act and reason

Being Smart (Artificial Intelligence)

slide-5
SLIDE 5

Being Smart (Artificial Intelligence)

Thinking Humanly

Make computers think, make machines with mind Automation of all activities we associate with human thinking

Thinking Rationally

Study of mental faculties through computational models Computations allowing to perceive, act and reason

Acting Humanly

Machines that perform actions requiring intelligence Make computers do things at which we are currently better

Acting Rationally

The study of the design of intelligent agents Concerned with intelligent behavior in artifacts

slide-6
SLIDE 6

Acting Humanly

§ After posing some written questions a human interrogator § Cannot tell if the written responses came from a computer

Turing Test (Proposed in 1950)

§ Natural language processing: To communicate § Knowledge representation: To store what it knows § Automated reasoning: To draw new conclusions § Machine learning: To adapt to new circumstances

A Computer Needs the Following Capabilities

slide-7
SLIDE 7

Acting Humanly

§ A video signal: To test subject’s perceptual abilities § A hatch: To pass physical objects to the subject

Total Turing Test Contains in Addition

§ Computer vision: To perceive objects § Robotics: To manipulate objects and move about

A Computer Needs Additional Capabilities

slide-8
SLIDE 8

Thinking Humanly

§ Introspection: Try to catch our own thoughts § Psychological experiments: Observing a person in action § Brain imaging: Observing the brain in action

Need to get inside the actual working of human minds

§ Computer models: From artificial intelligence § Experimental techniques: From psychology § In order to: Construct precise and testable theories

Cognitive science brings together

slide-9
SLIDE 9
slide-10
SLIDE 10

Thinking Rationally

§ Pattern for right thinking: Always yield correct conclusions § Main pattern: § Problem: World is not black and white (qualitative)

The syllogism of Greek philosopher Aristotle

§ Main pattern: § Advantage: Shades of gray (quantitative)

The extension of syllogisms to a logic of science

A ∧ (A → B) = A ∧B = B ∧ (B → A) P(A) P(B | A) = P(A ∧B) = P(B) P(A |B)

slide-11
SLIDE 11

Acting Rationally

§ Operates autonomously and persists over long time § Perceives, acts upon and adapts to its environment § Creates and pursues its own goals

Computer Agent Latin agere = doing

Agent Sensors Actuators

Percepts Actions

?

Environment

slide-12
SLIDE 12
slide-13
SLIDE 13

Acting Rationally

§ Acts so as to achieve the best outcome, and when § There is uncertainty, the best expected outcome

Rational Agent Extension of Computer Agent

Agent Sensors Actuators

Percepts Actions

?

Environment

slide-14
SLIDE 14

Advantages of Rational Agents

§ It is more general than the laws-of-thought approach

  • Correct inference is just one way of achieving rationality

§ It is more amenable to scientific development

  • Rationality is mathematically well defined and very general

The rational-agent approach has two advantages

Agent Sensors Actuators

Percepts Actions

?

Environment

In this class: Smart = Rational !

slide-15
SLIDE 15

Rational Agent (RA)

§ The performance measure that defines success § The agent’s prior knowledge of the environment § The actions that the agent can perform § The agent’s percept sequence to date

What is rational at any given time depends on

§ Select an action that is expected to § Maximize its performance measure, given § The evidence provided by the percept sequence and § Whatever built-in knowledge the agent has

For each percept sequence a RA should

slide-16
SLIDE 16

Task Environment (TE)

PEAS=(Performance, Environment, Actuators, Sensors)

Agent Type Performance Measure Environment Type Actuators Type Sensors Type Taxi Driver Safe, Fast, Legal, Comfortable trip, Maximize profits Roads, Other Traffic, Pedestrians, Customers Steering, Accelerator, Brake, Signal, Horn, Display Cameras, Sonar, Speedometer, GPS, Accelerometer, Engine Sensors

slide-17
SLIDE 17

Task Environment (TE)

PEAS=(Performance, Environment, Actuators, Sensors)

Agent Type Performance Measure Environment Type Actuators Type Sensors Type Taxi Driver Safe, Fast, Legal, Comfortable trip, Maximize profits Roads, Other Traffic, Pedestrians, Customers Steering, Accelerator, Brake, Signal, Horn, Display Cameras, Sonar, Speedometer, GPS, Accelerometer, Engine Sensors Medical Diagnosis Healthy PaJent PaJent, Hospital, Physician, Staff Diagnoses, Treatments PaJent Answers, Monitors

slide-18
SLIDE 18

Task Environment (TE)

PEAS=(Performance, Environment, Actuators, Sensors)

Agent Type Performance Measure Environment Type Actuators Type Sensors Type Taxi Driver Safe, Fast, Legal, Comfortable trip, Maximize profits Roads, Other Traffic, Pedestrians, Customers Steering, Accelerator, Brake, Signal, Horn, Display Cameras, Sonar, Speedometer, GPS, Accelerometer, Engine Sensors Medical Diagnosis Healthy PaJent PaJent, Hospital, Physician, Staff Diagnoses, Treatments PaJent Answers, Monitors Refinery Controller Purity, Yield, Safety Refinery, Operators Valves, Pumps, Heaters Temperature, Pressure

slide-19
SLIDE 19

Task Environment (TE)

PEAS=(Performance, Environment, Actuators, Sensors)

Agent Type Performance Measure Environment Type Actuators Type Sensors Type Taxi Driver Safe, Fast, Legal, Comfortable trip, Maximize profits Roads, Other Traffic, Pedestrians, Customers Steering, Accelerator, Brake, Signal, Horn, Display Cameras, Sonar, Speedometer, GPS, Accelerometer, Engine Sensors Medical Diagnosis Healthy PaJent PaJent, Hospital, Physician, Staff Diagnoses, Treatments PaJent Answers, Monitors Refinery Controller Purity, Yield, Safety Refinery, Operators Valves, Pumps, Heaters Temperature, Pressure Interactive English Tutor Student’s Score

  • n a Test

Set of Students, TesJng Agency Display Exercises SuggesJons Keyboard Entry

slide-20
SLIDE 20

TE: Observable-Unobservable

§ Sensors always capture complete environment’s state § Effective if all aspects relevant to action choices detected § Relevance depends on the performance measure § Agent does not need to maintain the world’s state

Fully observable task environments (crossword)

§ Noisy and inaccurate sensors § Parts of the state are simply missing from sensor data § E.g. a taxi driver cannot see what other drivers think

Partially observable task environments (taxi driving)

§ The agent has no sensors

Unobservable task environments

slide-21
SLIDE 21

TE: Single-Multi Agent

§ E.g. an agent solving a crossword puzzle by itself

Single agent task environment

§ E.g. a game of chess is a two agent environment § Agent’s B performance depends on agent’s A performance § Cooperative or competitive multi agents (taxi, chess)

Multi agent task environment

§ Communication is rational as it receives hidden state § Randomization is rational as it avoids predictability

Multi-agent design is quite different

slide-22
SLIDE 22

TE: Certain-Uncertain

§ Environment’s next state completely determined by

  • Current state of the environment
  • The action executed by the agent (e.g. crossword)

§ Uncertainty ignored in fully observable deterministic TE

Deterministic task environments (certain)

§ Partially observable environments appear as stochastic § In most real situations this is the case, e.g. in taxi driving

Stochastic task environments (uncertain)

§ Uncertain but no probabilities attached (e.g. chess) § The agent needs to succeed for all possible outcomes

Nondeterministic task environments (uncertain)

slide-23
SLIDE 23

TE: Episodic-Sequential

§ Agent’s experience divided in episodes. In each:

  • It first receives a single percept from its sensors
  • It than performs a single action with its actuators

§ Next episode does not depend on actions in previous ones § Many classification tasks are episodic

  • Spotting defective parts on an assembly line

Episodic task environments

§ Current decision could affect all future decisions

  • Crossword, chess game and taxi driving are sequential

§ In sequential environments one needs to think ahead

Sequential task environments

slide-24
SLIDE 24

TE: Static-Dynamic

§ Environment doesn’t change while agent deliberates

  • Need not look at the world while deciding on an action
  • Need not worry about the passage of time
  • E.g. crossword puzzles

Static task environments

§ Environment can change while agent deliberates

  • Are continuously asking the agent what it wants to do
  • If it hasn’t decided yet, that counts as deciding to do nothing
  • E.g. taxi driving

Dynamic task environments

§ Environment cannot change in time but agent’s score can

  • E.g. chess playing with a clock

Semi-dynamic task environments

slide-25
SLIDE 25

TE: Discrete-Continuous

§ State of environment is discrete § Time of environment is discrete § Percepts and/or actions are discrete

  • E.g. chess has discrete state, percepts and actions

Discrete task environments

§ State of environment is continuous § Time of environment is continuous § Percepts and/or actions are continuous

  • E.g. taxi driving is continuous state, time, percepts and actions

Continuous task environments

slide-26
SLIDE 26

Types of Task Environments

Task Env

Observ Agents

Stochastic Episodic Static Discrete

Crossword Chess (clock) Fully Fully Single MulJ DeterminisJc DeterminisJc SequenJal SequenJal StaJc Semi Discrete Discrete

slide-27
SLIDE 27

Types of Task Environments

Task Env

Observ Agents

Stochastic Episodic Static Discrete

Crossword Chess (clock) Fully Fully Single MulJ DeterminisJc DeterminisJc SequenJal SequenJal StaJc Semi Discrete Discrete Poker Backgammon ParJally Fully MulJ MulJ StochasJc StochasJc SequenJal SequenJal StaJc StaJc Discrete Discrete

slide-28
SLIDE 28

Types of Task Environments

Task Env

Observ Agents

Stochastic Episodic Static Discrete

Crossword Chess (clock) Fully Fully Single MulJ DeterminisJc DeterminisJc SequenJal SequenJal StaJc Semi Discrete Discrete Poker Backgammon ParJally Fully MulJ MulJ StochasJc StochasJc SequenJal SequenJal StaJc StaJc Discrete Discrete Taxi-driving Medical-diag ParJally ParJally MulJ Single StochasJc StochasJc SequenJal SequenJal Dynamic Dynamic ConJnuous ConJnuous

slide-29
SLIDE 29

Types of Task Environments

Task Env

Observ Agents

Stochastic Episodic Static Discrete

Crossword Chess (clock) Fully Fully Single MulJ DeterminisJc DeterminisJc SequenJal SequenJal StaJc Semi Discrete Discrete Poker Backgammon ParJally Fully MulJ MulJ StochasJc StochasJc SequenJal SequenJal StaJc StaJc Discrete Discrete Taxi-driving Medical-diag ParJally ParJally MulJ Single StochasJc StochasJc SequenJal SequenJal Dynamic Dynamic ConJnuous ConJnuous Image-analysis Part-pick-robot Fully ParJally Single Single DeterminisJc StochasJc Episodic Episodic Semi Dynamic ConJnuous ConJnuous

slide-30
SLIDE 30

Types of Task Environments

Task Env

Observ Agents

Stochastic Episodic Static Discrete

Crossword Chess (clock) Fully Fully Single MulJ DeterminisJc DeterminisJc SequenJal SequenJal StaJc Semi Discrete Discrete Poker Backgammon ParJally Fully MulJ MulJ StochasJc StochasJc SequenJal SequenJal StaJc StaJc Discrete Discrete Taxi-driving Medical-diag ParJally ParJally MulJ Single StochasJc StochasJc SequenJal SequenJal Dynamic Dynamic ConJnuous ConJnuous Image-analysis Part-pick-robot Fully ParJally Single Single DeterminisJc StochasJc Episodic Episodic Semi Dynamic ConJnuous ConJnuous Refinery ctrl English tutor ParJally ParJally Single MulJ StochasJc StochasJc SequenJal SequenJal Dynamic Dynamic ConJnuous Discrete

slide-31
SLIDE 31

Simple Reflex Agent (Episodic)

Agent Sensors Actuators

Percepts Actions

What the world is like now What action I should do now Condition-action rules function Simple-Reflex-Agent (percept) returns action persistent set-of-condition-action rules state = Interpret-Input(percept) rule = Rule-Match(state, rules) return rule.Action Current internal state Background information

slide-32
SLIDE 32

Simple Reflex Agent (Episodic)

Agent Sensors Actuators

Percepts Actions

What the world is like now What action I should do now Condition-action rules

  • Very simple and very fast as a consequence
  • However, one can do better by learning front-car behavior

Example: The car in front is braking

slide-33
SLIDE 33

Model-Based Reflex Agent (Seq)

Agent Sensors Actuators

Percepts Actions

What the world is like now What action I should do now Condition-action rules state, action How the world evolves What my actions do

  • Keep track of the part of the world it can’t see now
  • The agent should maintain the previous state and action
  • Which depend on the percept history. Braking car: 1-2 frames

The most effective way to handle partial observability

Next state model Current

  • utput model
slide-34
SLIDE 34

Model-Based Reflex Agent (Seq)

function Model-Based-Reflex-Agent (percept) returns action persistent state, action, model, rules state = Update-State(state, action, percept, model) rule = Rule-Match(state, rules) action = rule.Action return action

Agent Sensors Actuators

Percepts Actions

What the world is like now What action I should do now Condition-action rules state, action How the world evolves What my actions do State-based description

  • f an agent

(white box)

slide-35
SLIDE 35

Model-Based Reflex Agent (Seq)

function Model-Based-Reflex-Agent (percepts) returns actions

Agent

Percepts Actions

Input-output description of an agent (black box) This is what is observable and on what the performance is measured!

slide-36
SLIDE 36

Model-Based Goal-Based Agent

Agent Sensors Actuators

Percepts Actions

What action I should do now Condition-action rules state, action How the world evolves What the world is like now What my actions do

  • At a road junction a car can turn left, right or go straight

Knowing internal state not always enough to decide what to do

slide-37
SLIDE 37

Model-Based Goal-Based Agent

Agent Sensors Actuators

Percepts Actions

What action I should do now What are my goals state, action How the world evolves What the world is like now What my actions do

  • At a road junction a car can turn left, right or go straight

Knowing internal state not always enough to decide what to do

Goal information

  • Correct decision depends on where the car wants to go
slide-38
SLIDE 38

Model-Based Goal-Based Agent

Agent Sensors Actuators

Percepts Actions

What action I should do now What are my goals state, action How the world evolves What it will be if I do action A What the world is like now What my actions do

Knowing internal state not always enough to decide what to do

Consideration

  • f the future
  • Search and planning involves consideration of the future
  • At a road junction a car can turn left, right or go straight
  • Correct decision depends on where the car wants to go
slide-39
SLIDE 39

Model-Based Goal-Based Agent

Agent Sensors Actuators

Percepts Actions

What action I should do now What are my goals state, action How the world evolves What it will be if I do action A What the world is like now What my actions do

Goal-based agent versus model-based reflex agent

  • Less efficient but more flexible as knowledge is explicitly represented
  • Goals alone are not sufficient as they do not consider performance
  • Taxi driving: faster, cheaper, more reliable, safer.
slide-40
SLIDE 40

Model-Based Utility-Based Agent

Agent Sensors Actuators

Percepts Actions

How happy I will be in this state What is my utility state, action How the world evolves What it will be if I do action A What the world is like now What my actions do What action I should do now Performance measure (int)

  • Goals provide only a crude binary distinction: happy, unhappy
  • Utilities provide a more general internalization of performance measure
slide-41
SLIDE 41

Model-Based Utility-Based Agent

Agent Sensors Actuators

Percepts Actions

How happy I will be in this state What is my utility state, action How the world evolves What it will be if I do action A What the world is like now What my actions do What action I should do now

Is it that simple? Just build agents maximizing expected utility?

  • Keep track of environment: perception, modeling, reasoning, learning
slide-42
SLIDE 42

Summary: RaJonal Agent

Controller

R(b), π(b)

Plant

P(s’|s,a), P(e|s)

Filter

P(b|e,a)

a e b e

Planner

Map

reference path

CPS

=

RaJonal Agent Plant (Environment)

P(s’|s,a), P(e|s)

sensors actuators

How the world evolves What my actions do What state if I see e? What utility in b? What action in b? What overall goal?

Percepts Actions

e

slide-43
SLIDE 43

Model-Based Utility-Based Agent

Agent Sensors Actuators

Percepts Actions

How happy I will be in this state What is my utility state, action How the world evolves What it will be if I do action A What the world is like now What my actions do What action I should do now

Hoiw does one develop such agents?

  • Turing: Manually is too tedious. One should learn them
slide-44
SLIDE 44

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator

Turing proposes to build learning machines and teach them

  • 4 components: Learning, performance, and critic elements, problem gen.
slide-45
SLIDE 45

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator Responsible for making improvements

slide-46
SLIDE 46

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator Responsible for selecting external actions

slide-47
SLIDE 47

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator How performance element should be changed to do better?

slide-48
SLIDE 48

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator Suggest actions that will lead to new and informative experiences

slide-49
SLIDE 49

General Learning Agent

Agent Sensors Actuators

Percepts Actions

Learning Element Performance Element Critic feedback learning

changes knowledge

goals performance standard Problem Generator

Preferred method of creating agents in many AI areas

  • Advantage: Allows the agent to operate in initially unknown environments
slide-50
SLIDE 50
slide-51
SLIDE 51
slide-52
SLIDE 52
slide-53
SLIDE 53
slide-54
SLIDE 54
slide-55
SLIDE 55
slide-56
SLIDE 56
slide-57
SLIDE 57
slide-58
SLIDE 58
slide-59
SLIDE 59
slide-60
SLIDE 60
slide-61
SLIDE 61
slide-62
SLIDE 62
slide-63
SLIDE 63
slide-64
SLIDE 64
slide-65
SLIDE 65
slide-66
SLIDE 66
slide-67
SLIDE 67
slide-68
SLIDE 68
slide-69
SLIDE 69
slide-70
SLIDE 70
slide-71
SLIDE 71
slide-72
SLIDE 72
slide-73
SLIDE 73
slide-74
SLIDE 74
slide-75
SLIDE 75
slide-76
SLIDE 76
slide-77
SLIDE 77
slide-78
SLIDE 78
slide-79
SLIDE 79
slide-80
SLIDE 80
slide-81
SLIDE 81
slide-82
SLIDE 82
slide-83
SLIDE 83
slide-84
SLIDE 84
slide-85
SLIDE 85
slide-86
SLIDE 86
slide-87
SLIDE 87
slide-88
SLIDE 88
slide-89
SLIDE 89
slide-90
SLIDE 90
slide-91
SLIDE 91
slide-92
SLIDE 92
slide-93
SLIDE 93
slide-94
SLIDE 94
slide-95
SLIDE 95
slide-96
SLIDE 96
slide-97
SLIDE 97
slide-98
SLIDE 98
slide-99
SLIDE 99
slide-100
SLIDE 100
slide-101
SLIDE 101
slide-102
SLIDE 102