Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements  Upcoming due dates  F 5 pm Proj 0  M 11:59 pm HW 1  Be careful of edX timezone (UTC)!  New GSI  Welcome Nathan Mandi!  Discussion.

Similar presentations


Presentation on theme: "Announcements  Upcoming due dates  F 5 pm Proj 0  M 11:59 pm HW 1  Be careful of edX timezone (UTC)!  New GSI  Welcome Nathan Mandi!  Discussion."— Presentation transcript:

1 Announcements  Upcoming due dates  F 5 pm Proj 0  M 11:59 pm HW 1  Be careful of edX timezone (UTC)!  New GSI  Welcome Nathan Mandi!  Discussion  Start today  May change discussion sections up until Tu 9/22  Priority goes to those officially registered  Account Forms  Pick-up after lecture (if you like)

2 AI in the News Announced July 28, 2015 at IJCAI: Autonomous Weapons: an Open Letter from AI & Robotics Researchers http://futureoflife.org/AI/open_letter_autonomous_weapons  “Autonomous weapons select and engage targets without human intervention.”  “Starting a military AI arms race is a bad idea.”  BBC – The Now Show commentary (5:50)commentary

3 AI in the News https://www.youtube.com/watch?v=EfGD2qveGdQ

4 CS 188: Artificial Intelligence Agents and environments Instructors: Stuart Russell and Pat Virtue

5 Outline  Agents and environments  Rationality  PEAS (Performance measure, Environment, Actuators, Sensors)  Environment types  Agent types

6 Agents and environments  An agent perceives its environment through sensors and acts upon it through actuators (or effectors, depending on whom you ask) Agent ? Sensors Actuators Environment Percepts Actions

7 Agents and environments  Are humans agents?  Yes!  Sensors = vision, audio, touch, smell, taste, proprioception  Actuators = muscles, secretions, changing brain state Agent ? Sensors Actuators Environment Percepts Actions

8 Agents and environments  Are pocket calculators agents?  Yes!  Sensors = key state sensors  Actuators = digit display Agent ? Sensors Actuators Environment Percepts Actions

9 Agents and environments  AI is more interested in agents with substantial computation resources and environments requiring nontrivial decision making Agent ? Sensors Actuators Environment Percepts Actions

10 Agent functions and agent programs  The agent function maps from percept histories to actions:  f : P *  A  I.e., the agent’s response to any sequence of percepts  The agent program l runs on some machine M to implement f :  f = Agent( l,M)  Real machines have limited speed and memory  The program may take time to choose actions, may be interrupted by new percepts (or ignore them), etc.  Can every agent function be implemented by some agent program?  No! Consider agent for halting problems, NP-hard problems, chess with a slow PC

11 Example: Vacuum world  Percepts: [location,status], e.g., [A,Dirty]  Actions: Left, Right, Suck, NoOp

