School of Electrical Engineering and Informatics Institute of Technology Bandung Outline Review Agents & Environment Rationality PEAS (Performance Measures, Environment, Actuators, Sensors) Environment types Agent types 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 2 Review Berdasarkan keempat pendekatan IB, tentukan pendekatan yang digunakan pada aplikasi/ teknologi berikut ini, ataukah aplikasi tersebut tidak menggunakan pendekatan inteligensi buatan. Jelaskan dengan singkat jawaban anda. NuPIC, platform perangkat lunak yang berbasiskan pada model struktur dan operasi pada neocortex (bagian pada otak mamalia). PXDES, aplikasi yang melakukan diagnosis X-ray untuk penentuan pneumoconiosis (penyakit paru-paru yang disebabkan oleh penghisapan debu). Pc-Nqthm, aplikasi proof-checker yang berlandaskan pada teori automated reasoning, berdasarkan aturan formal logika. AceMoney, aplikasi yang membantu mengorganisasikan dan mengatur keuangan individu. 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 3 Agent & Environment 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 4 Environment Agent Percepts Actions sensors actuators ? Agents [1]: Software that gathers information about an environment and takes actions based on that information. A robot A factory A web shopping program
[2]: computer system that is situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives Computational agents that behave autonomously 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 5 Agents Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors. A robot A factory A web shopping program
Computational agents that behave autonomously Human agent: eyes, ears, and other organs for sensors; hands, legs, mouth, and other body parts for actuators Robotic agent: cameras and infrared range finders for sensors; various motors for actuators 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 6 The Agent & the Environment How do we begin to formalize the problem of building an agent? Make a dichotomy between the agent and the environment 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 7 Vacuum-cleaner world Percepts: location and contents, e.g., [A,Dirty] Actions: Left, Right, Suck, NoOp 28-Ags-14 8 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) World Model A the action space P the percept space Define: S internal state [may not be visible to agent] Perception function: S P World dynamics: S x A S 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 9 Perception Function World Dynamics a p s Agent Design U utility function: S real (or S* real) The agent design problem: Find P* A mapping of sequences of percepts to actions maximize the utility of the resulting sequences of states (each action maps from one state to next state) 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 10 Planning Agent Policy Planning is explicitly considering future consequences of actions in order to choose the best one. So, planning is the process of generating possible sequences of actions, simulating their consequences, picking which is the best and committing to one of these actions. 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 11 a i that leads s a 1 a a 2 a 3 u u u u u u to max U s 1 s 2 s 3 a 4 a 5 Rational agents An agent should strive to "do the right thing", based on what it can perceive and the actions it can perform. The right action is the one that will cause the agent to be most successful Performance measure: An objective criterion for success of an agent's behavior E.g., performance measure of a vacuum-cleaner agent could be amount of dirt cleaned up, amount of time taken, amount of electricity consumed, amount of noise generated, etc. 28-Ags-14 12 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Rational agents Rational Agent: For each possible percept sequence, a rational agent should 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. 28-Ags-14 13 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Rationality A rational agent takes actions it believes will achieve its goals. Assume I dont like to get wet, so I bring an umbrella. Is that rational? Depends on the weather forecast and whether Ive heard it. If Ive heard the forecast for rain (and I believe it) then bringing the umbrella is rational. Rationality omniscience Assume the most recent forecast is for rain but I did not listen to it and I did not bring my umbrella. Is that rational? Yes, since I did not know about the recent forecast! Rationality success Suppose the forecast is for no rain but I bring my umbrella and I use it to defend myself against an attack. Is that rational? No, although successful, it was done for the wrong reason. 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 14 Limited Rationality There is a big problem with our definition of rationality The agent might not be able to compute the best action (subject to its beliefs and goals). So, we want to use limited rationality: acting in the best way you can subject to the computational constraints that you have. 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 15 Limited Rationality (2) The (limited rational) agent design problem: Find P* A mapping of sequences of percepts to actions maximizes the utility of the resulting sequences of states subject to our computational constraints To design an agent specify PEAS 28-Ags-14 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) 16 PEAS PEAS: Performance measure, Environment, Actuators, Sensors Must first specify the setting for intelligent agent design Consider, e.g., the task of designing an automated taxi driver: Performance measure: Safe, fast, legal, comfortable trip, maximize profits Environment: Roads, other traffic, pedestrians, customers Actuators: Steering wheel, accelerator, brake, signal, horn Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard 28-Ags-14 17 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Another Example of PEAS Medical diagnosis system Agent Performance measure: Healthy patient, minimize costs, lawsuits Environment: Patient, hospital, staff Actuators: Screen display (questions, tests, diagnoses, treatments, referrals) Sensors: Keyboard (entry of symptoms, findings, patient's answers) 28-Ags-14 18 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Another Example of PEAS Part-picking robot Agent Performance measure: Percentage of parts in correct bins Environment: Conveyor belt with parts, bins Actuators: Jointed arm and hand Sensors: Camera, joint angle sensors 28-Ags-14 19 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Environment types 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" (each episode consists of the agent perceiving and then performing a single action), and the choice of action in each episode depends only on the episode itself. 28-Ags-14 20 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Environment types 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. 28-Ags-14 21 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Environment types Chess with Chess without Taxi driving a clock a clock Fully observable Yes Yes No Deterministic Strategic Strategic No Episodic No No No Static Semi Yes No Discrete Yes Yes No Single agent No No No The environment type largely determines the agent design The real world is (of course) partially observable, stochastic, sequential, dynamic, continuous, multi-agent 28-Ags-14 22 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Agent functions and programs An agent is completely specified by the agent function mapping percept sequences to actions One agent function (or a small equivalence class) is rational Aim: find a way to implement the rational agent function concisely We can use table lookup that maps sequence of percepts to action 28-Ags-14 23 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Table-lookup agent Drawbacks: Huge table Take a long time to build the table No autonomy Even with learning, need a long time to learn the table entries Alternatives reflex agent: agent respond very flexible to a very broad range of stimuli Drawback: coulds not store the response Next: Types of agent based 28-Ags-14 24 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Agent types Four basic types : Simple reflex agents Model-based reflex agents Goal-based agents Utility-based agents 28-Ags-14 25 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Simple reflex agents 28-Ags-14 26 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Model-based reflex agents 28-Ags-14 27 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Goal-based agents 28-Ags-14 28 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Utility-based agents 28-Ags-14 29 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) Learning agents (later on) 28-Ags-14 30 IF3170/ NUM (Hwee Tou Ng's & Kaelbling) THANK YOU