CMSC 671 Fall 2001 Class #2 – Tuesday, September 4.

Slides:



Advertisements
Similar presentations
Mehran University of Engineering and Technology, Jamshoro Artificial Intelligence (Second Term Final Year, 07 CS)
Advertisements

Intelligent Agents Chapter 2.
Intelligent Agents Russell and Norvig: 2
Artificial Intelligence: Chapter 2
Intelligent Agents Chapter 2. Outline Agents and environments Agents and environments Rationality Rationality PEAS (Performance measure, Environment,
Intelligent Agents Russell and Norvig: Chapter 2 CMSC421 – Fall 2005.
CSE 471/598, CBS 598 Intelligent Agents TIP We’re intelligent agents, aren’t we? Fall 2004.
Today’s class What’s an agent? –Definition of an agent –Rationality and autonomy –Types of agents –Properties of environments.
CMSC 471 Intelligent Agents Russell & Norvig Chapter 2.
Artificial Intelligence Stuart Russell and Peter Norvig
ICS-171: Notes 2: 1 Intelligent Agents Chapter 2 ICS 171, Fall 2005.
Intelligent Agents Chapter 2 ICS 171, Fall 2005.
CSE 471/598 Intelligent Agents TIP We’re intelligent agents, aren’t we? Spring 2004.
Intelligent Agents Chapter 2.
Russell and Norvig: Chapter 2 CMSC421 – Fall 2006
Rational Agents (Chapter 2)
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Structure of intelligent agents and environments.
Rational Agents (Chapter 2)
Intelligent Agents Chapter 2. Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types.
CPSC 7373: Artificial Intelligence Jiang Bian, Fall 2012 University of Arkansas at Little Rock.
CMSC 471 Fall 2002 Class #2 – Wednesday, September 4.
CMSC 463 Fall 2010 Class #2.
Intelligent Agents Chapter 2 Intelligent Agents. Slide Set 2: State-Space Search 2 Agents An agent is anything that can be viewed as perceiving its environment.
CHAPTER 2 Intelligent Agents. Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types.
Artificial Intelligence
How R&N define AI Systems that think like humans Systems that think rationally Systems that act like humans Systems that act rationally humanly vs. rationally.
Intelligent Agents Chapter 2 Some slide credits to Hwee Tou Ng (Singapore)
CSC 423 ARTIFICIAL INTELLIGENCE Intelligence Agents.
Chapter 2 Agents & Environments. © D. Weld, D. Fox 2 Outline Agents and environments Rationality PEAS specification Environment types Agent types.
Intelligent Agents Chapter 2. Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment.
Intelligent Agents Chapter 2. How do you design an intelligent agent? Intelligent agents perceive environment via sensors and act rationally on them with.
CMSC 671 Fall 2003 Class #2 – Wednesday, September 3.
Chapter 2 Hande AKA. Outline Agents and Environments Rationality The Nature of Environments Agent Types.
INTELLIGENT AGENTS. Agent and Environment Environment Agent percepts actions ? Sensors Effectors.
Introduction of Intelligent Agents
Instructional Objective  Define an agent  Define an Intelligent agent  Define a Rational agent  Discuss different types of environment  Explain classes.
Rational Agency CSMC Introduction to Artificial Intelligence January 8, 2007.
CMSC 471 Spring 2014 Class #2 Thurs 1/30/14 Intelligent Agents / Lisp Intro Professor Marie desJardins,
Artificial Intelligence
Feng Zhiyong Tianjin University Fall  An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that.
Intelligent Agents Chapter 2. Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types.
Chapter 2 Agents. Intelligent Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment.
CSE 471/598 Intelligent Agents TIP We’re intelligent agents, aren’t we?
Chapter 2 Agents & Environments
Intelligent Agents Chapter 2.
Lecture 2: Intelligent Agents Heshaam Faili University of Tehran What is an intelligent agent? Structure of intelligent agents Environments.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 2 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Intelligent Agents Chapter 2. How do you design an intelligent agent? Definition: An intelligent agent perceives its environment via sensors and acts.
Intelligent Agents. Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types Agent types.
CMSC 671 Fall 2010 Class #2 – Agents / Lisp Wednesday, September 8.
How R&N define AI humanly vs. rationally thinking vs. acting
Intelligent Agents Chapter 2.
Intelligent Agents.
AI as the Design of Agents
Artificial Intelligence Lecture No. 5
Class #2 – Tuesday, September 6
Intelligent Agents Chapter 2.
Intelligent Agents Chapter 2.
Intelligent Agents Chapter 2.
Hong Cheng SEG4560 Computational Intelligence for Decision Making Chapter 2: Intelligent Agents Hong Cheng
Intelligent Agents Chapter 2.
© James D. Skrentny from notes by C. Dyer, et. al.
Class #2 – Tuesday, September 7
Intelligent Agents Chapter 2.
Intelligent Agents Chapter 2.
Intelligent Agents Chapter 2.
Intelligent Agents Chapter 2.
Class #2 – Thursday, September 3
Intelligent Agents Chapter 2.
Presentation transcript:

CMSC 671 Fall 2001 Class #2 – Tuesday, September 4

Today’s class What’s an agent? –Definition of an agent –Rationality and autonomy –Types of agents –Properties of environments Lisp – a second look

Intelligent Agents Chapter 2

How do you design an intelligent agent? Definition: An intelligent agent perceives its environment via sensors and acts rationally upon that environment with its effectors. A discrete agent receives percepts one at a time, and maps this percept sequence to a sequence of discrete actions. Properties –Autonomous –Reactive to the environment –Pro-active (goal-directed) –Interacts with other agents via the environment

What do you mean, sensors/percepts and effectors/actions? Humans –Sensors: Eyes (vision), ears (hearing), skin (touch), tongue (gustation), nose (olfaction), neuromuscular system (proprioception) –Percepts: At the lowest level – electrical signals from these sensors After preprocessing – objects in the visual field (location, textures, colors, …), auditory streams (pitch, loudness, direction), … –Effectors: limbs, digits, eyes, tongue, … –Actions: lift a finger, turn left, walk, run, carry an object, … The Point: percepts and actions need to be carefully defined, possibly at different levels of abstraction

A more specific example: Automated taxi driving system Percepts: Video, sonar, speedometer, odometer, engine sensors, keyboard input, microphone, GPS, … Actions: Steer, accelerate, brake, horn, speak/display, … Goals: Maintain safety, reach destination, maximize profits (fuel, tire wear), obey laws, provide passenger comfort, … Environment: U.S. urban streets, freeways, traffic, pedestrians, weather, customers, … Different aspects of driving may require different types of agent programs!

Rationality An ideal rational agent should, for each possible percept sequence, do whatever actions will maximize its expected performance measure based on (1) the percept sequence, and (2) its built-in and acquired knowledge. Rationality includes information gathering, not "rational ignorance." (If you don’t know something, find out!) Rationality => Need a performance measure to say how well a task has been achieved. Types of performance measures: false alarm (false positive) and false dismissal (false negative) rates, speed, resources required, effect on environment, etc.

Autonomy A system is autonomous to the extent that its own behavior is determined by its own experience. Therefore, a system is not autonomous if it is guided by its designer according to a priori decisions. To survive, agents must have: –Enough built-in knowledge to survive. –The ability to learn.

Examples of Agent Types and their Descriptions

Some Agent Types Table-driven agents –use a percept sequence/action table in memory to find the next action. They are implemented by a (large) lookup table. Simple reflex agents –are based on condition-action rules, implemented with an appropriate production system. They are stateless devices which do not have memory of past world states. Agents with memory –have internal state, which is used to keep track of past states of the world. Agents with goals –are agents that, in addition to state information, have goal information that describes desirable situations. Agents of this kind take future events into consideration. Utility-based agents –base their decisions on classic axiomatic utility theory in order to act rationally.

Simple Reflex Agent Table lookup of percept-action pairs defining all possible condition-action rules necessary to interact in an environment Problems –Too big to generate and to store (Chess has about 10^120 states, for example) –No knowledge of non-perceptual parts of the current state –Not adaptive to changes in the environment; requires entire table to be updated if changes occur –Looping: Can't make actions conditional

A Simple Reflex Agent: Schema

Reflex Agent with Internal State Encode "internal state" of the world to remember the past as contained in earlier percepts Needed because sensors do not usually give the entire state of the world at each input, so perception of the environment is captured over time. "State" used to encode different "world states" that generate the same immediate percept. Requires ability to represent change in the world; one possibility is to represent just the latest state, but then can't reason about hypothetical courses of action Example: Rodney Brooks’s Subsumption Architecture

Agents that Keep Track of the World

Brooks Subsumption Architecture Main idea: build complex, intelligent robots by decomposing behaviors into a hierarchy of skills, each completely defining a complete percept-action cycle for one very specific task. Examples: avoiding contact, wandering, exploring, recognizing doorways, etc. Each behavior is modeled by a finite-state machine with a few states (though each state may correspond to a complex function or module). Behaviors are loosely coupled, asynchronous interactions.

Goal-Based Agent Choose actions so as to achieve a (given or computed) goal. A goal is a description of a desirable situation Keeping track of the current state is often not enough -- need to add goals to decide which situations are good Deliberative instead of reactive May have to consider long sequences of possible actions before deciding if goal is achieved -- involves consideration of the future, “what will happen if I do...?”

Agents with Explicit Goals

Utility-Based Agent When there are multiple possible alternatives, how to decide which one is best? A goal specifies a crude distinction between a happy and unhappy state, but often need a more general performance measure that describes "degree of happiness" Utility function U: State --> Reals indicating a measure of success or happiness when at a given state Allows decisions comparing choice between conflicting goals, and choice between likelihood of success and importance of goal (if achievement is uncertain)

A Complete Utility-Based Agent

Properties of Environments Accessible/Inaccessible. –If an agent's sensors give it access to the complete state of the environment needed to choose an action, the environment is accessible. –Such environments are convenient, since the agent is freed from the task of keeping track of the changes in the environment. Deterministic/Nondeterministic. –An environment is deterministic if the next state of the environment is completely determined by the current state of the environment and the action of the agent. –In an accessible and deterministic environment, the agent need not deal with uncertainty. Episodic/Nonepisodic. –An episodic environment means that subsequent episodes do not depend on what actions occurred in previous episodes. –Such environments do not require the agent to plan ahead.

Properties of Environments Static/Dynamic. –A static environment does not change while the agent is thinking. –The passage of time as an agent deliberates is irrelevant. –The agent doesn’t need to observe the world during deliberation. Discrete/Continuous. –If the number of distinct percepts and actions is limited, the environment is discrete, otherwise it is continuous. With/Without rational adversaries. –Without rationally thinking, adversary agents, the agent need not worry about strategic, game-theoretic aspects of the environment –Most engineering environments are without rational adversaries, whereas most social and economic systems get their complexity from the interactions of (more or less) rational agents. –As example for a game with a rational adversary, try the Prisoner's Dilemma

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete Solitaire Backgammon Taxi driving Internet shopping Medical diagnosis

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete SolitaireNoYes Backgammon Taxi driving Internet shopping Medical diagnosis

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete SolitaireNoYes BackgammonYesNo Yes Taxi driving Internet shopping Medical diagnosis

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete SolitaireNoYes BackgammonYesNo Yes Taxi drivingNo Internet shopping Medical diagnosis

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete SolitaireNoYes BackgammonYesNo Yes Taxi drivingNo Internet shopping No Medical diagnosis

Characteristics of environments AccessibleDeterministicEpisodicStaticDiscrete SolitaireNoYes BackgammonYesNo Yes Taxi drivingNo Internet shopping No Medical diagnosis No → Lots of real-world domains fall into the hardest case!

The Prisoners' Dilemma The two players in the game can choose between two moves, either "cooperate" or "defect". Each player gains when both cooperate, but if only one of them cooperates, the other one, who defects, will gain more. If both defect, both lose (or gain very little) but not as much as the "cheated” cooperator whose cooperation is not returned. If both decision-makers were purely rational, they would never cooperate. Indeed, rational decision-making means that you make the decision which is best for you whatever the other actor chooses.

Summary An agent perceives and acts in an environment, has an architecture and is implemented by an agent program. An ideal agent always chooses the action which maximizes its expected performance, given percept sequence received so far. An autonomous agent uses its own experience rather than built-in knowledge of the environment by the designer. An agent program maps from percept to action & updates its internal state. –Reflex agents respond immediately to percpets. –Goal-based agents act in order to achieve their goal(s). –Utility-based agents maximize their own utility function. Representing knowledge is important for successful agent design. Some environments are more difficult for agents than others. The most challenging environments are inaccessible, nondeterministic, nonepisodic, dynamic, and continuous.

Lisp Revisited A little more slowly this time…

Lisp basics Lisp syntax: parenthesized prefix notation Lisp interpreter: read-eval-print loop Nested evaluation Preventing evaluation (quote and other special forms) Forcing evaluation (eval)

Types of objects NIL and T Symbols –‘a ‘x ‘marie Numbers – Lists –‘(a b c) ‘(2 3 marie) Strings –“This is a string!” Characters –#\x #\- #\B

Built-in functions For numbers –+ - * / incf decf A diversion: destructive functions –(setf x 1) –(setf y (+ x 1)) vs. (setf y (incf x)) For lists –car (first) cdr (rest) second third fourth –length nth –cons append nconc –mapcar mapcan –find remove remove-if Printing: print, format

Special forms Quote Setf / setq Defun Defparameter / defconstant If Cond Case Loop