Intelligent Agents & Search Problem Formulation Outline for Today's

Intelligent Agents & Search Problem Formulation Outline for Today's

9/6/2017 Outline for today’s lecture • Intelligent Agents (AIMA 2.1-2) • Task Environments Intelligent Agents & Search Problem Formulation • Formulating Search Problems AIMA, Chapters 2, 3.1-3.2 CIS 421/521 - Intro to AI - Fall 2017 2 Thinking humanly Thinking rationally Review: Acting rationally: Thinking humanly Thinking rationally Acting humanly Acting rationally Acting humanly Acting rationally Review: What is AI? rational agents Views of AI fall into four categories: • Rational behavior: doing the right thing Thinking humanly Thinking rationally • The right thing: that which is expected to maximize goal achievement, given the available Acting humanly Acting rationally information • Rational agent: An agent is an entity that perceives and acts rationally We will focus on "acting rationally“ This course is about effective programming techniques for designing rational agents CIS 521 - Intro to AI - Fall 2017 3 CIS 521 - Intro to AI - Fall 2017 4 Agents and environments Agents • An agent is anything that can be viewed as • perceiving its environment through sensors and • acting upon that environment through actuators • Human agent: • Sensors: eyes, ears, ... • Actuators: hands, legs, mouth, … •An agent is specified by an agent function f:P a that maps a sequence of percept vectors P to an • Robotic agent: action a from a set A: • Sensors: cameras and infrared range finders • Actuators: various motors P=[p0, p1, … , pt] A={a0, a1, … , ak} • Agents include humans, robots, softbots, thermostats, … CIS 421/521 - Intro to AI - Fall 2017 5 CIS 421/521 - Intro to AI - Fall 2017 6 1 9/6/2017 Agent function & program Rational agents II • The agent program runs on the physical • Rational Agent: For each possible percept architecture to produce f sequence P, a rational agent selects an action a • agent = architecture + program expected to maximize its performance measure • “Easy” solution: table that maps every possible • Performance measure: An objective criterion for sequence P to an action a success of an agent's behavior, given the • One small problem: exponential in length of P evidence provided by the percept sequence. Revised: • Rational Agent: For each possible percept sequence P, a rational agent selects an action a that maximizes the expected value of its performance measure CIS 421/521 - Intro to AI - Fall 2017 7 CIS 421/521 - Intro to AI - Fall 2017 8 Performance measure - example Rationality is not omniscience • A performance measure for a vacuum-cleaner • Ideal agent: maximizes actual performance, but agent might include e.g. some subset of: needs to be omniscient. • +1 point for each clean square in time T • Usually impossible….. • +1 point for clean square, -1 for each move — But consider tic-tac-toe agent… • -1000 for more than k dirty squares • Rationality Guaranteed Success • Caveat: computational limitations make complete rationality unachievable design best program for given machine resources • In Economics: “Bounded Rationality” “Behavioral Economics” CIS 421/521 - Intro to AI - Fall 2017 9 CIS 421/521 - Intro to AI - Fall 2017 10 Outline for today’s lecture Task environments • Intelligent Agents • To design a rational agent we need to specify a task environment • Task Environments (AIMA 2.3) • a problem specification for which the agent is a solution : to specify a task environment • Formulating Search Problems • PEAS • Performance measure • Environment • Actuators • Sensors CIS 421/521 - Intro to AI - Fall 2017 11 CIS 421/521 - Intro to AI - Fall 2017 12 2 9/6/2017 PEAS: Specifying an automated taxi driver PEAS: Specifying an automated taxi driver Performance measure: Performance measure: • ? • safe, fast, legal, comfortable, maximize profits Environment: Environment: • ? • roads, other traffic, pedestrians, customers Actuators: Actuators: • ? • steering, accelerator, brake, signal, horn Sensors: Sensors: • ? • cameras, sonar, speedometer, GPS CIS 421/521 - Intro to AI - Fall 2017 13 CIS 421/521 - Intro to AI - Fall 2017 14 PEAS: Medical diagnosis system The rational agent designer’s goal • Performance measure: Healthy patient, minimize • Goal of AI practitioner who designs rational agents: costs, lawsuits given a PEAS task environment, • Environment: Patient, hospital, staff 1. Construct agent function f that maximizes the expected value of the performance measure, • Actuators: Screen display (form including: questions, tests, diagnoses, treatments, referrals) 2. Design an agent program that implements f on a From: The New Yorker April 2017 particular architecture • Sensors: Keyboard (entry of symptoms, findings, patient's answers) CIS 421/521 - Intro to AI - Fall 2017 15 CIS 421/521 - Intro to AI - Fall 2017 16 Environment types: Definitions I Environment types: Definitions II • Fully observable (vs. partially observable): An agent's • Static (vs. dynamic): The environment is unchanged while sensors give it access to the complete state of the an agent is deliberating. environment at each point in time. • The environment is semidynamic if the environment itself does not change with the passage of time but the agent's performance • Deterministic (vs. stochastic): The next state of the score does. 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 • Discrete (vs. continuous): A limited number of distinct, agents, then the environment is strategic. clearly defined percepts and actions. • Episodic (vs. sequential): The agent's experience is • Single agent (vs. multiagent): An agent operating by divided into atomic "episodes" during which the agent itself in an environment. perceives and then performs a single action, and the choice of action in each episode does not depend on any previous action. (example: classification task) (See examples in AIMA, however I don’t agree with some of the judgments) CIS 421/521 - Intro to AI - Fall 2017 17 CIS 421/521 - Intro to AI - Fall 2017 18 3 9/6/2017 Environment Restrictions for Now • We will assume environment is • Static • Fully Observable Problem Solving Agents & • Deterministic • Discrete Problem Formulation AIMA 3.1-2 CIS 421/521 - Intro to AI - Fall 2017 19 CIS 421/521 - Intro to AI - Fall 2017 20 Outline for today’s lecture Example search problem: 8-puzzle • Intelligent Agents • Formulate goal • Task Environments • Pieces to end up in order • Formulating Search Problems (AIMA, 3.1-3.2) as shown… • Formulate search problem • States: configurations of the puzzle (9! configurations) • Actions: Move one of the movable pieces (≤4 possible) • Performance measure: minimize total moves • Find solution • Sequence of pieces moved: 3,1,6,3,1,… CIS 421/521 - Intro to AI - Fall 2017 21 CIS 421/521 - Intro to AI - Fall 2017 22 Example search problem: holiday in Romania Holiday in Romania II • On holiday in Romania; currently in Arad • Flight leaves tomorrow from Bucharest • Formulate goal • Be in Bucharest • Formulate search problem You are here • States: various cities • Actions: drive between cities • Performance measure: minimize distance • Find solution • Sequence of cities; e.g. Arad, Sibiu, Fagaras, Bucharest, … You need to be here CIS 421/521 - Intro to AI - Fall 2017 23 CIS 421/521 - Intro to AI - Fall 2017 24 4 9/6/2017 More formally, a problem is defined by: Solutions & Optimal Solutions 1. States: a set S • A solution is a sequence of actions from the 2. An initial state siS initial state to a goal state. 3. Actions: a set A — s Actions(s) = the set of actions that can be executed in s, that are applicable in s. • Optimal Solution: A solution is optimal if no solution has a lower path cost. 4. Transition Model: s aActions(s) Result(s, a) sr —sr is called a successor of s —{si } Successors(si )* = state space 5. Path cost (Performance Measure): Must be additive —e.g. sum of distances, number of actions executed, … —c(x,a,y) is the step cost, assumed ≥ 0 – (where action a goes from state x to state y) 6. Goal test: Goal(s) — Can be implicit, e.g. checkmate(s) — s is a goal state if Goal(s) is true CIS 421/521 - Intro to AI - Fall 2017 25 CIS 421/521 - Intro to AI - Fall 2017 26 Art: Formulating a Search Problem Example: 8-puzzle Decide: • Which properties matter & how to represent • Initial State, Goal State, Possible Intermediate States • Which actions are possible & how to represent • States?? • Operator Set: Actions and Transition Model • Initial state?? • Which action is next • Actions?? • Path Cost Function • Transition Model?? • Goal test?? Formulation greatly affects combinatorics of search • Path cost?? space and therefore speed of search CIS 421/521 - Intro to AI - Fall 2017 27 CIS 421/521 - Intro to AI - Fall 2017 28 Example: 8-puzzle Example: 8-puzzle • States?? List of 9 locations- e.g., [7,2,4,5,-,6,8,3,1] • States?? List of 9 locations- e.g., [7,2,4,5,-,6,8,3,1] • Initial state?? [7,2,4,5,-,6,8,3,1] • Initial state?? [7,2,4,5,-,6,8,3,1] • Actions?? {Left, Right, Up, Down} • Actions?? {Left, Right, Up, Down} • Transition Model?? ... • Transition Model?? ... • Goal test?? Check if goal configuration is reached • Goal test?? Check if goal configuration is reached • Path cost?? Number of actions to reach goal • Path cost?? Number of actions to reach goal CIS 421/521 - Intro to AI - Fall 2017 29 CIS 421/521 - Intro to AI - Fall 2017 30 5 9/6/2017 Hard subtask: Selecting a state space • Real world is absurdly complex State space must be abstracted for problem solving • (abstract) State = set (equivalence class) of real world states • (abstract)

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us