SlideShare a Scribd company logo
Module-1
SYLLABUS
Introduction- What is Artificial Intelligence
Foundation of AI
History of AI
Applications of AI
Intelligent
Agents- Agents
and Environment
Good Behaviour
The concept of rationality, nature of environment
Structure of Agents
ARTIFICIAL INTELLIGENCE
Artificial intelligence allows machines to replicate the capabilities of the human mind. From the
development of self-driving cars to the development of smart assistants like Siri and Alexa, AI
is a growing part of everyday life.
Artificial intelligence is a wide-ranging branch of computer science concerned with
building
smart machines capable of performing tasks that typically require human intelligence.
What is AI
The definitions on the left measure success in terms of
fidelity to human performance,
the ones on the right measure against an ideal
performance measure, called rationality.
A system is rational if it does the “right thing,”
given what it knows.
Turing Test
(Human) judge communicates with a human and a machine
over text-only channel,
Both human and machine try to act like a human,
Judge tries to tell which is which.
Numerous variants
Loebner prize
Current programs
nowhere close to
passing this
◦http://www.jabber
wacky.com/
◦http://turingtrade.o
What is the Turing Test in Artificial
Intelligence?
NLP to communicate successfully.
Knowledge Representation to act as its memory.
Automated Reasoning to use the stored information to answer questions and draw new
conclusions.
Machine Learning to detect patterns and adapt to new circumstances.
Acting humanly: The Turing Test
approach
A computer passes the test if a human interrogator, after posing some written questions, cannot
tell whether the written responses come from a person or from a computer
The computer would need to possess the following capabilities:
1. natural language processing to enable it to communicate successfully in English
2. knowledge representation to store what it knows or hears
3. automated reasoning to use the stored information to answer questions and to draw new
conclusions
4. machine learning to adapt to new circumstances and to detect and extrapolate patterns
5. TOTAL TURING TEST- To pass the total Turing Test, the computer will need
 computer vision to perceive objects, and
 robotics to manipulate objects and move about
Thinking humanly: The cognitive
modeling approach
introspection—trying to catch our own thoughts
as they go by
psychological experiments—observing a person
in action
brain imaging—observing the brain in action
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: The “laws of
thought” approach
e
SYLLOGISM: an instance of a form of reasoning in
which a conclusion is drawn from two given or
assumed propositions, “Socrates is a man; all men
are mortal; therefore, Socrates is mortal.”
LOGIC: study of laws of thought to govern the operation
of the mind
not easy to take informal knowledge and state it in th
formal terms required by logical notation
Even problems with just a few hundred facts can
exhaust the computational resources of any computer
unless it has some guidance as to which reasoning
steps to try first.
Acting rationally: The rational agent
approach
An agent is just something that acts
Rational behavior is doing the right thing
Right thing is expected to maximize goal achievement, given available
information computer agents
◦operate autonomously,
◦perceive their environment,
◦persist over a prolonged time period,
◦adapt to change, and
◦create and pursue goals
Rational agent is one that acts so as to achieve the best outcome or, when there
is uncertainty, the best expected outcome
correct inference is not all of rationality in some situations, there is no
provably correct thing to do, but something must still be done. There are also
ways of acting rationally that cannot be said to involve inference
REQUIREMENTS
NATURAL LANGUAGE PROCESSING
To enable it to communicate successfully
KNOWLEDGE REPRESENTATION
Knowledge representation to store what it knows or hears;
AUTMATED REASONING
Automated reasoning to use the stored information to answer questions and to draw new conclusions
MACHINE LEARNING
machine learning to adapt to new circumstances and to detect and extrapolate patterns.
COMPUTER VISION
Computer vision to perceive objects
ROBOTICS
Robotics to manipulate objects and move about
How do we measure if Artificial Intelligence
is acting like a human?
Turing Test
The Cognitive Modelling Approach
The Law of Thought Approach
The Rational Agent Approach
Artificial Intelligence
 An intelligent entity created by humans.
 Capable of performing tasks intelligently without being explicitly instructed.
 Capable of thinking and acting rationally and humanely.
