Full Transcript

Artificial Intelligence Chapter 2 Intelligent Agents (Based on slided of Jawad Berry and Fariba Sadri) Artificial Intelligence – Intelligent Agents Slide 1 Overview 1. What is an agent? 2. Agent characteristics 3. Rational agent 4. Agen...

Artificial Intelligence Chapter 2 Intelligent Agents (Based on slided of Jawad Berry and Fariba Sadri) Artificial Intelligence – Intelligent Agents Slide 1 Overview 1. What is an agent? 2. Agent characteristics 3. Rational agent 4. Agent program 5. Types of agent program 6. Environment 7. Other agents characteristics Artificial Intelligence – Intelligent Agents Slide 1 1. What is an Agent? ◼ An agent is an entity that perceives its environment through sensors and acts upon that environment through effectors. sensors percepts ◼ Human agent ◼ Robotic agent ◼ Software ? agent environment agent actions effectors Artificial Intelligence – Intelligent Agents Slide 1 Examples of agents Control systems e.g. Thermostat Software daemons e.g. Mail client But… are they known as Intelligent Agents? N Artificial Intelligence – Intelligent Agents Slide 1 2. Agent Characteristics ◼ Situatedness The agent receives some form of sensory input from its environment, and it performs some action that changes its environment in some way. Examples of environments: the physical world and the Internet. ◼ Autonomy The agent can act without direct intervention by humans or other agents. It has control over its own actions and internal state. Artificial Intelligence – Intelligent Agents Slide 1 2. Agent Characteristics (Cont.) ◼ Adaptivity The agent is capable of ◼ reacting flexibly to changes in its environment; ◼ taking goal-directed initiative (i.e., is pro-active), when appropriate; and ◼ learning from its own experience, its environment, and interactions with others. ◼ Sociability The agent is capable of interacting in a peer- to-peer manner with other agents or humans. Artificial Intelligence – Intelligent Agents Slide 1 Intelligent agents: more features reactive responds to changes in the environment autonomous control over its own actions goal-oriented does not simply act in response to the environment temporally is a continuously running process continuous communicative communicates with other agents, perhaps including peo learning changes its behaviour based on its previous experience mobile able to transport itself from one machine to another flexible actions are not scripted Artificial Intelligence – Intelligent Agents Slide 1 3. Rational Agents ◼ A rational agent is the one that does the right thing ! But what does this mean ? ◼ The right action should cause the agent to be most successful, but how and when should the agent’s success be evaluated? Artificial Intelligence – Intelligent Agents Slide 1 3. Rational Agents (cont) ◼ Success needs to be evaluated with respect to an objective performance measure. What this depends on is what the agent is designed to achieve: Agent Performance measure Vacuum cleaning agent Dirt sucked up Electricity/Noise Time taken Call routing agent Connection setup delay Artificial Intelligence – Intelligent Agents Slide 1 4. Agent Program ◼ All agent programs have the same skeleton structure: function SKELTON-AGENT(percept) returns action Static: memory, the agent’s memory of the world memoryUPDATE-MEMORY(memory,percept) action CHOOSE-BEST-ACTION(memory) memory UPDATE-MEMORY(memory,action) return action ◼ Take just one percept at a time and generates an action. Agents must build up its percept sequence in memory (if it requires the whole sequence and has memory to store it). Artificial Intelligence – Intelligent Agents Slide 1 Design an automated taxi driver Agent Type Percept Actions Goals Environment Taxi Driver Cameras, Steer, Safe, fast, Roads, other speedometer, accelerate, legal, traffic, GPS, sonar, brake, talk to comfortable pedestrians, microphone passenger trip, maximize customers profits ◼ We will use this example to illustrate that different types of agent program are needed for different aspects of the agent. Artificial Intelligence – Intelligent Agents Slide 1 5. Types of agent program ◼ Simple reflex agents ◼ Model-based reflex agents ◼ Goal-based agents ◼ Utility based agents Artificial Intelligence – Intelligent Agents Slide 1 5.1 Simple reflex agents Artificial Intelligence – Intelligent Agents Slide 1 Simple reflex agents With perception see action Agent Environment Artificial Intelligence – Intelligent Agents Slide 1 Simple reflex agents (cont.) ◼ Some of drivers actions will be automatic reflexes, e.g. if the-car- in-front-is-breaking then initiate-breaking ◼ Such reflex rules are often called condition-action rules, productions, or if-then rules. ◼ Some processing may be required to establish that the condition is true. ◼ Although reflex agents can be implemented efficiently, their range of applicability is very narrow: ◼ the environment is fully observable and ◼ the condition-action rules have predicted all necessary actions. Artificial Intelligence – Intelligent Agents Slide 1 5.2 Model-based reflex agents (reflex agent with state) Artificial Intelligence – Intelligent Agents Slide 1 Model-based reflex agents ◼ Have information about how the world behaves – Model of the World. ◼ They can work out information about the part of the world which they have not seen. ◼ Handle partially observable environments. The model of the world allows them to ◼ Use information about how the world evolves to keep track of the parts of the world they cannot observe ◼ Example: If the agent has seen an object in a place and has since not seen any agent moving towards that object then the object is still at that place. ◼ Know the effects of their own actions on the world. ◼ Example: if the agent has moved northwards for 5 minutes then it is 5 minutes north of where it was. Artificial Intelligence – Intelligent Agents Slide 1 Model-based reflex agents With internal states Agent Percept action Predict state Environment Artificial Intelligence – Intelligent Agents Slide 1 Model-based reflex agents Given a Percept Integrate Percept in State ==> State Evaluate the condition-action rules in State and choose Action Execute Action Update State with Action ==> State Artificial Intelligence – Intelligent Agents Slide 1 5.3 Goal-based agents ◼ Knowing the state of the environment is not always enough. The correct action may depend on the goals of the agent. ◼ An agent program combines goal information with information about the results of possible actions to choose actions that achieves the goal: ◼ sometimes simple (when goal is satisfied by a single action) ◼ sometimes more complex (when goal requires a sequence of actions) ◼ Search and planning are sub-fields of AI devoted to finding action sequences that achieves the agent’s goals. Artificial Intelligence – Intelligent Agents Slide 1 Goal-based agents ◼ Decision making is more complex than before since it requires consideration of the future: ◼ What will happen if I do X ? ◼ Will that make me happy ? ◼ Although they may be less efficient, goal-based agents are more flexible. ◼ Taxi-driver agent may have its destination as a goal causing it to behave differently for the same percept sequence. Artificial Intelligence – Intelligent Agents Slide 1 Goal-based agents Artificial Intelligence – Intelligent Agents Slide 1 Goal-based agents Agent see Goals Decision action Predict state Environment Artificial Intelligence – Intelligent Agents Slide 1 Goal-based agents ◼ Do not have fixed policies; they compute what to do on the fly by assessing whether the action they chose achieves the given (fixed) goals. ◼ Are not restricted to one-step look ahead. ◼ Are programmed by giving them goals, models of actions, and environment. Artificial Intelligence – Intelligent Agents Slide 1 Goal-based agents Differences from Reflexive Agents: ◼ Goals are explicit ◼ The future is taken into account ◼ Reasoning about the future is necessary – planning, search Artificial Intelligence – Intelligent Agents Slide 1 5.4 Utility-based agents ◼ What if there are multiple alternative ways of achieving the same goal? ◼ Goals provide coarse distinction between “happy” and “unhappy” states. ◼ Utility-based agents have finer degrees of comparison between states. ◼ World Model + Goals + utility functions Artificial Intelligence – Intelligent Agents Slide 1 Utility-based agents Utility functions map states to a measure of the utility of the states, often real numbers. They are used to: ◼ Select between conflicting goals ◼ e.g., speed versus safety ◼ Select between alternative ways of achieving a goal ◼ Deal with cases of multiple goals, none of which can be achieved with certainty – weighing up likelihood of success against importance of goal. Artificial Intelligence – Intelligent Agents Slide 1 Utility-based agents Artificial Intelligence – Intelligent Agents Slide 1 6. Environment ◼ Accessible vs inaccessible. ◼ accessible: sensory apparatus give complete state of the environment. ◼ effectively accessible: sensors detect all aspects that are relevant to decision making process. ◼ in an accessible environment an agent needn’t keep track of the world through its internal state. ◼ Deterministic vs non-deterministic. ◼ deterministic: next state of the environment is completely determined by the current state and the action selected by the agent. ◼ non-deterministic: next state is uncertain (through a probabilistic model may be available). Artificial Intelligence – Intelligent Agents Slide 1 Environment (Cont.) ◼ Static vs dynamic ◼ dynamic: environment can change while agent is deliberating. ◼ static: agent does not need to look at the world while it decides on an action, nor does it need to worry about the passage of time. ◼ semi-dynamic: agent’s preference score changes with passage of time through the environment remains unchanged. ◼ Discrete vs continuous ◼ discrete: limit number of distinct, clearly defined percept and actions. ◼ playing chess is discrete, there are limited number of moves. ◼ driving a taxi is continuous, speed and location vary infinitely. Artificial Intelligence – Intelligent Agents Slide 1

Use Quizgecko on...
Browser
Browser