AI As The Design of Agents
AI As The Design of Agents
AI As The Design of Agents
actions effectors
Percepts
Actions
Goals
Environment
Patient, hospital
Correct categorization
Part-picking robot
Refinery controller
Refinery
Typed words
Set of students
Examples of agents..
Agent Type Percepts Actions Goals Environments
Bin-Picking Robot
Images
Conveyor belt
Medical Diagnosis
Patient symptoms
Healthy patients
Softbot
Web pages
Internet
What do you think? Is this an acceptable definition? Not looking left when crossing the street: If I dont see a car coming from the left, it is rational to cross the street? No. Should also consider taking information gathering actions. Limited/costly computation time Bounded rationality Limited/costly memory
Agents strategy
Agents strategy is a mapping from percept sequence to action How to encode an agents strategy?
Long list of what should be done for each possible percept sequence vs. shorter specification (e.g. algorithm)
WARNING: Might not get what you ask for in the performance measure
Cleaning robot
Pick up as much trash as possible
Skeleton agent
function SKELETON-AGENT (percept) returns action static: memory, the agents memory of the world memory UPDATE-MEMORY(memory,percept) action CHOOSE-BEST-ACTION(memory) memory UPDATE-MEMORY(memory, action) return action On each invocation, the agents memory is updated to reflect the new percept, the best action is chosen, and the fact that the action was taken is also stored in the memory. The memory persists from one invocation to the next. Input = Percept, not history NOTE: Performance measure is not part of the agent
More sophisticated
1. Table-driven agent
function TABLE-DRIVEN-AGENT (percept) returns action static: percepts, a sequence, initially empty table, a table, indexed by percept sequences, initially fully specified append percept to the end of percepts action LOOKUP(percepts, table) return action An agent based on a prespecified lookup table. It keeps track of percept sequence and just looks up the best action
Problems
Huge number of possible percepts (consider an automated taxi with a camera as the sensor) => lookup table would be huge Takes long time to build the table Not adaptive to changes in the environment; requires entire table to be updated if changes occur
sensors
Environment
effectors function SIMPLE-REFLEX-AGENT(percept) returns action static: rules, a set of condition-action rules state INTERPRET-INPUT (percept) rule RULE-MATCH (state,rules) action RULE-ACTION [rule] return action
First match. No further matches sought. Only one level of deduction.
A simple reflex agent works by finding a rule whose condition matches the current situation (as defined by the percept) and then doing the action associated with that rule.
sensors
What the world is like now
Environment
effectors
sensors
What the world is like now What it will be like if I do action A
Environment
Goals
effectors
5. Utility-based agent
State How the world evolves What my actions do
sensors
What the world is like now What it will be like if I do action A
Environment
Utility
effectors
Utility-based agent
When there are multiple possible alternatives, how to decide which one is best? A goal specifies a crude destination between a happy and unhappy state, but often need a more general performance measure that describes degree of happiness Utility function U: State Reals indicating a measure of success or happiness when at a given state Allows decisions comparing choice between conflicting goals, and choice between likelihood of success and importance of goal (if achievement is uncertain)
Properties of environments
Properties of environments
Accessible (observable) : The agents sensory apparatus gives it access to the complete state of the environment Deterministic: The next state of the environment is completely determined by the current state and the actions selected by the agent Subjective non-determinism - Limited memory (poker) - Too complex environment to model directly (weather, dice) - Inaccessibility Episodic: The agents experience is divided into independent episodes, each episode consisting of agent perceiving and then acting. Quality of action depends just on the episode itself, because subsequent episodes do not depend on what actions occur in previous episodes. Do not need to think ahead
Properties of environments
Static: If the environment can change while the agent is deliberating, then the environment is dynamic; otherwise its static. Need to worry about time Dynamic Need to observe while deliberating Discrete: There are a limited number of distinct, clearly defined percepts and actions we say that environment is discrete.
Accessible Yes
Deterministic Yes
Episodic No
Static Semi
Discrete Yes
Yes No Yes No
Yes No No No
No No No No
No
No
No
No
No
Yes No No No
Yes No No No
Yes Yes No No
Semi No No No
No No No Yes