Fields in AI
THE FOUNDATIONS OF ARTIFICIAL
INTELLIGENCE
Philosophy
Can formal rules be used to draw valid conclusions?
How does the mind arise from a physical brain?
Where does knowledge come from?
How does knowledge lead to action?
Rationalism: power of reasoning in understanding the world
Dualism: there is a part of the human mind (or soul or spirit) that is outside of nature, exempt from physical laws
Materialism: brain’s operation according to the laws of physics constitutes the mind
Empiricism:
Induction: general rules are acquired by exposure to repeated associations between their elements
Logical positivism: doctrine holds that all knowledge can be characterized by logical theories connected, ultimately,
to
observation sentences that correspond to sensory inputs; thus logical positivism combines rationalism and empiricism
confirmation theory: attempted to analyze the acquisition of knowledge from experience
Mathematics
• What are the formal rules to draw valid conclusions?
• What can be computed?
•How do we reason with uncertain
information? three fundamental areas:
1. logic,
2. computation, and
3. probability.
George Boole: worked out the details of
propositional, or Boolean, logic
Gottlob Frege: creating the first order logic
that is used today
Euclid’s algorithm: first nontrivial algorithm
Kurt G¨odel: incompleteness theorem
Alan Turing: characterize exactly which
functions are computable. Turing machine
Tractability: problem is called intractable if the time required to solve instances of the problem
grows exponentially with the size of the instances
◦ NP-completeness
Despite the increasing speed of computers, careful use of resources will characterize intelligent
systems
Theory of probability: deal with uncertain measurements and incomplete theories.
Economics
• How should we make decisions so as to maximize payoff?
• How should we do this when others may not go along?
• How should we do this when the payoff may be far in the future?
studying how people make choices that lead to preferred outcomes
Decision theory: combines probability theory with utility theory, provides a formal and complete
framework for decisions made under uncertainty
Game theory: Von Neumann and Morgenstern, a rational agent should adopt policies that are (or
least
appear to be) randomized. game theory does not offer an unambiguous prescription for selecting
actions
Neuroscience
• How do brains process information?
Neuroscience is the study of the nervous system, particularly the brain
Aristotle wrote, “Of all the animals, man has the largest brain in proportion to his size.”
Nicolas Rashevsky: the first to apply mathematical models to the study of the nervous
system.
Psychology
• How do humans and animals think and
act?
Computer Engineering
• How can we build an efficient computer?
Control theory and cybernetics
• How can artifacts operate under their own
control?
Linguistics
How does language relate to thought?
History of AI- Tutorial 1
Founding Fathers
Gestation of Artificial Intelligence
(1943- 1955)
•Year 1943: The first work which is now recognized as AI was done by Warren McCulloch and
Walter pits in 1943. They proposed a model of artificial neurons.
•Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection strength
between neurons. His rule is now called Hebbian learning.
•Year 1950: The Alan Turing who was an English mathematician and pioneered Machine learning
in 1950. Alan Turing publishes "Computing Machinery and Intelligence" in which he proposed a
test. The test can check the machine's ability to exhibit intelligent behavior equivalent to human
intelligence, called a Turing test.
Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial intelligence program
Which was named as "Logic Theorist". This program had proved 38 of 52 Mathematics
theorems, and find new and more elegant proofs for some theorems.
The birth of artificial intelligence (1956)
The word "Artificial Intelligence" first adopted by American Computer scientist John McCarthy at
the Dartmouth Conference. For the first time, AI coined as an academic field.
The golden years-Early enthusiasm (1956-1974)
•Year 1966:
• The researchers emphasized developing algorithms which can solve mathematical problems. Joseph
Weizenbaum created the first chatbot in 1966, which was named as ELIZA.
•Year 1972:
• The first intelligent humanoid robot was built in Japan which was named as WABOT-1.
Deep Networks-A Brief history
Problem Characteristics-
Is the problem Decomposable?
Can solution steps be ignored or undone?
Is the universe predictable?
Is a good solution Absolute or relative
Is the solution a state or path?
What is the Role of Knowledge
Does the task require interaction with
a person?
Is the problem Decomposable?
Decomposable problems
Non Decomposable problems
1. Decomposable problems
can solve this problem by breaking it down into
three smaller problems
each of which we can then solve by using a small
collection of specific rules.
problem decomposition
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
2. Non Decomposable problems
A simple blocks world problem
Cont..
Cont..
Regardless of which one we do first we will not be able to do the second as we had planned.
In this problem the two sub problems are not independent.
They interact and those interactions must be considered in order to arrive at a solution for
entire problem.
Can solution steps be ignored or
undone?
Here we can divide problems into 3 classes.
◦Ignorable, in which solution steps can be ignored.
◦Recoverable, in which solution steps can be undone.
◦Irrecoverable, in which solution steps cannot be undone.
Ignorable Problem
eg, Theorm Proving
Suppose we are trying to prove a mathematical theorem.
We proceed by first proving a lemma that we think will be useful.
Eventually we realize that the lemma is no help at all.
Here the different steps in proving the theorem can be ignored.
Then we can start from another rule.
The former can be ignored.
eg, Puezzl
8-puzzle solver can keep track of the order in which operations are performed so that the operations can be
undone one at a time if necessary.
Recoverable Problems
Irrecoverable problems
eg. Chess
Suppose a chess playing program makes a stupid move and realizes it a couple of moves later.
It cannot simply play as though it had never made the stupid move.
Nor can it simply back up and start the game over from that point.
All it can do is to try to make the best of the current situation and go from there.
Cont..
Ignorable problems can be solved using a simple control structure.
Recoverable problems can be solved by a slightly more complicated control strategy that does
sometimes makes mistakes.
Irrecoverable problems will need to be solved by a system that expends a great deal of effort
making each decision since the decision must be final.
Is the universe predictable?
Certain outcome problems
Uncertain outcome problems
Certain outcome problems
8 puzzle problem.
Every time we make a move, we know exactly what will happen.
This means that it is possible to plan an entire sequence of moves and be confident that we
know what the resulting state will be.
Uncertain outcome problems
Bridge
◦planning may not be possible.
◦One of the decisions we will have to make is which card to play on the
first trick.
◦it is not possible to do such planning with certainty since we cannot
know exactly where all the cards are or what the other players will do
on their turns.
4.Is a good solution Absolute or
relative
Any Path Problem
Best Path Problem
Any path problems
Is a good solution Absolute or relative
Any path problems
◦1. Marcus was a man.
◦2. Marcus was a Pompean.
◦3. Marcus was born in 40 A. D.
◦4. all men are mortal.
◦5. All pompeans died when the
volcano erupted in 79 A. D.
◦6. No mortal lives longer than 150
years.
◦7. It is now 1991 A. D.
Suppose we ask the question. “Is
Marcus alive?”.
Solutions Axiom
1 Marcus was a man. 1
4 All men are mortal. 4
3 Marcus was born in 40 A.D. 3
7 It is now 2017 A. D. 7
9 Marcus’ age is 1977 years. 3,7
6 no mortal lives longer than 150 years. 6
10 Marcus is dead. 8,6,9
Best path problems
Traveling salesman problem
Best path problems are computationally harder than any path problems.
Any path problem can often be solved in a reasonable amount of time by using heuristics that
suggest good path to explore.
5.Is the solution a state or path?
Problems whose solution is a state of the world. eg. Natural language understanding. eg,
‘ The bank president ate a dish of pasta salad with the fork’.
◦Since all we are interested in is the answer to the question, it does not matter which path we follow.
Problems whose solution is a path to a state?
◦Eg. Water jug problem
◦In water jug problem, it is not sufficient to report that we have solved the problem and that the final state is (2,0).
◦For this kind of problem, what we really must report is not the final state, but the path that we found to that
state.
6. What is the Role of Knowledge
Problems for which a lot of knowledge is important only to constrain the search for a solution.
◦Eg. Chess
◦Just the rules for determining the legal moves and some simple control mechanism that implements an
appropriate search procedure
Problems for which a lot of knowledge is required even to be able to recognize a solution.
◦Eg. News paper story understanding
7. Does the task require interaction with
a person?
Solitary problems
◦Here the computer is given a problem description and produces an answer with no intermediate
communication and with no demand for an explanation for the reasoning process.
◦Consider the problem of proving mathematical theorems. If
◦ All we want is to know that there is a proof.
◦ The program is capable of finding a proof by itself.
◦Then it does not matter what strategy the program takes to find the proof.
Cont..
Conversational problems
◦In which there is intermediate communication between a person and the computer, either to provide
additional assistance to the computer or to provide additional information to the user.
◦ Eg. Suppose we are trying to prove some new, very difficult theorem.
◦ Then the program may not know where to start.
◦ At the moment, people are still better at doing the high level strategy required for a proof.
◦ So the computer might like to be able to ask for advice.
◦ To exploit such advice, the computer’s reasoning must be analogous to that of its human advisor, at least on a few levels.
The State of the Art- What can AI do
today?
Robotic vehicles
Speech recognition
A traveler calling United Airlines to book a flight can have the entire conversation guided by an
automated speech recognition and dialog management system
Autonomous planning and scheduling
NASA’s Remote Agent program became the first on-board
autonomous planning program to control the scheduling of
operations for a spacecraft. REMOTE AGENT generated plans
from high-level goals specified from the ground and monitored the
execution of those plans—detecting, diagnosing, and recovering
from problems as they occurred
Game playing
IBM’s DEEP BLUE became the fifirst computer program to defeat
the world champion in a chess match when it bested Garry
Kasparov by a score of 3.5 to 2.5 in an exhibition match
Spam fighting: learning algorithms classify over a billion messages as spam, saving the recipient
from having to waste time deleting what, for many users, could comprise 80% or 90% of all messages,
if not classified away by algorithms
Logistics planning: During the Persian Gulf crisis of 1991, U.S. forces deployed a Dynamic Analysis
and Replanning Tool, DART (Cross and Walker, 1994), to do automated logistics planning and scheduling
for transportation. This involved up to 50,000 vehicles, cargo, and people at a time, and had to account for
starting points, destinations, routes, and conflict resolution among all parameters. The AI planning
techniques generated in hours a plan that would have taken weeks with older methods. The Defense
Advanced Research Project Agency (DARPA) stated that this single application more than paid back
DARPA’s 30-year investment in AI
Robotics: : The iRobot Corporation has sold over two million Roomba robotic vacuum cleaners for home
use. The company also deploys the more rugged PackBot to Iraq and Afghanistan, where it is used to
handle hazardous materials, clear explosives, and identify the location of snipers
Machine Translation: A computer program automatically translates from Arabic to English, allowing an
English speaker to see the headline “Ardogan Confirms That Turkey Would Not Accept Any Pressure,
Urging Them to Recognize Cyprus.” The program uses a statistical model built from examples of Arabic-
to- English translations and from examples of English text totaling two trillion words. None of the computer
scientists on the team speak Arabic, but they do understand statistics and machine learning algorithms.
INTELLIGENT
AGENTS
Agents and Environments
An agent is anything that can be viewed as perceiving its environment through
sensors and acting upon that environment through actuators
the term percept to refer to the agent’s perceptual inputs at any given instant
An agent’s percept sequence is the complete history of everything the agent has ever perceived
an agent’s choice of action at any given instant can depend on the entire percept sequence
observed to date, but not on anything it hasn’t perceived
an agent’s behavior is described by the agent function that maps any given percept sequence to
an action
[f: P*  A]
The agent program runs on the physical architecture to produce f, the agent function for an
artificial agent will be implemented by an agent program
agent = architecture + program
The agent function is an abstract mathematical description; the agent program is a concrete
implementation, running within some physical system.
The Vacuum Cleaner
World
This particular world has just two locations: squares A and B.
The vacuum agent perceives which square it is in and whether there is dirt in the square.
It can choose to move left, move right, suck up the dirt, or do nothing.
One very simple agent function is the following: if the current square is dirty, then suck;
otherwise, move to the other square.
Percepts: location and contents, e.g., [A,Dirty]
Actions: Left, Right, Suck, NoOp
Agent’s function  look-up table
For many agents this is a very large table
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
Good Behaviour: Concept of Rationality
•A rational agent is one that does the right thing
•what does it mean to do the right thing?
by considering the consequences of the agent’s behavior
When an agent is plunked down in an environment, it generates a sequence of
actions according to the percepts it receives. This sequence of actions causes the
environment to go through a sequence of states. If the sequence is desirable,
then the agent has performed well.
This notion of desirability is captured by a performance measure that
evaluates any given sequence of environment states.
Example- Vacuum Cleaner
Revisited
We might propose to measure performance by the amount of dirt cleaned up in a single
eight-hour shift.
With a rational agent, of course, what you ask for is what you get.
A rational agent can maximize this performance measure by cleaning up the dirt,
then dumping it all on the floor, then cleaning it up again, and so on.
A more suitable performance measure would reward the agent for having a clean
floor.
For example, one point could be awarded for each clean square at each time step
(perhaps with a penalty for electricity consumed and noise generated).
As a general rule, it is better to design performance measures according to what one
actually wants in the environment, rather than according to how one thinks the agent
should behave.
Performance measure: An objective criterion for success of an agent's behavior.
Performance measures of a vacuum-cleaner agent: amount of dirt cleaned up,
amount of time taken, amount of electricity consumed, level of noise generated, etc.
Performance measures self-driving car: time to reach destination (minimize),
safety, predictability of behavior for other agents, reliability, etc.
Performance measure of game-playing agent: win/loss percentage (maximize),
robustness, unpredictability (to “confuse” opponent), etc.
Rationality
•What is rational at any given time depends on four things:
– Performance measuring success
– Agents prior knowledge of environment
– Actions that agent can perform
– Agent’s percept sequence to date
•Rational Agent: For each possible percept sequence, a rational
agent should select an action that is expected to maximize its
performance measure, given the evidence provided by the
percept sequence and whatever built-in knowledge the agent
has.
Example- Vacuum Cleaner
• The performance measure awards one point for each clean square at
each time step
• The “geography” of the environment is known a priori but the dirt
distribution and the initial location of the agent are not. Clean squares
stay clean and sucking cleans the current square. The Left and Right
actions move the agent left and right except when this would take the
agent outside the environment, in which case the agent remains where
it is.
• The only available actions are Left, Right, and Suck.
• The agent correctly perceives its location and whether that
location contains dirt
Rational
Agent
For each possible percept sequence, a rational agent should select an action
that is expected to maximize its performance measure, given the evidence
provided by the percept sequence and whatever built-in knowledge the agent
has.
Omniscience, learning, and autonomy
Omniscient agent: knows the actual outcome of its actions and can act accordingly;
but omniscience is
impossible in reality.
rationality is not the same as perfection.
Rationality maximizes expected performance, while perfection maximizes actual
performance
information gathering
Exploration
learn as much as
possible from what it
perceives
rational agent should be autonomous—it should learn what it can to compensate for
partial or incorrect prior knowledge
Task Environment PEAS
PEAS (Performance, Environment,
Actuators, Sensors)
In designing an agent, the first step must always
be to
specify the task environment as fully as possible
Example: the task of designing a self-
driving car
◦ Performance measure Safe, fast, legal, comfortable trip
◦ Environment Roads, other traffic, pedestrians
◦ Actuators Steering wheel, accelerator, brake,
signal, horn
◦ Sensors Cameras, LIDAR (light/radar), speedometer,
GPS, odometer
engine sensors, keyboard
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
Task Environment Types
•Fully observable (vs. partially observable)
•Single agent(vs. Multi agent)
•Deterministic (vs. stochastic)
•Episodic (vs. sequential)
•Static (vs. dynamic)
•Discrete (vs. continuous)
•Known (vs. unknown)
Fully observable vs. partially observable
If an agent’s sensors give it access to the complete state of the environment at
each point in time, then we say that the task environment is fully observable.
A task environment is effectively fully observable if the sensors detect all
aspects that are relevant to the choice of action; relevance, in turn, depends on
the performance measure.
Fully observable environments are convenient because the agent need
not maintain any internal state to keep track of the world.
An environment might be partially observable because of noisy and
inaccurate sensors or because parts of the state are simply missing from the
sensor data
If the agent has no sensors at all then the environment is unobservable
Single agent vs. multiagent
If only one agent is involved in an environment, and operating by itself then such an
environment is called single agent environment.
However, if multiple agents are operating in an environment, then such an
environment is called
a multi-agent environment.
chess is a competitive multiagent environment.
In the taxi-driving environment avoiding collisions maximizes the performance
measure of all
agents, so it is a partially cooperative multiagent environment.
◦It is also partially competitive because, for example, only one car can occupy a
parking space.
Deterministic vs. stochastic
If the next state of the environment is completely determined by the current state and the action executed
by the agent, then we say the environment is deterministic; otherwise, it is stochastic.
an agent need not worry about uncertainty in a fully observable, deterministic
environment. If the environment is partially observable, however, then it could appear to
be stochastic.
environment is uncertain if it is not fully observable or not deterministic.
“stochastic” generally implies that uncertainty about outcomes is quantified in terms of probabilities
a nondeterministic environment is one in which actions are characterized by their possible outcomes,
but no probabilities are attached to them
Episodic vs. sequential
Episodic task environment:
◦the agent’s experience is divided into atomic episodes.
◦In each episode the agent receives a percept and then performs a single action.
◦Crucially, the next episode does not depend on the actions taken in previous
episodes.
◦Many classification tasks are episodic.
Sequential environments
◦the current decision could affect all future decisions
◦Chess and taxi driving are sequential: in both cases, short-term actions can have long-
term consequences.
◦Episodic environments are much simpler than sequential environments because the
agent does not need to think ahead.
Static vs. dynamic
If the environment can change while an agent is deliberating, then we say the environment
is dynamic for that agent; otherwise, it is static
A static environment does not change while the agent is thinking.
The passage of time as an agent deliberates is irrelevant.
Dynamic environments, on the other hand, are continuously asking the agent what it wants
to do;
if it hasn’t decided yet, that counts as deciding to do nothing.
If the environment itself does not change with the passage of time but the agent’s
performance
score does, then we say the environment is semi-dynamic.
Chess, when played with a clock, is semi-dynamic.
Crossword puzzles are static
Discrete vs. continuous
If the number of distinct percepts and actions is limited, the environment is discrete, otherwise
it is continuous.
The chess environment has a finite number of distinct states (excluding the clock).
Chess also has a discrete set of percepts and actions.
Taxi driving is a continuous-state and continuous-time problem: the speed and location of the taxi and of the
other vehicles sweep through a range of continuous values and do so smoothly over time
Taxi-driving actions are also continuous (steering angles, etc.).
Input from digital cameras is discrete, strictly speaking, but is typically treated as representing
continuously varying intensities and locations.
Known vs.
unknown
In a known environment, the outcomes (or outcome probabilities if the environment is
stochastic) for all actions are given.
If the environment is unknown, the agent will have to learn how it works in order to make good
decisions
a known environment can be partially observable
◦ for example, in solitaire card games, I know the rules but am still unable to see the cards
that have not yet been turned over.
An unknown environment can be fully observable
◦ in a new video game, the screen may show the entire game state but I still don’t know
what
the buttons do until I try them.
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
Structure of
Agent
The job of AI is to design an agent program that implements the agent
function the mapping from percepts to actions.
his program will run on some sort of computing device with physical sensors
and actuators called the architecture
agent = architecture + program
architecture makes the percepts from the sensors available to the program, runs
the program, and feeds the program’s action choices to the actuators as they
are generated
Agent programs
Agent program: use current percept as input from the sensors and return an action to the actuators
Agent function: takes the entire percept history
To build a rational agent in this way, we as designers must construct a table that contains the appropriate action for
every possible percept sequence.
Let P be the set of possible percepts and let T be the lifetime of the agent (the total number of percepts
it will receive)
The lookup table will contain entries
Consider the automated taxi: the visual input from a single camera comes in at the rate of roughly 27
megabytes per second (30 frames per second, 640 × 480 pixels with 24 bits of color information). This
gives a lookup table with over 10250,000,000,000 entries for an hour’s driving.
Even the lookup table for chess a tiny, well-behaved fragment of the real world would have at least
10150 entries.
The daunting size of these tables (the number of atoms in the observable universe is less than 1080)
means that
a) no physical agent in this universe will have the space to store the table,
b) the designer would not have time to create the table,
c) no agent could ever learn all the right table entries from its experience, and
d) even if the environment is simple enough to yield a feasible table size, the designer still has no
guidance about how to fill in the table entries.
Types of Agent Programs
Four basic kinds of agent programs that embody the principles underlying
almost all intelligent systems:
1. Simple reflex agents;
2. Model-based reflex agents;
3. Goal-based agents; and
4. Utility-based agents
Simple reflex agents
Select actions on the basis of the current percept, ignoring the rest of the percept
history
Agents do not have memory of past world states or percepts.
So, actions depend solely on current percept.
Action becomes a “reflex.”
Uses condition-action rules.
condition–action rule
if car-in-front-is-braking then initiate-braking
If tail-light of car in front is
red, then brake.
The INTERPRET-INPUT function generates an abstracted description of the
current state from the percept, and
the RULE-MATCH function returns the fifirst rule in the set of rules that
matches
the given state description. Note that the description in terms of “rules”
and “matching” is purely conceptual;
actual implementations can be as simple as a collection of logic gates
implementing a Boolean circuit
This will work only if the correct decision can be made on the basis of only the
current percept—that is, only if the environment is fully observable.
Even a little bit of unobservability can cause serious trouble. For example, the
braking rule given earlier assumes that the condition car-in-front-is-braking can
be determined from the current percept—a single frame of video.
This works if the car in front has a centrally mounted brake light.
Infinite loops are often unavoidable for simple reflex agents operating
in partially observable environments
Escape from infifinite loops is possible if the agent can randomize its
actions.
Model-based reflex agents
Key difference (wrt simple reflex agents):
◦Agents have internal state, which is used to keep track of past states of the world.
◦ Agents have the ability to represent change in the World.
“Infers potentially
dangerous driver
in front.”
If “dangerous driver in front,”
then “keep distance.”
represents the
agent’s “best
guess”
internal state information as time goes by requires two kinds of knowledge to be encoded in the
agent program
1. we need some information about how the world evolves independently of the agent
2. we need some information about how the agent’s own actions affect the world
knowledge about “how the world works is called a model of the world. An agent that uses such a model
is called a model-based agent.
UPDATE-STATE, which is responsible for creating the new internal state description.
Goal-based agents
Key difference wrt Model-Based Agents:
In addition to state information, have goal information that
describes desirable situations to be achieved.
Search and planning are the subfields of AI devoted to finding action sequences that achieve the
agent’s goals
Agents of this kind take future events into consideration.
What sequence of actions can I take to achieve certain goals?
Choose actions so as to (eventually) achieve a (given or computed) goal.
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
Utility-based agents
Goals alone are not enough to generate high-quality behavior in most
environments
Goals just provide a crude binary distinction between “happy” and
“unhappy”
states
Because “happy” does not sound very scientific, economists and
computer
scientists use the term utility instead
An agent’s utility function is essentially an internalization of the performance
measure. If the internal utility function and the external performance measure
are in agreement, then an agent that chooses actions to maximize its utility will
be rational according to the external performance measure.
Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form
Learning
agents
A learning agent can be divided into four conceptual components
1. learning element, which is responsible for making improvements
2. performance element, which is responsible for selecting external actions. The performance
element is what we have previously considered to be the entire agent: it takes in percepts
and decides on actions.
3. Feedback from the critic : on how the agent is doing and determines how the performance
element should be modified to do better in the future
4. problem generator. It is responsible for suggesting actions that will lead to new
and informative experiences

