Intelligent Agents Lecture Notes PDF
Document Details
Tags
Summary
These lecture notes provide an overview of intelligent agents, covering motivation, objectives, and different types of agents like simple reflex, model-based, goal-based, utility-based, and learning agents.
Full Transcript
Intelligent Agents Agents 1 Chapter Overview Intelligent Agents ◆ Motivation ◆ Agent Types ◆ Objectives ◆ Simple reflex agent ◆ Model-based reflex agent ◆ Introduction...
Intelligent Agents Agents 1 Chapter Overview Intelligent Agents ◆ Motivation ◆ Agent Types ◆ Objectives ◆ Simple reflex agent ◆ Model-based reflex agent ◆ Introduction ◆ Goal-based agent ◆ Agents and Environments ◆ Utility-based agent ◆ Rationality ◆ Learning agent ◆ Agent Structure ◆ Important Concepts and Terms ◆ Chapter Summary Agents 2 Newell Simon model of human information processing Agents 3 Motivation ◆ agents are used to provide a consistent viewpoint on various topics in the field AI ◆ agents require essential skills to perform tasks that require intelligence ◆ intelligent agents use methods and techniques from the field of AI Agents 4 Objectives ◆ introduce the essential concepts of intelligent agents ◆ define some basic requirements for the behavior and structure of agents ◆ establish mechanisms for agents to interact with their environment Agents 5 What is an Agent? ◆ ingeneral, an entity that interacts with its environment ◆ perception through sensors ◆ actions through effectors or actuators Agents 6 Agents 7 Examples of Agents ◆ human agent ❖ eyes, ears, skin, taste buds, etc. for sensors ❖ hands, fingers, legs, mouth, etc. for actuators ❖ powered by muscles ◆ robot ❖ camera, infrared, bumper, etc. for sensors ❖ wheels, lights, speakers, etc. for actuators ❖ often powered by motors ◆ software agent ❖ functions as sensors ❖ information provided as input to functions in the form of encoded bit strings or symbols ❖ functions as actuators ❖ results deliver the output Agents 8 Agents and Environments ◆ an agent perceives its environment through sensors ◆ the complete set of inputs at a given time is called a percept ◆ the current percept, or a sequence of percepts may influence the actions of an agent ◆ it can change the environment through actuators ◆ an operation involving an actuator is called an action ◆ actions can be grouped into action sequences Agents 9 Agents and Their Actions ◆a rational agent does “the right thing” ◆ the action that leads to the best outcome under the given circumstances ◆ anagent function maps percept sequences to actions ◆ abstract mathematical description ◆ anagent program is a concrete implementation of the respective function ◆ it runs on a specific agent architecture (“platform”) ◆ problems: ◆ whatis “ the right thing” ◆ how do you measure the “best outcome” Agents 10 Performance of Agents ◆ criteriafor measuring the outcome and the expenses of the agent ◆ often subjective, but should be objective ◆ task dependent ◆ time may be important Agents 11 Performance Evaluation Examples ◆ vacuum agent ◆ number of tiles cleaned during a certain period ❖ based on the agent’s report, or validated by an objective authority ❖ doesn’t consider expenses of the agent, side effects ❖ energy, noise, loss of useful objects, damaged furniture, scratched floor ❖ might lead to unwanted activities ❖ agent re-cleans clean tiles, covers only part of the room, drops dirt on tiles to have more tiles to clean, etc. Agents 12 Rational Agent ◆ selects the action that is expected to maximize its performance ◆ based on a performance measure ◆ depends on the percept sequence, background knowledge, and feasible actions Agents 13 Rational Agent Considerations ◆ performance measure for the successful completion of a task ◆ complete perceptual history (percept sequence) ◆ background knowledge ◆ especially about the environment ❖ dimensions, structure, basic “laws” ◆ task, user, other agents ◆ feasible actions ◆ capabilities of the agent Agents 14 Omniscience ◆a rational agent is not omniscient (well informed) ◆ it doesn’t know the actual outcome of its actions ◆ it may not know certain aspects of its environment ◆ rationality takes into account the limitations of the agent ◆ percept sequence, background knowledge, feasible actions ◆ it deals with the expected outcome of actions Agents 15 Environments ◆ determine to a large degree the interaction between the “outside world” and the agent ◆ the “outside world” is not necessarily the “real world” as we perceive it ◆ inmany cases, environments are implemented within computers ◆ they may or may not have a close correspondence to the “real world” Agents 16 Environment Properties ◆ fully observable vs. partially observable ◆ sensors capture all relevant information from the environment ◆ deterministic vs. stochastic (non-deterministic) ◆ changes in the environment are predictable ◆ episodic vs. sequential (non-episodic) ◆ independent perceiving-acting episodes ◆ static vs. dynamic ◆ no changes while the agent is “thinking” ◆ discrete vs. continuous ◆ limited number of distinct percepts/actions ◆ single vs. multiple agents ◆ interaction and collaboration among agents ◆ competitive, cooperative Agents 17 Environment Programs ◆ environment simulators for experiments with agents ◆ gives a percept to an agent ◆ receives an action ◆ updates the environment ◆ often divided into environment classes for related tasks or types of agents ◆ frequently provides mechanisms for measuring the performance of agents Agents 18 From Percepts to Actions ◆ if an agent only reacts to its percepts, a table can describe the mapping from percept sequences to actions ◆ insteadof a table, a simple function may also be used ◆ can be conveniently used to describe simple agents that solve well-defined problems in a well-defined environment ❖ e.g. calculation of mathematical functions Agents 19 PEAS Description of Task Environments used for high-level characterization of agents Performance used to evaluate how well an agent Measures solves the task at hand Environment surroundings beyond the control of the agent Actuators determine the actions the agent can perform Sensors provide information about the current state of the environment Agents 20 Exercise: Vac-cleaner Peas Description ◆ use the PEAS template to determine important aspects for a Vac-cleaner agent Agents 21 PEAS Description Template used for high-level characterization of agents Performance How well does the agent solve the task at Measures hand? How is this measured? Environment Important aspects of the surroundings beyond the control of the agent: Actuators Determine the actions the agent can perform. Sensors Provide information about the current state of the environment. Agents 22 Agent Programs ◆ the emphasis in this course is on programs that specify the agent’s behavior through mappings from percepts to actions ◆ agents receive one percept at a time ◆ they may or may not keep track of the percept sequence ◆ performance evaluation is often done by an outside authority, not the agent ◆ more objective, less complicated ◆ can be integrated with the environment program Agents 26 Skeleton Agent Program ◆ basic framework for an agent program function SKELETON-AGENT(percept) returns action static: memory memory := UPDATE-MEMORY(memory, percept) action := CHOOSE-BEST-ACTION(memory) memory := UPDATE-MEMORY(memory, action) return action Agents 27 Look it up! ◆ simple way to specify a mapping from percepts to actions ◆ tables may become very large ◆ all work done by the designer ◆ no autonomy, all actions are predetermined ◆ learning might take a very long time Agents 28 Table Agent Program ◆ agent program based on table lookup function TABLE-DRIVEN-AGENT(percept) returns action static: percepts // initially empty sequence* table // indexed by percept sequences // initially fully specified append percept to the end of percepts action := LOOKUP(percepts, table) return action * Note:the storage of percepts requires writeable memory Agents 29 Agent Program Types ◆ different ways of achieving the mapping from percepts to actions ◆ different levels of complexity ◆ simple reflex agents ◆ agents that keep track of the world ◆ goal-based agents ◆ utility-based agents ◆ learning agents Agents 30 Simple Reflex Agent ◆ instead of specifying individual mappings in an explicit table, common input-output associations are recorded ◆ requires processing of percepts to achieve some abstraction ◆ frequent method of specification is through condition-action rules ❖ if percept then action ◆ similar to innate reflexes or learned responses in humans ◆ efficient implementation, but limited power ❖ environment must be fully observable ❖ easily runs into infinite loops Agents 31 Reflex Agent Diagram Sensors Environment What the world is like now Condition-action rules What should I do now Agent Actuators Agents 32 Reflex Agent Diagram 2 Sensors What the world is like now Condition-action rules What should I do now Agent Actuators Environment Agents 33 Reflex Agent Program ◆ application of simple rules to situations function SIMPLE-REFLEX-AGENT(percept) returns action static: rules //set of condition-action rules condition := INTERPRET-INPUT(percept) rule := RULE-MATCH(condition, rules) action := RULE-ACTION(rule) return action Agents 34 Exercise: VacBot Reflex Agent ◆ specify a core set of condition-action rules for a VacBot agent Agents 35 Model-Based Reflex Agent ◆ aninternal state maintains important information from previous percepts ◆ sensors only provide a partial picture of the environment ◆ helps with some partially observable environments ◆ the internal states reflects the agent’s knowledge about the world ◆ this knowledge is called a model ◆ may contain information about changes in the world ❖ caused by actions of the action ❖ independent of the agent’s behavior Agents 36 Model-Based Reflex Agent Diagram Sensors State What the world is like now How the world evolves What my actions do Condition-action rules What should I do now Agent Actuators Environment Agents 37 Model-Based Reflex Agent Program ◆ application of simple rules to situations function REFLEX-AGENT-WITH-STATE(percept) returns action static: rules //set of condition-action rules state //description of the current world state action //most recent action, initially none state := UPDATE-STATE(state, action, percept) rule := RULE-MATCH(state, rules) action := RULE-ACTION[rule] return action Agents 38 Goal-Based Agent ◆ the agent tries to reach a desirable state, the goal ◆ may be provided from the outside (user, designer, environment), or inherent to the agent itself ◆ results of possible actions are considered with respect to the goal ◆ easy when the results can be related to the goal after each action ◆ in general, it can be difficult to attribute goal satisfaction results to individual actions ◆ may require consideration of the future ❖ what-if scenarios ❖ search, reasoning or planning ◆ very flexible, but not very efficient Agents 39 Goal-Based Agent Diagram Sensors State What the world is like now How the world evolves What happens if I do an action What my actions do Goals What should I do now Agent Actuators Environment Agents 40 Utility-Based Agent ◆ more sophisticated distinction between different world states ◆a utility function maps states onto a real number ❖ may be interpreted as “degree of happiness” ◆ permits rational actions for more complex tasks ❖ resolution of conflicts between goals (tradeoff) ❖ multiple goals (likelihood of success, importance) ❖ a utility function is necessary for rational behavior, but sometimes it is not made explicit Agents 41 Utility-Based Agent Diagram Sensors State What the world is like now How the world evolves What happens if I do an action What my actions do How happy will I be then Utility What should I do now Agent Actuators Environment Agents 42 Learning Agent ◆ performance element ◆ selectsactions based on percepts, internal state, background knowledge ◆ can be one of the previously described agents ◆ learning element ◆ identifies improvements ◆ critic ◆ providesfeedback about the performance of the agent ◆ can be external; sometimes part of the environment ◆ problem generator ◆ suggests actions ◆ required for novel solutions (creativity Agents 43 Learning Agent Diagram Performance Standard Sensors Critic State What the world is like now Learning How the world evolves What happens if I do an action Element What my actions do How happy will I be then Utility What should I do now Problem Generator Actuators Agent Environment Agents 44 Important Concepts and Terms ◆ action ◆ observable environment ◆ actuator ◆ omniscient agent ◆ agent ◆ PEAS description ◆ agent program ◆ percept ◆ architecture ◆ percept sequence ◆ autonomous agent ◆ performance measure ◆ continuous environment ◆ rational agent ◆ deterministic environment ◆ reflex agent ◆ discrete environment ◆ robot ◆ episodic environment ◆ sensor ◆ goal ◆ sequential environment ◆ intelligent agent ◆ software agent ◆ knowledge representation ◆ state ◆ mapping ◆ static environment ◆ multi-agent environment ◆ sticastuc environment ◆ utility Agents 45 Chapter Summary ◆ agents perceive and act in an environment ◆ ideal agents maximize their performance measure ◆ autonomous agents act independently ◆ basic agent types ◆ simple reflex ◆ reflex with state ◆ goal-based ◆ utility-based ◆ learning ◆ some environments may make life harder for agents ◆ inaccessible, non-deterministic, non-episodic, dynamic, continuous Agents 46