AI Week2 What Is AI and Agents
AI Week2 What Is AI and Agents
Rational Thinking
Human Thinking
Human Acting
Rational Acting
1. Acting 4. Acting
Humanly Rationally
Behavior/
Actions Turing Test
Universality of Computation
Mathematical Formulation of
notion of Computation and Computability
(1936)
23 June 2012
Turing Centenary
Abstract model of a
digital Computer:
rich enough to capture
any computational process.
Universal Computer
Turing Machine
Description
+ input
Turing Centennial
Universal Information
Turing
Machine
Processing Model
of a Universal
Computer
Vending Machine
AI system passes
if interrogator
cannot tell which one
(interaction via written questions) is the machine.
No computer vision or robotics or physical presence required!
But:
• some early research conflated algorithm performance
=> like human (and vice-versa)
• Do we want to duplicate human imperfections?
2. Thinking Humanly
Acting Acting
Behavior/
Actions Humanly Rationally
Turing Test
Thinking rationally:
formalizing the "laws of thought”
Long and rich history!
Logic: Making the right inferences!
Remarkably effective in science, math, and engineering.
Key notion:
Inference derives new information from stored facts.
Axioms can be very compact. E.g. much of mathematics
can be derived from the logical axioms of Set Theory.
Zermelo-Fraenkel with axiom of choice.
Also,
Godel’s
incompleteness.
Limitations:
2
PEAS: Specifying an automated
taxi driver
Performance measure:
?
Environment:
?
Actuators:
?
Sensors:
?
2
PEAS: Specifying an automated
taxi driver
Performance measure:
safety, speed, legal, comfortable, maximize profits
Environment:
?
Actuators:
?
Sensors:
?
2
PEAS: Specifying an automated
taxi driver
Performance measure:
safe, fast, legal, comfortable, maximize profits
Environment:
roads, other traffic, pedestrians, customers
Actuators:
?
Sensors:
?
2
PEAS: Specifying an automated
taxi driver
Performance measure:
safe, fast, legal, comfortable, maximize profits
Environment:
roads, other traffic, pedestrians, customers
Actuators:
steering, accelerator, brake, signal, horn
Sensors:
?
2
PEAS: Specifying an automated
taxi driver
Performance measure:
safe, fast, legal, comfortable, maximize profits
Environment:
roads, other traffic, pedestrians, customers
Actuators:
steering, accelerator, brake, signal, horn
Sensors:
cameras, sonar, speedometer, GPS
2
PEAS: Specifying a part picking robot
2
PEAS: Specifying an interactive English tutor
2
Environment types/Properties of Task Environments
Fully observable (vs. partially observable):
An agent's sensors give it access to the complete state of
the environment at each point in time.
– e.g a taxi agent doesn’t has sensor to see what
other drivers are doing/thinking ….
Characteristics
• Such agents have limited intelligence…
• Efficient
• No internal representation for reasoning,
inference.
• No strategic planning, learning.
• Are not good for multiple, opposing, goals.
• Works only if correct decision can be made on
basis of current percept.
Simple reflex agents
Function SIMPLE-REFLEX-AGENT(percept) returns
an action
static: rules, a set of condition-action rules
state←INTERPRET-INPUT(percept)
rule←RULE-MATCH(state, rule)
action←RULE-ACTION[rule]
return action
3
Model based reflex agents
4
Model-based reflex agents
4
Goal based agents
Current state of environments is not always enough ….
– e.g at a road junction, it can turn left, right or go straight ..
• Correct decision in such cases depends on where taxi is trying to get to ….
Major difference: future is taken into account
Combining goal information with the knowledge of its actions, the
agent can choose those actions that will achieve the goal.
Goal-based Agents are much more flexible in
responding to a changing environment;
accepting different goals.
Such agents work as follows:
– information comes from sensors - percepts
– changes the agents current state of the world
– based on state of the world and knowledge (memory) and
goals/intentions, it chooses actions and does them through the effectors.
4
Goal-based agents
4
Utility based agents
Goals alone are not always enough to generate quality
behaviours
– eg different action sequences can take the taxi agent to destination (and
achieving thereby the “goal”) – but some may be quicker, safer,
economical etc ..
A general performance measure is required to compare
different world states
A utility function maps a state (or sequence of states) to a
real number to take rational decisions and to specify
tradeoffs when:
• goals are conflicting – like speed and safety
• There are several goals and none of which can be achieved with certainty …
4
Utility-based agents
4
Learning agents
A learning agent can be divided into four conceptual
components:
– Learning Element
• Responsible for making improvements in Performance element
– uses feedback from Critic to determine how performance element should be
modified to do better….
– Performance Element
• Responsible for taking external actions
• selecting actions based on percepts
– Critic
• Tells the learning element how well agent is doing w.r.t. to fixed
performance standards…
– Problem Generator
• Responsible for suggesting actions that will lead to improved and
informative experiences.
….
4
For a taxi driver agent:
– Performance element consists of collection of knowledge and
procedures for selecting driving actions
4
Learning agents
5
Summary
An agent is something that perceives and acts in an
environment. The agent function specifies the
action taken by the agent in response to any percept
sequence.
• The performance measure evaluates the
behaviour of the agent in the environment. A
rational agent acts to maximise the expected value
of the performance measure.
• Task environments can be fully or partially
observable, deterministic or stochastic, episodic or
sequential, static or dynamic, discrete or continuous,
and single-agent or multiagent
5
Summary
Simplex reflex agents respond directly to percepts,
whereas model-based reflex agents maintain internal
state to track aspects of the world that are not evident in
the current percept.
Goal-based agents act to achieve their goals, and
utility-based agents try to maximize their own
expected “happiness”.
All agents can improve their performance
through learning