More Related Content

Similar to Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form (20)

PDF
Cognitive Science Unit 2
CSITSansar
 
PPT
AI.ppt
Mard Geer
 
PDF
1.INTRODUCTION AI.pdf
SachinJadhav810388
 
PPTX
Chapter_1_Introductnvjygcgfxhgfxhfxhgfion.pptx
gkavitha5225
 
PDF
Lect 01, 02
MuhammedTaha4
 
PPTX
Artificial Intelligences -CHAPTER 1_1.pptx
wesenderbe
 
PPTX
Introduction to ArtificiaI Intelligence.pptx
IJoseph2
 
PPTX
AI Chapter 1.pptx
demissieejo
 
PPT
Artificial intelligence
ravijain90
 
PPTX
LEC_2_AI_INTRODUCTION - Copy.pptx
Ajaykumar967485
 
DOCX
Cosc 208 lecture note-1
Yasin Muhammed Tukur
 
PDF
Artificial intelligence - Approach and Method
Ruchi Jain
 
PPTX
Module1_AI_6_12_2023_basics of Artificial Intelligence
poojapp6
 
PPT
AI Introduction Artificial intelligence introduction fundamentals alogirthms ...
Dr.ganesh Narasimhan
 
PPTX
AI111111111111111111111111111111111.pptx
sameehamoogab
 
