Intelligent Agents Chapter 2
CIS Intro to AI - Fall Outline Brief Review Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types Agent types
CIS Intro to AI - Fall Rational behavior: doing whatever is expected to maximize goal achievement, given the available information This course is about effective programming techniques for designing rational agents Review I: AI as Acting Rationally Thinking humanlyThinking rationally Acting humanlyActing rationally
CIS Intro to AI - Fall Review II: Rational agents An agent is an entity that perceives and acts Abstractly, an agent is a function from percept histories to actions: [f: P* A ] For any given class of environments and tasks, we seek the agent (or class of agents) with the best performance
CIS Intro to AI - Fall Agents An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators Human agent: Sensors: eyes, ears,... Actuators: hands, legs, mouth, … Robotic agent: Sensors: cameras and infrared range finders Actuators: various motors Agents include humans, robots, softbots, thermostats, …
CIS Intro to AI - Fall Agents and environments An agent is specified by an agent function f that maps sequences of percepts Y to actions a from a set A : Y={y 0, y 1, …, y t } A={a 0, a 1, …, a k }
CIS Intro to AI - Fall Agent function & program The agent program runs on the physical architecture to produce f agent = architecture + program “Easy” solution: table that maps every possible sequence Y to an action a One small problem: exponential in length of Y
CIS Intro to AI - Fall Example: A Vacuum-cleaner agent Percepts:location and contents, e.g., (A,dirty) (Idealization: locations are discrete) Actions: move, clean, do nothing: LEFT, RIGHT SUCK NOP AB
CIS Intro to AI - Fall Vacuum-cleaner world: agent function
CIS Intro to AI - Fall Rational agents II Rational Agent: For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure. Performance measure: An objective criterion for success of an agent's behavior, given the evidence provided by the percept sequence. A performance measure for a vacuum-cleaner agent might include one or more of: +1 point for each clean square in time T +1 point for clean square, -1 for each move for more than k dirty squares
CIS Intro to AI - Fall Rationality is not omniscience Ideal agent: maximizes actual performance, but needs to be omniscient. Usually impossible….. — But consider tic-tac-toe agent… Rationality Success Agents can perform actions in order to modify future percepts so as to obtain useful information (information gathering, exploration) An agent is autonomous if its behavior is determined by its own experience (with ability to learn and adapt)
CIS Intro to AI - Fall Task environment To design a rational agent we need to specify a task environment a problem specification for which the agent is a solution PEAS : to specify a task environment P erformance measure E nvironment A ctuators S ensors
CIS Intro to AI - Fall PEAS: Specifying an automated taxi driver P erformance measure: ? E nvironment: ? A ctuators: ? S ensors: ?
CIS Intro to AI - Fall PEAS: Specifying an automated taxi driver P erformance measure: safe, fast, legal, comfortable, maximize profits E nvironment: ? A ctuators: ? S ensors: ?
CIS Intro to AI - Fall PEAS: Specifying an automated taxi driver P erformance measure: safe, fast, legal, comfortable, maximize profits E nvironment: roads, other traffic, pedestrians, customers A ctuators: ? S ensors: ?
CIS Intro to AI - Fall PEAS: Specifying an automated taxi driver P erformance measure: safe, fast, legal, comfortable, maximize profits E nvironment: roads, other traffic, pedestrians, customers A ctuators: steering, accelerator, brake, signal, horn S ensors: ?
CIS Intro to AI - Fall PEAS: Specifying an automated taxi driver P erformance measure: safe, fast, legal, comfortable, maximize profits E nvironment: roads, other traffic, pedestrians, customers A ctuators: steering, accelerator, brake, signal, horn S ensors: cameras, sonar, speedometer, GPS
CIS Intro to AI - Fall PEAS: Another example Agent : Medical diagnosis system P erformance measure: Healthy patient, minimize costs, lawsuits E nvironment: Patient, hospital, staff A ctuators: Screen display (form including: questions, tests, diagnoses, treatments, referrals) S ensors: Keyboard (entry of symptoms, findings, patient's answers)
CIS Intro to AI - Fall Environment types: Definitions I Fully observable (vs. partially observable): An agent's sensors give it access to the complete state of the environment at each point in time. Deterministic (vs. stochastic): The next state of the environment is completely determined by the current state and the action executed by the agent. (If the environment is deterministic except for the actions of other agents, then the environment is strategic ) Episodic (vs. sequential): The agent's experience is divided into atomic "episodes" during which the agent perceives and then performs a single action, and the choice of action in each episode depends only on the episode itself.
CIS Intro to AI - Fall Environment types: Definitions II Static (vs. dynamic): The environment is unchanged while an agent is deliberating. The environment is semidynamic if the environment itself does not change with the passage of time but the agent's performance score does. Discrete (vs. continuous): A limited number of distinct, clearly defined percepts and actions. Single agent (vs. multiagent): An agent operating by itself in an environment. (See examples in AIM, however I don’t agree with some of the judgments)
CIS Intro to AI - Fall Agent types Goal of AI: given a PEAS task environment, construct agent function f, design an agent program that implements f on a particular architecture Four basic agent types in order of increasing generality: Simple reflex Model-based reflex Goal-based Utility-based
CIS Intro to AI - Fall Simple reflex agent function REFLEX_VACUUM_AGENT( percept ) returns an action (location,status) = UPDATE_STATE( percept ) if status = DIRTY then return SUCK; else if location = A then return RIGHT; else if location = B then return LEFT;
CIS Intro to AI - Fall Model-based reflex agents New
CIS Intro to AI - Fall Goal-based agents New
CIS Intro to AI - Fall Utility-based agents New
CIS Intro to AI - Fall Learning agents incorporate others Any other agent!