lecture 2 intelligent agents key concepts from last
play

Lecture 2: Intelligent Agents Key concepts from last lecture - PowerPoint PPT Presentation

CS440/ECE448: Intro to Artificial Intelligence Lecture 2: Intelligent Agents Key concepts from last lecture Prof. Julia Hockenmaier juliahmr@illinois.edu http://cs.illinois.edu/fa11/cs440 Last time s


  1. CS440/ECE448: Intro to Artificial Intelligence � Lecture 2: 
 Intelligent Agents � Key concepts 
 from last lecture � Prof. Julia Hockenmaier � juliahmr@illinois.edu � � http://cs.illinois.edu/fa11/cs440 � � � Last time ʼ s key concepts � Compass survey � Content-wise: � Java experience (26% no): � TA office hours next week will offer Java – What is Artificial Intelligence? 
 tutorials � Why is it difficult? � – What is reasoning? 
 � Parisa ʼ s OH will be 3pm-5pm on Monday. � Why does it require models? � Yonatan ʼ s OH will be 11am-1pm on Wednesday � Class admin: � � – Can you log onto your Compass site? � � – Did you do the survey on Compass? � – Do you have access to the textbook? � CS440/ECE448: Intro AI � 4 �

  2. Compass survey �� What is AI? � • How to make something behave like a human � • How to make something intelligently solve Today ʼ s lecture � problems/reason. � Second answer is correct, first is not. � CS440/ECE448: Intro AI � 5 � Today ʼ s key questions � Today ʼ s key concepts � Agents: � – Different kinds of agents � How can we design an “intelligent” agent 
 – The structure and components of agents 
 to solve a specific task 
 � in a particular environment ? � Describing and evaluating agents: � � – Performance measures � What is intelligence ? � – Task environments 
 � � � Rationality: � � – What makes an agent intelligent? � �

  3. The vacuum world � The face recognition world � A B � � � � � � � � The environment: a photograph � The environment: Location A and location B � � The agent: a program 
 � � � � � Either can be clean or dirty � � The task: find faces, identify them � � The agent: a vacuum cleaner � � The task: clean both A and B � � � � � � � � � � � Photo: Jason Sewell , on flickr.com � CS440/ECE448: Intro AI � 9 � CS440/ECE448: Intro AI � 10 � The chess world � ! ! !" ! ! 1. e4 e5 � ! ! !" ! ! 2. Qh5 Nc6 � ! ! ! ! ! ! 3. Bc4 Nf6 � ! ! ! ! ! ! ♕ ! ! ! ! ! ! ! ! ! 4. Qxf7# 1–0 � Agents � ! ! ! ! ! ! � ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! The environment: a chess game � The agent: a game 
 The task: play chess, win match � CS440/ECE448: Intro AI � 11 � CS440/ECE448: Intro AI � 12 �

  4. Agents operate 
 Definitions…. � in an environment � Sensor: eyes, ears, nose (human); camera, Environment � Agent � microphone (robot); stdin (NLP system), � � Sensors � Percept: the perceptual input at any instant. � Percepts � � Percept sequence: the complete history of Agent � what the agent has perceived � Program � � Actuator: arms, legs (human, robot), hose Actions � Actuators � (vacuum), stdout (NLP system), � physical architecture � � CS440/ECE448: Intro AI � 13 � CS440/ECE448: Intro AI � 14 � Toy example: 
 The agent program (the ʻ brain ʼ ) � the vacuum world � The agent program decides what action to A B take in each situation. � – Situation = the current percept sequence � – It implements a mapping from percept sequences to actions (=the agent function) � � Percept sequence � Action � Sensor: a camera � [A, Clean] � Right � Percepts: current location, is clean or dirty � [A, Dirty] � Suck � Actions: move left, move right, suck � [A, Clean], [A, Dirty] � Suck � CS440/ECE448: Intro AI � 15 � CS440/ECE448: Intro AI � 16 �

  5. 
 
 Agent program vs. 
 Simple reflex agents � agent function � Agent function: � Action depends only on current percept. � A (complete) mapping from sequences of Agent has no memory. 
 percepts to actions: � Last percept � Action � � [Clean] � Right � AgentFunction( 〈 p (1) p (2) …p (t) 〉 ) = a (t) � � � [ cat ] � RUN! � Agent program: � May choose actions stochastically 
 What is actually implemented in the agent. � to escape infinite loops. � Typically an approximation of the agent � Last percept � Action � function. � � [Clean] � Right (p=0.8) Left(p=0.2) � � CS440/ECE448: Intro AI � 17 � CS440/ECE448: Intro AI � 18 � Model-based reflex agents � Model-based reflex agents � Agent has an internal model 
 Agent may also have (generic) domain of the current state of the world. � knowledge of the world. � Examples: the agent ʼ s previous location; current Examples: effects of agent ʼ s actions, behavior of entities in the environment � locations of all objects it has seen; 
 � Last percept � Last location � Action � Action � Effect � [Clean] � Left of current � Right � agent sucks cat � cat bites agent � [Clean] � Right of current � Left � agent moves down stairs � agent breaks � CS440/ECE448: Intro AI � 19 � CS440/ECE448: Intro AI � 20 �

  6. Goal-based agents � Utility-based agents � Agent has a goal, which may require a Agent can choose between multiple actions sequence of actions . � to achieve its goal. Which is best? � (This requires searching or planning ) � � Agent may have conflicting goals. � Which one to pursue first? � Goal � Required actions � � a clean house � clean every room � Agents may have a utility function , which (ideally) approximates the external performance measure. � � CS440/ECE448: Intro AI � 21 � CS440/ECE448: Intro AI � 22 � � Learning-based agents � We cannot foresee every eventuality. � Agents need to change their behavior 
 to adapt to their environment. � Evaluating agents � � This requires an (external) teacher or reward which tell the agent how well 
 it is currently doing. � � CS440/ECE448: Intro AI � 23 �

  7. How well does 
 Rationality � the agent perform? � Objective evaluation: 
 A rational agent should always choose the What are the consequences of its actions 
 action that maximizes its expected on the environment? � performance, 
 � given the current situation � Performance measure: � � Do the agent ʼ s actions reach the desired state How rational an agent can be depends on � of the environment ? � a) the performance measure � – We don ʼ t care about the state of the agent � b) its prior knowledge of the environment � c) what actions it can perform � – We usually don ʼ t care how the agent behaves to 
 d) its current percept sequence � reach its goal � � NB: rationality ≠ omniscience � CS440/ECE448: Intro AI � 25 � CS440/ECE448: Intro AI � 26 � Strategies for maximizing Comparing agents and tasks � expected performance � Information gathering (first look, then act): � The task environment specifies the Choose an action that yields a more informative problem that the agent has to solve. � percepts for the following action � � � It is defined by: � Learning (act according to prior experience) � 1. the objective P erformance measure � Augment or modify knowledge of the task or the 2. the external E nvironment � environment according to experience. � 3. the agent ʼ s A ctuators � NB: learning requires autonomy � 4. the agent ʼ s S ensors � CS440/ECE448: Intro AI � 27 � CS440/ECE448: Intro AI � 28 �

  8. PEAS descriptions for…. � … medical diagnosis system? � … assembly line robot? � … chess computer? � Comparing task … autonomous car? � environments � � P erformance measure � E nvironment � A ctuators � S ensors � � CS440/ECE448: Intro AI � 29 � 1. What information 
 2. What is the agent ʼ s knowledge do the sensors provide? � about the environment? � Known: � Fully observable: � Agent knows all the rules that hold in the The percepts contain all relevant environment. Can predict outcomes from properties of the environment � complete observations. � � � Partially observable: � Unknown: � The percepts contain only some relevant Agent doesn ʼ t know the rules of the properties of the environment � environment. Can ʼ t predict outcomes. � � CS440/ECE448: Intro AI � 31 � CS440/ECE448: Intro AI � 32 �

  9. 3. What effect do 
 4. How do the percepts 
 the actions have? � change over time? � Deterministic: � Episodic: � Outcome of actions (next state of the environment) is Agent receives a single percept per episode. 
 fully determined by the current state. � Its action in this episode does not affect future � percepts (e.g. classification) � Nondeterministic: � � Each action has a set of possible outcomes. � Sequential: � � Agent receives a sequence of percepts. 
 Stochastic: � The current action affects future percepts. 
 There is a probability distribution over possible (e.g. navigation, game playing) � outcomes. � CS440/ECE448: Intro AI � 33 � CS440/ECE448: Intro AI � 34 � 5. How does the environment 6. Is the world discrete or change over time? � continuous? � Continuous: � Static: Environment doesn ʼ t change unless agent Time, percepts and actions are continuous. � performs an action. (e.g. crossword puzzles) � Example: driving a car. � � Dynamic: Environment changes even when the � agent doesn ʼ t do anything. (e.g. traffic) � Discrete: � � Time, percepts and actions are discrete. � Semi-dynamic: Environment is static, but agent ʼ s Example: playing a board game. � performance score changes over time. (e.g. chess � against a clock) � � � CS440/ECE448: Intro AI � 35 � CS440/ECE448: Intro AI � 36 � �

Recommend


More recommend