PPTX
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
BifaHirpo1
 
PPT
AI Unit1b.ppt
KhanKhaja1
 
PPT
AI Unit1.ppt
KhanKhaja1
 
PPTX
Basics of artificial intelligence and machine learning
Sanjay Kumar
 
PPTX
Artificial Intelligence problem solving agents
Sanjay Kumar
 
Cognitive Science Unit 2
CSITSansar
 
AI.ppt
Mard Geer
 
1.INTRODUCTION AI.pdf
SachinJadhav810388
 
Chapter_1_Introductnvjygcgfxhgfxhfxhgfion.pptx
gkavitha5225
 
Lect 01, 02
MuhammedTaha4
 
Artificial Intelligences -CHAPTER 1_1.pptx
wesenderbe
 
Introduction to ArtificiaI Intelligence.pptx
IJoseph2
 
AI Chapter 1.pptx
demissieejo
 
Artificial intelligence
ravijain90
 
LEC_2_AI_INTRODUCTION - Copy.pptx
Ajaykumar967485
 
Cosc 208 lecture note-1
Yasin Muhammed Tukur
 
Artificial intelligence - Approach and Method
Ruchi Jain
 
Module1_AI_6_12_2023_basics of Artificial Intelligence
poojapp6
 
AI Introduction Artificial intelligence introduction fundamentals alogirthms ...
Dr.ganesh Narasimhan
 