12 Vacuum cleaner agent Percept sequenceAction [A,Clean]Right [A,Dirty]Suck [B,Clean]Left [B,Dirty]Suck [A,Clean],[B,Clean]Left [A,Clean],[B,Dirty]Suck etc Agent functionAgent program function Reflex-Vacuum-Agent([location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left What is the right agent function? Can it be implemented by a small agent program? (Can we ask, “What is the right agent program?”)

13 Rationality  Fixed performance measure evaluates the environment sequence  one point per square cleaned up?  NO! Rewards an agent who dumps dirt and cleans it up  one point per clean square per time step, for t = 1,…,T  A rational agent chooses whichever action maximizes the expected value of the performance measure  given the percept sequence to date and prior knowledge of environment Does Reflex-Vacuum-Agent implement a rational agent function? Yes, if movement is free, or new dirt arrives frequently

14 Rationality, contd.  What is rational depends on:  Performance measure  Agent’s prior knowledge of environment  Actions available to agent  Percept sequence to date  Being rational means maximizing your expected utility

15 Rationality, contd.  Are rational agents omniscient?  No – they are limited by the available percepts  Are rational agents clairvoyant?  No – they may lack knowledge of the environment dynamics  Do rational agents explore and learn?  Yes – in unknown environments these are essential  So rational agents are not necessarily successful, but they are autonomous (i.e., transcend initial program)

16 Reflex agents in nature TED Talk: Marcus Byrne – The Dance of the Dung Beetle http://www.ted.com/talks/marcus_byrne_the_dance_of_the_dung_beetlehttp://www.ted.com/talks/marcus_byrne_the_dance_of_the_dung_beetle 12:30-15:45

17 Pacman [Demo L1-1: Manual pacman]

18 The task environment - PEAS  Performance measure  -1 per step; + 10 food; +500 win; -500 die; +200 hit scared ghost  Environment  Pacman dynamics (incl ghost behavior)  Actuators  Left Right Up Down  Sensors  Entire state is visible Note: formal evaluation of an agent requires defining a distribution over instances of the environment class

19 PEAS: Automated taxi  Performance measure  Income, happy customer, vehicle costs, fines, insurance premiums  Environment  US streets, other drivers, customers  Actuators  Steering, brake, gas, display/speaker  Sensors  Camera, radar, accelerometer, engine sensors, microphone Image: http://nypost.com/2014/06/21/how-google- might-put-taxi-drivers-out-of-business/

20 PEAS: Medical diagnosis system  Performance measure  Patient health, cost, reputation  Environment  Patients, medical staff, insurers, courts  Actuators  Screen display, email  Sensors  Keyboard/mouse

21 Environment types PacmanBackgammonDiagnosisTaxi Fully or partially observable Single-agent or multiagent Deterministic or stochastic Static or dynamic Discrete or continuous Known or unknown

22 Agent design  The environment type largely determines the agent design  Partially observable => agent requires memory (internal state)  Stochastic => agent may have to prepare for contingencies  Multi-agent => agent may need to behave randomly  Static => agent has time to compute a rational decision  Continuous time => continuously operating controller

23 Agent types  In order of increasing generality and complexity  Simple reflex agents  Reflex agents with state  Goal-based agents  Utility-based agents

24 Simple reflex agents

25 Pacman agent in Python class GoWestAgent(Agent): def getAction(self, percept): if Directions.WEST in percept.getLegalPacmanActions(): return Directions.WEST else: return Directions.STOP

26 Pacman agent contd.  Can we (in principle) extend this reflex agent to behave well in all standard Pacman environments?

27 Pacman agent contd. [Demo L2-1,2: reflex, reflex odd]

28 Handling complexity  Writing behavioral rules or environment models more difficult for more complex environments  E.g., rules of chess (32 pieces, 64 squares, ~100 moves)  ~100 000 000 000 000 000 000 000 000 000 000 000 000 pages as a state-to-state transition matrix (cf HMMs, automata) R.B.KB.RPPP..PPP..N..N…..PP….q.pp..Q..n..n..ppp..pppr.b.kb.r  ~100 000 pages in propositional logic (cf circuits, graphical models) WhiteKingOnC4@Move12  …  1 page in first-order logic  x,y,t,color,piece On(color,piece,x,y,t)  …

29 Reflex agents with state

30 Goal-based agents

31 Utility-based agents

32 Pacman planning agent [Demo L2-3: replanning]

33 Summary  An agent interacts with an environment through sensors and actuators  The agent function, implemented by an agent program running on a machine, describes what the agent does in all circumstances  Rational agents choose actions that maximize their expected utility  PEAS descriptions define task environments; precise PEAS specifications are essential  More difficult environments require more complex agent designs and more sophisticated representations


Download ppt "Announcements  Upcoming due dates  F 5 pm Proj 0  M 11:59 pm HW 1  Be careful of edX timezone (UTC)!  New GSI  Welcome Nathan Mandi!  Discussion."

Similar presentations


Ads by Google