fbbm509 - artificial...
TRANSCRIPT
FBBM509 - Artificial Intelligence
Intelligent Agents
AI Perspectives
Acting Humanly
Possess following capabilities:
– Natural language processing to enable it communicate successfully in English;
– Knowledge representation to store what it knows or hears;
– Automated reasoning to use stored information to answer questions and to draw new conclusions;
– Machine learning to adapt to new circumstances and to detect and extrapolate patterns.
Acting Humanly (2)
Total Turing Test – includes a video signal– computer vision to perceive objects, and
– Robotics to manipulate objects and move about.
Six disciplines compose most of AI: test remains relevant 60 years later.
Little effort to pass Turing test: study underlying principles instead.
Thinking Humanly
We need to get inside the actual workings of human mind.
Three ways to do this:
– Introspection: catch our own thoughts as they go by– Psychological experiments: observe a person in action– Brain imaging: observer the brain in action
Once we have a sufficiently precise theory of the mind, express the theory as a computer program.
Cognitive science: brings together computer models from AI and experimental techniques from psychology to construct precise and testable theories of the human mind.
Thinking Rationally
Aristotle: – first to attempt to codify “right thinking”
– Irrefutable reasoning process
– “Socrates is a man; all men are mortal, therefore, Socrates is mortal.”
Logicians in the 19th century developed a precise notation for statements about all kinds of objects in the world and the relations among them.
Thinking Rationally (2)
By 1965, programs existed that could, in principle, solve anysolvable problem described in logical notation.
Logicist tradition within artificial intelligence hopes to build on such programs to create intelligent systems.
Two main obstacles:– Taking informal knowledge and stating it in the formal
terms required by logical notation is not easy
– Big difference between solving a problem “in principle” and solving it in practice
Acting Rationally
An agent is just something that acts (agent comes from the Latin agere, to do)
A rational agent is an agent that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome.
– Operate autonomously– Perceive the environment – Persist over a prolonged time period– Adapt to change– Create and pursue goals
Performance measure: evaluates any given sequence of environment states.
Agents and Environments
Agents interact with environments through sensors and actuators.
Human agent: eyes, ears, other organs; hands, legs…Robotic agent: cameras, infrared range finders; various motors.
Acting Rationally
Agent behavior is described by:
Percept: agent’s perceptual inputs at any given instant.
Perceptual sequence: the complete history of everything the agent has ever perceived.
Agent function maps any given percept sequence to an action. -> abstract mathematical description of the behavior
Agent program is the concrete implementation of the agent function running within some physical system.
Vacuum Cleaner World
Two locations: squares A and B
Vacuum agent perceives: (1) which square it is in and (2) whether there is dirt in the square
Actions: (1) move left, (2) move right (3) suck up the dirt and (4) do nothing
Simple Agent Function with Tabulation
Agents and Environments - PEAS
Properties of Task Environment
Observable: (1) fully observable and (2) partially observable
Agents: (1) single agent and (2) multiple agent
• Competitive (randomized behavior)• Cooperative• Communication
Deterministic: (1) deterministic and (2) stochastic
Episodic: (1) episodic and (2) sequential
• Current decision can effect all future decisions• Short term actions can have long term consequences
Properties of Task Environment (2)Static: (1) static and (2) dynamic
• If the environment can change while and agent is deliberating
Discrete: (1) discrete and (2) continuous
• States, percepts or actions
Known: (1) known and (2) unknown
• Agent’s (or designer’s) state of the knowledge about the “laws of physics” of the environment
• In a known environment, outcomes for all actions are given.• Known but partially observable – solitaire card games• Unknown but fully observable – a new video game
Examples of Environments
Structure of AgentsArchitecture: computing device with physical sensors and actuators
• agent = architecture + program• Program we develop should be appropriate for the
architecture
Kinds of agent programs:
• Simple reflex agents• Model-based reflex agents• Goal-based agents• Utility-based agents
Table-driven Agent
Vacuum Cleaner World
Table-driven Agent
P: set of possible perceptsT: lifetime of the agent (total number of percepts it will receive)
Number of lookup table entries: ∑ |�|�����
Number of atoms in the observable universe < 10��
Simple Reflex Agent
Simple reflex agents select actions on the basis of the current percept, ignoring the rest of percept history.
Simple Reflex Agent for Vacuum World
Compared to table-driven agent, the simple reflex agent for the vacuum world is very small.
Reduction comes from ignoring the percept history. Number of possibilities is just 4, instead of 4�.
Condition-action rules, situation-action rules, productions or if-then rules.
Simple Reflex Agent Algorithm
INTERPRET-INPUT: generates an abstracted description of the current state.
RULE-MATCH: returns the first rule in the set of rules that matches the given state description.
Simple Reflex AgentsUseful for more complex environments too:
if car-in-front-is-braking then initiate-braking.
Disadvantage-1: works only if the correct decision can be made on the basis of only the current percept (fully observable env.)
Disadvantage-2: Infinite loops are often unavoidable in partially observable environments.
• For escaping from infinite loops, randomize actions
Model-based Reflex Agent (1)
A way to handle partial observability:
• Keep track of the world you can’t see now• Maintain some sort of internal state
Updating this internal state requires two kinds of knowledge:
• Information about how the world evolves independently of the agent
• Information about how the agent’s own actions affect the world
Model-based Reflex Agent (2)
This knowledge about “how the world works” is called a modelof the world.
An agent that uses such a model is called model-based agent.
The details of how models and states are represented vary widely depending on
• the type of environment and • the particular technology used in the agent design.
Model-based Reflex Agent (2)
Model-based Reflex Agent Algorithm
UPDATE-STATE: creates the new internal state description.
What the world is like now: It is seldom possible for the agent to determine the current state of a partially observable environment exactly.
Goal-based Agent
Deciding what to do: Knowing something about the current state of the environment is not always enough.
Example: At a road junction, the taxi can turn left, turn right or go straight on. The correct decision depends on where the taxi is trying to get to.
The agent program needs some sort of goal information that describes situations that are desirable.
Goal-based Agent
Goal-based Agent – Search, Planning and Flexibility
Sometimes goal-based action selection is straightforward (goal satisfaction after a single action).
Sometimes requires long action sequences (e.g. going from department to home).
Search and Planning are subfileds of AI devoted to finding action sequences that achieve the agent’s goals.
Goal-based agent appears less efficient than reflex agent, but it is more flexible (e.g. what if a traffic jam exist on the planned road?).
Utility-based Agent
Goals alone are not enough to generate high-quality behavior in most environments.
Example: Many action sequences will get the taxi to its destination (thereby achieving the goal) but some are quicker, safer, more reliable, or cheaper than others.
Goals just provide a crude binary distinction between “happy” and “unhappy” states.
A more general performance measure should allow a comparison of different world states according to exactly how happy they would make the agent: utility
Utility-based Agent: Utility Function
Performance measure: assigns a score to any given sequence of environment states.
Utility function: an internalization of the performance measure.
If the internal utility function and the external performance measure are in agreement:
• agent chooses actions to maximize it utility• rational according to the external performance measure
Utility-based Agent
Goal-based Agent vs. Utility-based Agent
In two kinds of cases, goals are inadequate but a utility-based agent can still make rational decisions:
1. When there are conflicting goals, only some of which can be achieved
2. When there are several goals that the agent can aim for, none of which can be achieved with certainty• utility provides a way in which the likelihood of
success can be weighted against the importance of the goal.
Partial observability and stochasticity are ubiquitous in the real world: choosing the action that maximizes the expected utility
Learning Agent
Performance element: responsible for selecting external actions.Critic: Sends feedback on how the agent is doing. Learning element: responsible for making improvements. Modifies performance element to do better in the future.Problem generator: responsible for suggesting actions that will lead to new and informative experiences.
Components of Agent Programs
Atomic Representation
Each state of the world is indivisible (no internal structure)
Example: Route finding between cities. Each city is a different state.
Methods using this representation:
• Search and Game Playing (Ch 3-5)• Hidden Markov Models (Ch 15)• Markov Decision Processes (Ch 17)
Factored Representation
Splits up each state into a fixed set of variables or attributes, each of which can have a value. Can represent uncertainty.
Example: Route finding with more concerns: how much gas in the tank, our current GPS coordinates, what station is on the radio, and so on.
Methods using this representation:
• Constrained Satisfaction (Ch 6)• Propositional Logic (Ch 7)• Planning (Ch 10 and 11)• Bayesian Networks (Ch 13-16)• Machine Learning (Ch 18, 20 and 21)
Structured Representation
The world as having things in it that are related to each other, not just variables with values.
Example: Route finding: a large truck ahead of us is reversing into the driveway of a dairy farm but a cow hos got loose and is blocking the truck’s path.
TruckAheadBackingIntoDairyFarmDrivewayBlockedByLooseCow=true
Methods using this representation:
• Rel. Databases and First-order Logic (Ch 8, 9 and 12)• First-order Probability Models (Ch 14)• Knowledge-based Learning (Ch 19)• Natural Language Understanding (Ch 22 and 23)