AI111111111111111111111111111111111.pptx
sameehamoogab
 
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
BifaHirpo1
 
AI Unit1b.ppt
KhanKhaja1
 
AI Unit1.ppt
KhanKhaja1
 
Basics of artificial intelligence and machine learning
Sanjay Kumar
 
Artificial Intelligence problem solving agents
Sanjay Kumar
 

More from chandushivamurthy4 (7)

PPTX
Job Opportunities in India engineeri.ppt
chandushivamurthy4
 
PPTX
Army-Soldier-in-Action-PowerPoint-Templates.pptx
chandushivamurthy4
 
PPTX
Module 5.pptx HTTP protocol on optical and wireless communication
chandushivamurthy4
 
PPTX
Digital twin technology.pptx technical seminar presentation
chandushivamurthy4
 
PPTX
Semicustom.pptx Asics concept on VLSI for 7th sem students of engineering stu...
chandushivamurthy4
 
PPTX
OPTICAL AND WIRELESS COMMUNICATION ppt notes
chandushivamurthy4
 
PPTX
3b3cc80e-80f2-4bdc-94f2-6b17947fddb0.pptx
chandushivamurthy4
 
Job Opportunities in India engineeri.ppt
chandushivamurthy4
 
Army-Soldier-in-Action-PowerPoint-Templates.pptx
chandushivamurthy4
 
Module 5.pptx HTTP protocol on optical and wireless communication
chandushivamurthy4
 
Digital twin technology.pptx technical seminar presentation
chandushivamurthy4
 
Semicustom.pptx Asics concept on VLSI for 7th sem students of engineering stu...
chandushivamurthy4
 
OPTICAL AND WIRELESS COMMUNICATION ppt notes
chandushivamurthy4
 
3b3cc80e-80f2-4bdc-94f2-6b17947fddb0.pptx
chandushivamurthy4
 
Ad

Recently uploaded (20)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Horarios de distribución de agua en julio
pegazohn1978
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Introduction to Indian Writing in English
Trushali Dodiya
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Ad

Module 01 IS & MLA.pptx for 22 scheme notes in a ppt form

  • 2. SYLLABUS Introduction- What is Artificial Intelligence Foundation of AI History of AI Applications of AI Intelligent Agents- Agents and Environment Good Behaviour The concept of rationality, nature of environment Structure of Agents
  • 3. ARTIFICIAL INTELLIGENCE Artificial intelligence allows machines to replicate the capabilities of the human mind. From the development of self-driving cars to the development of smart assistants like Siri and Alexa, AI is a growing part of everyday life. Artificial intelligence is a wide-ranging branch of computer science concerned with building smart machines capable of performing tasks that typically require human intelligence.
  • 4. What is AI The definitions on the left measure success in terms of fidelity to human performance, the ones on the right measure against an ideal performance measure, called rationality. A system is rational if it does the “right thing,” given what it knows.
  • 5. Turing Test (Human) judge communicates with a human and a machine over text-only channel, Both human and machine try to act like a human, Judge tries to tell which is which. Numerous variants Loebner prize Current programs nowhere close to passing this ◦http://www.jabber wacky.com/ ◦http://turingtrade.o
  • 6. What is the Turing Test in Artificial Intelligence? NLP to communicate successfully. Knowledge Representation to act as its memory. Automated Reasoning to use the stored information to answer questions and draw new conclusions. Machine Learning to detect patterns and adapt to new circumstances.
  • 7. Acting humanly: The Turing Test approach A computer passes the test if a human interrogator, after posing some written questions, cannot tell whether the written responses come from a person or from a computer The computer would need to possess the following capabilities: 1. natural language processing to enable it to communicate successfully in English 2. knowledge representation to store what it knows or hears 3. automated reasoning to use the stored information to answer questions and to draw new conclusions 4. machine learning to adapt to new circumstances and to detect and extrapolate patterns 5. TOTAL TURING TEST- To pass the total Turing Test, the computer will need  computer vision to perceive objects, and  robotics to manipulate objects and move about
  • 8. Thinking humanly: The cognitive modeling approach introspection—trying to catch our own thoughts as they go by psychological experiments—observing a person in action brain imaging—observing the brain in action cognitive science brings together computer models from AI and experimental techniques from psychology to construct precise and testable theories of the human mind.
  • 9. Thinking rationally: The “laws of thought” approach e SYLLOGISM: an instance of a form of reasoning in which a conclusion is drawn from two given or assumed propositions, “Socrates is a man; all men are mortal; therefore, Socrates is mortal.” LOGIC: study of laws of thought to govern the operation of the mind not easy to take informal knowledge and state it in th formal terms required by logical notation Even problems with just a few hundred facts can exhaust the computational resources of any computer unless it has some guidance as to which reasoning steps to try first.
  • 10. Acting rationally: The rational agent approach An agent is just something that acts Rational behavior is doing the right thing Right thing is expected to maximize goal achievement, given available information computer agents ◦operate autonomously, ◦perceive their environment, ◦persist over a prolonged time period, ◦adapt to change, and ◦create and pursue goals Rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome correct inference is not all of rationality in some situations, there is no provably correct thing to do, but something must still be done. There are also ways of acting rationally that cannot be said to involve inference
  • 11. REQUIREMENTS NATURAL LANGUAGE PROCESSING To enable it to communicate successfully KNOWLEDGE REPRESENTATION Knowledge representation to store what it knows or hears; AUTMATED REASONING Automated reasoning to use the stored information to answer questions and to draw new conclusions MACHINE LEARNING machine learning to adapt to new circumstances and to detect and extrapolate patterns. COMPUTER VISION Computer vision to perceive objects ROBOTICS Robotics to manipulate objects and move about
  • 12. How do we measure if Artificial Intelligence is acting like a human? Turing Test The Cognitive Modelling Approach The Law of Thought Approach The Rational Agent Approach
  • 13. Artificial Intelligence  An intelligent entity created by humans.  Capable of performing tasks intelligently without being explicitly instructed.  Capable of thinking and acting rationally and humanely.
  • 15. THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
  • 16. Philosophy Can formal rules be used to draw valid conclusions? How does the mind arise from a physical brain? Where does knowledge come from? How does knowledge lead to action? Rationalism: power of reasoning in understanding the world Dualism: there is a part of the human mind (or soul or spirit) that is outside of nature, exempt from physical laws Materialism: brain’s operation according to the laws of physics constitutes the mind Empiricism: Induction: general rules are acquired by exposure to repeated associations between their elements Logical positivism: doctrine holds that all knowledge can be characterized by logical theories connected, ultimately, to observation sentences that correspond to sensory inputs; thus logical positivism combines rationalism and empiricism confirmation theory: attempted to analyze the acquisition of knowledge from experience
  • 17. Mathematics • What are the formal rules to draw valid conclusions? • What can be computed? •How do we reason with uncertain information? three fundamental areas: 1. logic, 2. computation, and 3. probability. George Boole: worked out the details of propositional, or Boolean, logic Gottlob Frege: creating the first order logic that is used today Euclid’s algorithm: first nontrivial algorithm Kurt G¨odel: incompleteness theorem Alan Turing: characterize exactly which functions are computable. Turing machine
  • 18. Tractability: problem is called intractable if the time required to solve instances of the problem grows exponentially with the size of the instances ◦ NP-completeness Despite the increasing speed of computers, careful use of resources will characterize intelligent systems Theory of probability: deal with uncertain measurements and incomplete theories.
  • 19. Economics • How should we make decisions so as to maximize payoff? • How should we do this when others may not go along? • How should we do this when the payoff may be far in the future? studying how people make choices that lead to preferred outcomes Decision theory: combines probability theory with utility theory, provides a formal and complete framework for decisions made under uncertainty Game theory: Von Neumann and Morgenstern, a rational agent should adopt policies that are (or least appear to be) randomized. game theory does not offer an unambiguous prescription for selecting actions
  • 20. Neuroscience • How do brains process information? Neuroscience is the study of the nervous system, particularly the brain Aristotle wrote, “Of all the animals, man has the largest brain in proportion to his size.” Nicolas Rashevsky: the first to apply mathematical models to the study of the nervous system.
  • 21. Psychology • How do humans and animals think and act?
  • 22. Computer Engineering • How can we build an efficient computer?
  • 23. Control theory and cybernetics • How can artifacts operate under their own control?
  • 24. Linguistics How does language relate to thought?
  • 25. History of AI- Tutorial 1
  • 27. Gestation of Artificial Intelligence (1943- 1955) •Year 1943: The first work which is now recognized as AI was done by Warren McCulloch and Walter pits in 1943. They proposed a model of artificial neurons. •Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection strength between neurons. His rule is now called Hebbian learning. •Year 1950: The Alan Turing who was an English mathematician and pioneered Machine learning in 1950. Alan Turing publishes "Computing Machinery and Intelligence" in which he proposed a test. The test can check the machine's ability to exhibit intelligent behavior equivalent to human intelligence, called a Turing test. Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial intelligence program Which was named as "Logic Theorist". This program had proved 38 of 52 Mathematics theorems, and find new and more elegant proofs for some theorems.
  • 28. The birth of artificial intelligence (1956) The word "Artificial Intelligence" first adopted by American Computer scientist John McCarthy at the Dartmouth Conference. For the first time, AI coined as an academic field. The golden years-Early enthusiasm (1956-1974) •Year 1966: • The researchers emphasized developing algorithms which can solve mathematical problems. Joseph Weizenbaum created the first chatbot in 1966, which was named as ELIZA. •Year 1972: • The first intelligent humanoid robot was built in Japan which was named as WABOT-1.
  • 30. Problem Characteristics- Is the problem Decomposable? Can solution steps be ignored or undone? Is the universe predictable? Is a good solution Absolute or relative Is the solution a state or path? What is the Role of Knowledge Does the task require interaction with a person?
  • 31. Is the problem Decomposable? Decomposable problems Non Decomposable problems
  • 32. 1. Decomposable problems can solve this problem by breaking it down into three smaller problems each of which we can then solve by using a small collection of specific rules. problem decomposition
  • 34. 2. Non Decomposable problems A simple blocks world problem
  • 36. Cont.. Regardless of which one we do first we will not be able to do the second as we had planned. In this problem the two sub problems are not independent. They interact and those interactions must be considered in order to arrive at a solution for entire problem.
  • 37. Can solution steps be ignored or undone? Here we can divide problems into 3 classes. ◦Ignorable, in which solution steps can be ignored. ◦Recoverable, in which solution steps can be undone. ◦Irrecoverable, in which solution steps cannot be undone.
  • 38. Ignorable Problem eg, Theorm Proving Suppose we are trying to prove a mathematical theorem. We proceed by first proving a lemma that we think will be useful. Eventually we realize that the lemma is no help at all. Here the different steps in proving the theorem can be ignored. Then we can start from another rule. The former can be ignored.
  • 39. eg, Puezzl 8-puzzle solver can keep track of the order in which operations are performed so that the operations can be undone one at a time if necessary. Recoverable Problems
  • 40. Irrecoverable problems eg. Chess Suppose a chess playing program makes a stupid move and realizes it a couple of moves later. It cannot simply play as though it had never made the stupid move. Nor can it simply back up and start the game over from that point. All it can do is to try to make the best of the current situation and go from there.
  • 41. Cont.. Ignorable problems can be solved using a simple control structure. Recoverable problems can be solved by a slightly more complicated control strategy that does sometimes makes mistakes. Irrecoverable problems will need to be solved by a system that expends a great deal of effort making each decision since the decision must be final.
  • 42. Is the universe predictable? Certain outcome problems Uncertain outcome problems
  • 43. Certain outcome problems 8 puzzle problem. Every time we make a move, we know exactly what will happen. This means that it is possible to plan an entire sequence of moves and be confident that we know what the resulting state will be.
  • 44. Uncertain outcome problems Bridge ◦planning may not be possible. ◦One of the decisions we will have to make is which card to play on the first trick. ◦it is not possible to do such planning with certainty since we cannot know exactly where all the cards are or what the other players will do on their turns.
  • 45. 4.Is a good solution Absolute or relative Any Path Problem Best Path Problem
  • 46. Any path problems Is a good solution Absolute or relative Any path problems ◦1. Marcus was a man. ◦2. Marcus was a Pompean. ◦3. Marcus was born in 40 A. D. ◦4. all men are mortal. ◦5. All pompeans died when the volcano erupted in 79 A. D. ◦6. No mortal lives longer than 150 years. ◦7. It is now 1991 A. D. Suppose we ask the question. “Is Marcus alive?”.
  • 47. Solutions Axiom 1 Marcus was a man. 1 4 All men are mortal. 4 3 Marcus was born in 40 A.D. 3 7 It is now 2017 A. D. 7 9 Marcus’ age is 1977 years. 3,7 6 no mortal lives longer than 150 years. 6 10 Marcus is dead. 8,6,9
  • 48. Best path problems Traveling salesman problem Best path problems are computationally harder than any path problems. Any path problem can often be solved in a reasonable amount of time by using heuristics that suggest good path to explore.
  • 49. 5.Is the solution a state or path? Problems whose solution is a state of the world. eg. Natural language understanding. eg, ‘ The bank president ate a dish of pasta salad with the fork’. ◦Since all we are interested in is the answer to the question, it does not matter which path we follow. Problems whose solution is a path to a state? ◦Eg. Water jug problem ◦In water jug problem, it is not sufficient to report that we have solved the problem and that the final state is (2,0). ◦For this kind of problem, what we really must report is not the final state, but the path that we found to that state.
  • 50. 6. What is the Role of Knowledge Problems for which a lot of knowledge is important only to constrain the search for a solution. ◦Eg. Chess ◦Just the rules for determining the legal moves and some simple control mechanism that implements an appropriate search procedure Problems for which a lot of knowledge is required even to be able to recognize a solution. ◦Eg. News paper story understanding
  • 51. 7. Does the task require interaction with a person? Solitary problems ◦Here the computer is given a problem description and produces an answer with no intermediate communication and with no demand for an explanation for the reasoning process. ◦Consider the problem of proving mathematical theorems. If ◦ All we want is to know that there is a proof. ◦ The program is capable of finding a proof by itself. ◦Then it does not matter what strategy the program takes to find the proof.
  • 52. Cont.. Conversational problems ◦In which there is intermediate communication between a person and the computer, either to provide additional assistance to the computer or to provide additional information to the user. ◦ Eg. Suppose we are trying to prove some new, very difficult theorem. ◦ Then the program may not know where to start. ◦ At the moment, people are still better at doing the high level strategy required for a proof. ◦ So the computer might like to be able to ask for advice. ◦ To exploit such advice, the computer’s reasoning must be analogous to that of its human advisor, at least on a few levels.
  • 53. The State of the Art- What can AI do today? Robotic vehicles Speech recognition A traveler calling United Airlines to book a flight can have the entire conversation guided by an automated speech recognition and dialog management system
  • 54. Autonomous planning and scheduling NASA’s Remote Agent program became the first on-board autonomous planning program to control the scheduling of operations for a spacecraft. REMOTE AGENT generated plans from high-level goals specified from the ground and monitored the execution of those plans—detecting, diagnosing, and recovering from problems as they occurred Game playing IBM’s DEEP BLUE became the fifirst computer program to defeat the world champion in a chess match when it bested Garry Kasparov by a score of 3.5 to 2.5 in an exhibition match
  • 55. Spam fighting: learning algorithms classify over a billion messages as spam, saving the recipient from having to waste time deleting what, for many users, could comprise 80% or 90% of all messages, if not classified away by algorithms Logistics planning: During the Persian Gulf crisis of 1991, U.S. forces deployed a Dynamic Analysis and Replanning Tool, DART (Cross and Walker, 1994), to do automated logistics planning and scheduling for transportation. This involved up to 50,000 vehicles, cargo, and people at a time, and had to account for starting points, destinations, routes, and conflict resolution among all parameters. The AI planning techniques generated in hours a plan that would have taken weeks with older methods. The Defense Advanced Research Project Agency (DARPA) stated that this single application more than paid back DARPA’s 30-year investment in AI
  • 56. Robotics: : The iRobot Corporation has sold over two million Roomba robotic vacuum cleaners for home use. The company also deploys the more rugged PackBot to Iraq and Afghanistan, where it is used to handle hazardous materials, clear explosives, and identify the location of snipers
  • 57. Machine Translation: A computer program automatically translates from Arabic to English, allowing an English speaker to see the headline “Ardogan Confirms That Turkey Would Not Accept Any Pressure, Urging Them to Recognize Cyprus.” The program uses a statistical model built from examples of Arabic- to- English translations and from examples of English text totaling two trillion words. None of the computer scientists on the team speak Arabic, but they do understand statistics and machine learning algorithms.
  • 59. Agents and Environments An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators
  • 60. the term percept to refer to the agent’s perceptual inputs at any given instant An agent’s percept sequence is the complete history of everything the agent has ever perceived an agent’s choice of action at any given instant can depend on the entire percept sequence observed to date, but not on anything it hasn’t perceived an agent’s behavior is described by the agent function that maps any given percept sequence to an action [f: P*  A] The agent program runs on the physical architecture to produce f, the agent function for an artificial agent will be implemented by an agent program agent = architecture + program The agent function is an abstract mathematical description; the agent program is a concrete implementation, running within some physical system.
  • 61. The Vacuum Cleaner World This particular world has just two locations: squares A and B. The vacuum agent perceives which square it is in and whether there is dirt in the square. It can choose to move left, move right, suck up the dirt, or do nothing. One very simple agent function is the following: if the current square is dirty, then suck; otherwise, move to the other square. Percepts: location and contents, e.g., [A,Dirty] Actions: Left, Right, Suck, NoOp Agent’s function  look-up table For many agents this is a very large table
  • 63. Good Behaviour: Concept of Rationality •A rational agent is one that does the right thing •what does it mean to do the right thing? by considering the consequences of the agent’s behavior When an agent is plunked down in an environment, it generates a sequence of actions according to the percepts it receives. This sequence of actions causes the environment to go through a sequence of states. If the sequence is desirable, then the agent has performed well. This notion of desirability is captured by a performance measure that evaluates any given sequence of environment states.
  • 64. Example- Vacuum Cleaner Revisited We might propose to measure performance by the amount of dirt cleaned up in a single eight-hour shift. With a rational agent, of course, what you ask for is what you get. A rational agent can maximize this performance measure by cleaning up the dirt, then dumping it all on the floor, then cleaning it up again, and so on. A more suitable performance measure would reward the agent for having a clean floor. For example, one point could be awarded for each clean square at each time step (perhaps with a penalty for electricity consumed and noise generated). As a general rule, it is better to design performance measures according to what one actually wants in the environment, rather than according to how one thinks the agent should behave.
  • 65. Performance measure: An objective criterion for success of an agent's behavior. Performance measures of a vacuum-cleaner agent: amount of dirt cleaned up, amount of time taken, amount of electricity consumed, level of noise generated, etc. Performance measures self-driving car: time to reach destination (minimize), safety, predictability of behavior for other agents, reliability, etc. Performance measure of game-playing agent: win/loss percentage (maximize), robustness, unpredictability (to “confuse” opponent), etc.
  • 66. Rationality •What is rational at any given time depends on four things: – Performance measuring success – Agents prior knowledge of environment – Actions that agent can perform – Agent’s percept sequence to date •Rational Agent: For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.
  • 67. Example- Vacuum Cleaner • The performance measure awards one point for each clean square at each time step • The “geography” of the environment is known a priori but the dirt distribution and the initial location of the agent are not. Clean squares stay clean and sucking cleans the current square. The Left and Right actions move the agent left and right except when this would take the agent outside the environment, in which case the agent remains where it is. • The only available actions are Left, Right, and Suck. • The agent correctly perceives its location and whether that location contains dirt
  • 68. Rational Agent For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.
  • 69. Omniscience, learning, and autonomy Omniscient agent: knows the actual outcome of its actions and can act accordingly; but omniscience is impossible in reality. rationality is not the same as perfection. Rationality maximizes expected performance, while perfection maximizes actual performance information gathering Exploration learn as much as possible from what it perceives rational agent should be autonomous—it should learn what it can to compensate for partial or incorrect prior knowledge
  • 70. Task Environment PEAS PEAS (Performance, Environment, Actuators, Sensors) In designing an agent, the first step must always be to specify the task environment as fully as possible Example: the task of designing a self- driving car ◦ Performance measure Safe, fast, legal, comfortable trip ◦ Environment Roads, other traffic, pedestrians ◦ Actuators Steering wheel, accelerator, brake, signal, horn ◦ Sensors Cameras, LIDAR (light/radar), speedometer, GPS, odometer engine sensors, keyboard
  • 72. Task Environment Types •Fully observable (vs. partially observable) •Single agent(vs. Multi agent) •Deterministic (vs. stochastic) •Episodic (vs. sequential) •Static (vs. dynamic) •Discrete (vs. continuous) •Known (vs. unknown)
  • 73. Fully observable vs. partially observable If an agent’s sensors give it access to the complete state of the environment at each point in time, then we say that the task environment is fully observable. A task environment is effectively fully observable if the sensors detect all aspects that are relevant to the choice of action; relevance, in turn, depends on the performance measure. Fully observable environments are convenient because the agent need not maintain any internal state to keep track of the world. An environment might be partially observable because of noisy and inaccurate sensors or because parts of the state are simply missing from the sensor data If the agent has no sensors at all then the environment is unobservable
  • 74. Single agent vs. multiagent If only one agent is involved in an environment, and operating by itself then such an environment is called single agent environment. However, if multiple agents are operating in an environment, then such an environment is called a multi-agent environment. chess is a competitive multiagent environment. In the taxi-driving environment avoiding collisions maximizes the performance measure of all agents, so it is a partially cooperative multiagent environment. ◦It is also partially competitive because, for example, only one car can occupy a parking space.
  • 75. Deterministic vs. stochastic If the next state of the environment is completely determined by the current state and the action executed by the agent, then we say the environment is deterministic; otherwise, it is stochastic. an agent need not worry about uncertainty in a fully observable, deterministic environment. If the environment is partially observable, however, then it could appear to be stochastic. environment is uncertain if it is not fully observable or not deterministic. “stochastic” generally implies that uncertainty about outcomes is quantified in terms of probabilities a nondeterministic environment is one in which actions are characterized by their possible outcomes, but no probabilities are attached to them
  • 76. Episodic vs. sequential Episodic task environment: ◦the agent’s experience is divided into atomic episodes. ◦In each episode the agent receives a percept and then performs a single action. ◦Crucially, the next episode does not depend on the actions taken in previous episodes. ◦Many classification tasks are episodic. Sequential environments ◦the current decision could affect all future decisions ◦Chess and taxi driving are sequential: in both cases, short-term actions can have long- term consequences. ◦Episodic environments are much simpler than sequential environments because the agent does not need to think ahead.
  • 77. Static vs. dynamic If the environment can change while an agent is deliberating, then we say the environment is dynamic for that agent; otherwise, it is static A static environment does not change while the agent is thinking. The passage of time as an agent deliberates is irrelevant. Dynamic environments, on the other hand, are continuously asking the agent what it wants to do; if it hasn’t decided yet, that counts as deciding to do nothing. If the environment itself does not change with the passage of time but the agent’s performance score does, then we say the environment is semi-dynamic. Chess, when played with a clock, is semi-dynamic. Crossword puzzles are static
  • 78. Discrete vs. continuous If the number of distinct percepts and actions is limited, the environment is discrete, otherwise it is continuous. The chess environment has a finite number of distinct states (excluding the clock). Chess also has a discrete set of percepts and actions. Taxi driving is a continuous-state and continuous-time problem: the speed and location of the taxi and of the other vehicles sweep through a range of continuous values and do so smoothly over time Taxi-driving actions are also continuous (steering angles, etc.). Input from digital cameras is discrete, strictly speaking, but is typically treated as representing continuously varying intensities and locations.
  • 79. Known vs. unknown In a known environment, the outcomes (or outcome probabilities if the environment is stochastic) for all actions are given. If the environment is unknown, the agent will have to learn how it works in order to make good decisions a known environment can be partially observable ◦ for example, in solitaire card games, I know the rules but am still unable to see the cards that have not yet been turned over. An unknown environment can be fully observable ◦ in a new video game, the screen may show the entire game state but I still don’t know what the buttons do until I try them.
  • 81. Structure of Agent The job of AI is to design an agent program that implements the agent function the mapping from percepts to actions. his program will run on some sort of computing device with physical sensors and actuators called the architecture agent = architecture + program architecture makes the percepts from the sensors available to the program, runs the program, and feeds the program’s action choices to the actuators as they are generated
  • 82. Agent programs Agent program: use current percept as input from the sensors and return an action to the actuators Agent function: takes the entire percept history To build a rational agent in this way, we as designers must construct a table that contains the appropriate action for every possible percept sequence.
  • 83. Let P be the set of possible percepts and let T be the lifetime of the agent (the total number of percepts it will receive) The lookup table will contain entries Consider the automated taxi: the visual input from a single camera comes in at the rate of roughly 27 megabytes per second (30 frames per second, 640 × 480 pixels with 24 bits of color information). This gives a lookup table with over 10250,000,000,000 entries for an hour’s driving. Even the lookup table for chess a tiny, well-behaved fragment of the real world would have at least 10150 entries. The daunting size of these tables (the number of atoms in the observable universe is less than 1080) means that a) no physical agent in this universe will have the space to store the table, b) the designer would not have time to create the table, c) no agent could ever learn all the right table entries from its experience, and d) even if the environment is simple enough to yield a feasible table size, the designer still has no guidance about how to fill in the table entries.
  • 84. Types of Agent Programs Four basic kinds of agent programs that embody the principles underlying almost all intelligent systems: 1. Simple reflex agents; 2. Model-based reflex agents; 3. Goal-based agents; and 4. Utility-based agents
  • 85. Simple reflex agents Select actions on the basis of the current percept, ignoring the rest of the percept history Agents do not have memory of past world states or percepts. So, actions depend solely on current percept. Action becomes a “reflex.” Uses condition-action rules.
  • 86. condition–action rule if car-in-front-is-braking then initiate-braking If tail-light of car in front is red, then brake.
  • 87. The INTERPRET-INPUT function generates an abstracted description of the current state from the percept, and the RULE-MATCH function returns the fifirst rule in the set of rules that matches the given state description. Note that the description in terms of “rules” and “matching” is purely conceptual; actual implementations can be as simple as a collection of logic gates implementing a Boolean circuit
  • 88. This will work only if the correct decision can be made on the basis of only the current percept—that is, only if the environment is fully observable. Even a little bit of unobservability can cause serious trouble. For example, the braking rule given earlier assumes that the condition car-in-front-is-braking can be determined from the current percept—a single frame of video. This works if the car in front has a centrally mounted brake light. Infinite loops are often unavoidable for simple reflex agents operating in partially observable environments Escape from infifinite loops is possible if the agent can randomize its actions.
  • 89. Model-based reflex agents Key difference (wrt simple reflex agents): ◦Agents have internal state, which is used to keep track of past states of the world. ◦ Agents have the ability to represent change in the World.
  • 90. “Infers potentially dangerous driver in front.” If “dangerous driver in front,” then “keep distance.” represents the agent’s “best guess”
  • 91. internal state information as time goes by requires two kinds of knowledge to be encoded in the agent program 1. we need some information about how the world evolves independently of the agent 2. we need some information about how the agent’s own actions affect the world knowledge about “how the world works is called a model of the world. An agent that uses such a model is called a model-based agent.
  • 92. UPDATE-STATE, which is responsible for creating the new internal state description.
  • 93. Goal-based agents Key difference wrt Model-Based Agents: In addition to state information, have goal information that describes desirable situations to be achieved. Search and planning are the subfields of AI devoted to finding action sequences that achieve the agent’s goals Agents of this kind take future events into consideration. What sequence of actions can I take to achieve certain goals? Choose actions so as to (eventually) achieve a (given or computed) goal.
  • 95. Utility-based agents Goals alone are not enough to generate high-quality behavior in most environments Goals just provide a crude binary distinction between “happy” and “unhappy” states Because “happy” does not sound very scientific, economists and computer scientists use the term utility instead An agent’s utility function is essentially an internalization of the performance measure. If the internal utility function and the external performance measure are in agreement, then an agent that chooses actions to maximize its utility will be rational according to the external performance measure.
  • 98. A learning agent can be divided into four conceptual components 1. learning element, which is responsible for making improvements 2. performance element, which is responsible for selecting external actions. The performance element is what we have previously considered to be the entire agent: it takes in percepts and decides on actions. 3. Feedback from the critic : on how the agent is doing and determines how the performance element should be modified to do better in the future 4. problem generator. It is responsible for suggesting actions that will lead to new and informative experiences