SlideShare a Scribd company logo
ARTIFICIAL
INTELLIGENCE
(Unit I)
VI Sem B.E. Computer Sc. &
Engg
Department of Computer Science & Engineering
Priyadarshini Bhagwati College of Engineering,
Nagpur
(Even 2021)
Kapil N Hande
Head of the Department
Introduction
 A branch of Computer Science named Artificial
Intelligence pursues creating the computers or
machines as intelligent as human beings.
 One thing it could be is Making
computational models of human behavior.
One way, which would be a kind of cognitive
 One way, which would be a kind of cognitive
science, is to do experiments on humans, see
how they behave in certain situations and see if
you could make computers behave in that same
way.
K N Hande 2
What is AI?
 Artificial Intelligence is the development of
computer systems that are able to perform
tasks that would require human
intelligence.
 Examples of these tasks are visual perception,
 Examples of these tasks are visual perception,
speech recognition, decision-making, and
translation between languages.
K N Hande 3
Introduction To Artificial Intelligence and applications
Definitions
 According to the father of Artificial
Intelligence John McCarthy, it is “The
science and engineering of making
intelligent machines, especially intelligent
computer programs”.
 Artificial Intelligence is a way of making a
computer, a computer-controlled robot, or a
software think intelligently, in the similar
manner the intelligent humans think.
K N Hande 5
Definitions
 AI is accomplished by studying how human
brain thinks, and how humans learn, decide,
and work while trying to solve a problem, and
then using the outcomes of this study as a basis
of developing intelligent software and
systems.
 The exciting new effort to make computers
think … machines with minds, in the full literal
sense.
K N Hande 6
Definitions
 The study of mental faculties through the use
of computational models.
 A field of study that seeks to explain and
emulate intelligent behavior in terms of
computational processes.
computational processes.
 The study of how to make computers do
things at which, at the moment, people are
better. (Rich  Knight, 1991 )
K N Hande 7
What is AI?
K N Hande 8
Definitions
 Computational models of human behavior?
 • Programs that behave (externally) like
humans
 Computational models of human “thought”
processes?
processes?
 Programs that operate (internally) the way
humans do
K N Hande 9
Introduction To Artificial Intelligence and applications
What is Intelligence?
 The ability of a system to calculate, reason,
perceive relationships and analogies, learn from
experience, store and retrieve information from
memory, solve problems, comprehend complex
ideas, use natural language fluently, classify,
generalize, and adapt new situations.
• “the capacity to learn and solve problems”
• “the capacity to learn and solve problems”
In particular,
 the ability to solve novel problems
 the ability to act rationally
 the ability to act like humans
K N Hande 11
What’s involved in Intelligence?
Ability to interact with the real world
• to perceive, understand, and act
• e.g., speech recognition and
understanding and synthesis
• e.g., image understanding
• e.g., image understanding
• e.g., ability to take actions, have an effect
K N Hande 12
What’s involved in Intelligence?
Reasoning and Planning
• modeling the external world, given input
• solving new problems, planning, and making
decisions
• ability to deal with unexpected problems,
uncertainties
Learning and Adaptation
• we are continuously learning and adapting
• our internal models are always being “updated”
• e.g., a baby learning to categorize and recognize
animals
K N Hande 13
Goals of AI
• To Create Expert Systems: The systems
which exhibit intelligent behavior, learn,
demonstrate, explain, and advice its users.
To Implement Human Intelligence in
• To Implement Human Intelligence in
Machines: Creating systems that understand,
think, learn, and behave like humans.
K N Hande 14
What Contributes to AI?
 Artificial intelligence is a science and technology
based on disciplines such as Computer Science,
Biology, Psychology, Linguistics, Mathematics, and
Engineering. A major thrust of AI is in the
development of computer functions associated with
human intelligence, such as reasoning, learning, and
human intelligence, such as reasoning, learning, and
problem solving.
 Out of the following areas, one or multiple areas can
contribute to build an intelligent system.
K N Hande 15
Introduction To Artificial Intelligence and applications
History of AI
1931 The Austrian Kurt Gödel shows that in first-order predicate logic all
true statements are derivable. In higher-order logics, on the other hand,
there are true statements that are unprovable
1937 Alan Turing points out the limits of intelligent machines with the
halting problem
1943 McCulloch and Pitts model neural networks and make the connection to
propositional logic.
K N Hande 17
propositional logic.
1950 Alan Turing defines machine intelligence with the Turing test and
writes about learning machines and genetic algorithms
1951 Marvin Minsky develops a neural network machine. With 3000 vacuum
tubes he simulates 40 neurons.
1955 Arthur Samuel (IBM) builds a learning checkers program that plays
better than its developer
History of AI
1956 McCarthy organizes a conference in Dartmouth College. Here the name
Artificial Intelligence was first introduced. Newell and Simon of
Carnegie Mellon University (CMU) present the Logic Theorist, the first
symbol-processing computer program
1958 McCarthy invents at MIT (Massachusetts Institute of Technology) the
high-level language LISP. He writes programs that are capable of
modifying themselves.
1959 Gelernter (IBM) builds the Geometry Theorem Prover.
K N Hande 18
1959 Gelernter (IBM) builds the Geometry Theorem Prover.
1961 The General Problem Solver (GPS) by Newell and Simon imitates human
thought
1963 McCarthy founds the AI Lab at Stanford University.
1965 Robinson invents the resolution calculus for predicate logic
History of AI
1966 Weizenbaum’s program Eliza carries out dialog with people in
natural language
1969 Minsky and Papert show in their book Perceptrons that the
perceptron, a very simple neural network, can only represent
linear functions
1972 French scientist Alain Colmerauer invents the logic
programming language PROLOG
K N Hande 19
1976 Shortliffe and Buchanan develop MYCIN, an expert system for
diagnosis of infectious diseases, which is capable of dealing with
uncertainty
1981 Japan begins, at great expense, the “Fifth Generation Project”
with the goal of building a powerful PROLOG machine.
1982 R1, the expert system for configuring computers, saves Digital
Equipment Corporation 40 million dollars per year
History of AI
1986 Renaissance of neural networks through, among others, Rumelhart,
Hinton and Sejnowski. The system Nettalk learns to read texts aloud
1990 Pearl , Cheeseman , Whittaker, Spiegelhalter bring probability theory
into AI with Bayesian networks . Multi-agent systems become popular.
1992 Tesauros TD-gammon program demonstrates the advantages of
reinforcement learning.
1993 Worldwide RoboCup initiative to build soccer-playing autonomous
K N Hande 20
1993 Worldwide RoboCup initiative to build soccer-playing autonomous
robots
1995 From statistical learning theory, Vapnik develops support vector
machines, which are very important today.
1997 IBM’s chess computer Deep Blue defeats the chess world champion
Gary Kasparov.
2003 The robots in RoboCup demonstrate impressively what AI and robotics
are capable of achieving.
History of AI
2006 Service robotics becomes a major AI research area.
2009 First Google self-driving car drives on the California freeway.
2010 Autonomous robots begin to improve their behavior through learning.
2011 IBM’s “Watson” beats two human champions on the television game
K N Hande 21
2011 IBM’s “Watson” beats two human champions on the television game
show “Jeopardy!”. Watson understands natural language and can
answer difficult questions very quickly
2015 Daimler premiers the first autonomous truck on the Autobahn.
Google self-driving cars have driven over one million miles and operate
within cities.
Deep learning enables very good image classification.
Paintings in the style of the Old Masters can be automatically generated
with deep learning. AI becomes creative!
History of AI
2016 The Go program AlphaGo by Google
DeepMind beats the European champion 5:0
in January and Korean Lee Sedol, one of the
world’s best Go players, 4:1 in March. Deep
learning techniques applied to pattern
recognition, as well as reinforcement learning
K N Hande 22
recognition, as well as reinforcement learning
and Monte Carlo tree search lead to this
success.
Introduction To Artificial Intelligence and applications
Applications of AI
1. Artificial Intelligence in Healthcare:
 -AI is a study realized to emulate human intelligence
into computer technology that could assist both, the
doctor and the patients in the following ways:
 By providing a laboratory for the examination,
representation and cataloguing medical information
 By devising novel tool to support decision making and
 By devising novel tool to support decision making and
research
 By integrating activities in medical, software and
cognitive sciences
 By offering a content rich discipline for the future
scientific medical communities.
K N Hande 24
Applications of AI
2. Artificial Intelligence in business:
 Robotic process automation is being applied to
highly repetitive tasks normally performed by
humans.
 Chatbots have already been incorporated into
websites and e companies to provide immediate
websites and e companies to provide immediate
service to customers.
3. AI in education: It automates grading, giving
educators more time. It can also assess students and
adapt to their needs, helping them work at their
own pace.
K N Hande 25
Applications of AI
4. AI in Autonomous vehicles: Just like humans, self-
driving cars need to have sensors to understand the
world around them and a brain to collect, processes
and choose specific actions based on information
gathered.
 AI has several applications for these vehicles and among
them the more immediate ones are as follows:
 Directing the car to gas station or recharge station when
 Directing the car to gas station or recharge station when
it is running low on fuel.
 Adjust the trips directions based on known traffic
conditions to find the quickest route.
 Incorporate speech recognition for advanced
communication with passengers.
 Natural language interfaces and virtual assistance
technologies.
K N Hande 26
Applications of AI
5. AI for robotics will allow us to address the
challenges in taking care of an aging population
and allow much longer independence. It will
drastically reduce, may be even bring down traffic
accidents and deaths, as well as enable disaster
response for dangerous situations
response for dangerous situations
6. Software systems: Diagnosis of software, technical
components
7. Adaptive software systems: Intelligent interfaces,
Intelligent helper applications, Web applications,
(softbots, shopbots)
K N Hande 27
8. AI applications: information retrieval.
 Web search engines
– Improve the quality of search
– Rely on methods developed in AI
 Semantic web:
– From information to knowledge sharing
– From information to knowledge sharing
– OWL (The W3C Web Ontology Language (OWL) is a
Semantic Web language designed to represent rich
and complex knowledge about things, groups of
things, and relations between things.)
K N Hande 28
9. AI applications: Speech recognition
 Speech recognition systems:
– Hidden Markov models
 Adaptive speech systems
– Adapt to the user (training)
– continuous speech
– continuous speech
 Multi-user speech recognition systems
– Restricted (no training)
– Customer support:
• Airline schedules, baggage tracking
• Credit card companies.
K N Hande 29
10. Applications: Space exploration
K N Hande 30
AI applications: Medicine
 Medical diagnosis:
 Medical imaging: Image guided surgery
K N Hande 31
AI applications: Transportation
K N Hande 32
AI applications: Game playing
K N Hande 33
AI APPLICATIONS
Robotic toys
– Sony’s Aibo
Humanoid robot
Humanoid robot
– Honda’s ASIMO
K N Hande 34
Introduction To Artificial Intelligence and applications
Everyday Examples of AI
1. Smartphones:From the obvious AI features such as
the built-in smart assistants to not so obvious ones
such as the portrait mode in the camera, AI is
impacting our lives every day.
K N Hande 36
Everyday Examples of AI
2. Smart Cars and Drones: Tesla cars are a prime example of
how the AI is impacting our daily life. Did you know that
all the Tesla cars are connected and the things that your
car learns is shared across all the cars?
K N Hande 37
Everyday Examples of AI
3. Social Media Feeds: From the feeds that you see in your
timeline to the notifications that you receive from these
apps, everything is curated by AI. AI takes all your past
behavior, web searches, interactions, and everything else
that you do when you are on these websites and tailors the
experience just for you.
K N Hande 38
Everyday Examples of AI
4. Another great example of how AI impacts our lives
are the music and media streaming services that
we are using on a daily basis. Whether you are
using Spotify, Netflix, or YouTube, AI is making the
decisions for you.
K N Hande 39
Everyday Examples of AI
5. Video Games: The video game industry is probably
one of the earliest adopters of AI. The integration
started very small with the use of AI to generate
random levels that people can play.
 When you are playing a game such as PUBG or
Fortnite, you essentially start against a couple of AI-
Fortnite, you essentially start against a couple of AI-
powered bots and then move to play against real
players.
 Just know that if you play any game, you are using
AI.
K N Hande 40
Everyday Examples of AI
6. Online Ads Network: One of the biggest users of
artificial intelligence is the online ad industry
which uses AI to not only track user statistics but also
serve us ads based on those statistics.
K N Hande 41
PROBLEM SPACES AND SEARCH
Building a system to solve a problem requires the
following steps
• Define the problem precisely including detailed
specifications and what constitutes an acceptable
solution
• Analyze the problem thoroughly for some
features may have a dominant affect on the
features may have a dominant affect on the
chosen method of solution
• Isolate and represent the background
knowledge needed in the solution of the
problem
• Choose the best problem solving techniques in
the solution.
K N Hande 42
Defining the Problem as state space Search
 Problems dealt with in artificial intelligence
generally use a common term called 'state'.
 A state represents a status of the solution at
a given step of the problem solving
procedure.
 The problem solving procedure applies an
 The problem solving procedure applies an
operator to a state to get the next state
 The process of applying an operator to a
state and its subsequent transition to the
next state, thus, is continued until the goal
(desired) state is derived.
K N Hande 43
Operator
Defining the Problem as state space Search
 The opening position can be defined as the
initial state and a winning position as a goal
state, there can be more than one.
 The representation of games in this way
leads to a state space representation and it
leads to a state space representation and it
is natural for well organized games with
some structure
 It means that the solution involves using
known techniques and a systematic search.
K N Hande 45
Defining the Problem as state space Search
 A problem space can also be considered to be
a search space because in order to solve the
problem, we will search the space for a goal
state.
K N Hande 46
Problem of Playing a Chess
 Suppose we start with the problem
statement “Play Chess”
 To build a program that would play chess, we
would first have to specify the starting
position of the chess board, the rules that
position of the chess board, the rules that
define the legal moves, and the board
position that represent the win position for
one side or the other.
 It is fairly easy to provide the complete and
formal problem description.
K N Hande 47
Problem of Playing a Chess
 The starting position can be described as an
8x8 array where each position contains the
symbol standing for the appropriate piece
in the official chess opening position.
 We can define our goal as any board position
 We can define our goal as any board position
in which the opponent does not have a legal
move and his or her King is under attack.
 The legal moves can be described as a set of
rules consisting of two parts.
K N Hande 48
Problem of Playing a Chess
 A left side that defines the pattern to be
matched against the current board position
and right side that describes the change to
be made to the board position to reflect the
move.
 However if we write the rules like above, we
have to write very large number of them
since there has to be separate rule for
roughly 10120 possible board positions.
K N Hande 49
Introduction To Artificial Intelligence and applications
Problem of Playing a Chess
 Write the rules describing the legal moves in
as general way as possible.
 Introduce some convenient notation for
describing patterns and substitutions.
describing patterns and substitutions.
K N Hande 51
Rule for Playing Chess
K N Hande 52
State Space Representation
 It allows for some formal definition of the
problem as the need to convert some given
situation into some desired situation using a
set of permissible operations.
 It permits us to define the process of solving
 It permits us to define the process of solving
a particular problem as a combination of
known technique and search, the general
technique of exploring the space to try to
find some path from the current state to goal
state.
K N Hande 53
A Water Jug Problem In Artificial Intelligence
Problem: We are given two jugs, a 4-gallon one and 3-gallon
one. Neither has any measuring marked on it. There is a
pump, which can be used to fill the jugs with water. How
can we get exactly 2 gallons of water into 4-gallon jug?
 The state space for this problem can be described
as the set of ordered pairs of integers (X, Y) such
that X = 0, 1, 2, 3 or 4 and Y = 0, 1, 2 or 3
that X = 0, 1, 2, 3 or 4 and Y = 0, 1, 2 or 3
 X is the number of gallons of water in the 4-gallon
jug
 Y the quantity of water in the 3-gallon jug.
K N Hande 54
A Water Jug Problem In Artificial Intelligence
 The start state is (0, 0) and the goal state is
(2, n) for any value of n, as the problem does
not specify how many gallons need to be
filled in the 3-gallon jug (0, 1, 2, 3).
K N Hande 55
The operators to be used to solve the problem
K N Hande 56
Assumptions, not mentioned, in the problem state.
1. We can fill a jug from the pump.
2. We can pour water out a jug, onto the ground.
3. We can pour water out of one jug into the
other
4. No other measuring devices are available
K N Hande 57
Water Jug Problem
 To solve the water jug problem, all we need, in
addition to the problem description given
above, is a control structure which loops
through a simple cycle in which some rule
whose left side matches the current state is
chosen, the appropriate change to the state is
chosen, the appropriate change to the state is
made as described in the corresponding right
side and the resulting state is checked to see if
it corresponds to a goal state.
K N Hande 58
Introduction To Artificial Intelligence and applications
Issues in Water Jug Problem
 It has been shown above how an informal
problem state (stated in English) has been
converted into a formal one (Fig. 2.4) with
the help of a water jug problem.
 In doing so some issues which affect the
 In doing so some issues which affect the
approach towards the solution are:
 The rules should be stated explicitly and not
written because they are allowable
K N Hande 60
Issues in Water Jug Problem
 Now consider the rules 3 and 4 should or
should not these rules be included in the list of
available operators?
 The rules 11 and 12 are special purpose rules,
written to capture special purpose knowledge
to solve this problem.
to solve this problem.
 It is thus clear that to create a program for
solving a problem simply the formal description
of the problem has to be generated using the
knowledge about the given problem. This
process is called operationalization
K N Hande 61
To formalize a problem the following steps are needed
(i)Define the problem precisely, giving the
specification of what the initial situation (s) and
the final situation (s) will be.
(ii) Analyze the problem because a few important
features can have immense impact on the
suitability of different techniques available for
suitability of different techniques available for
solving the problem.
(iii) Represent the knowledge completely, which is
necessary to solve problem in a given domain.
(iv) Choose the best technique(s) and apply it
(them) to the particular problem.
K N Hande 62
Summarizingly any problem can be solved by the
following series of step
1. Define a state space which contains all the possible
configurations of the relevant objects and even some
impossible ones.
2. Specify one or more states within that space which
would describe possible situations from which the
problem solving process may start. These states are
problem solving process may start. These states are
called the initial states.
3. Specify one or more states which would be
acceptable as solutions to the problem. These states
are called goal states.
4. Specify a set of rules which describe the actions
(operators) available and a control strategy to
decide the order of application of these rules.
K N Hande 63
Approach
 The problem can be solved by collecting all
knowledge of the problem, (in the present
case, water jug problem) with the help of
production rules and using an appropriate
production rules and using an appropriate
control strategy; move through the problem
space until a path from an initial state to
goal state is found.
K N Hande 64
PRODUCTION SYSTEM
 A production is a rule consisting of a
situation recognition part and an action part.
 A production is a situation-action pair in
which the left side is a list of things to watch
for and the right side is a list of things to do
for and the right side is a list of things to do
so
 The production system is a model of
computation that can be applied to
implement search algorithms and model
human problem solving
K N Hande 65
Components of Production System
1) Set of production rules, which are of the form
A®B.
2) A database, which contains all the appropriate
information for the particular task.
3) A control strategy that specifies order in which
the rules will be compared to the database of
the rules will be compared to the database of
rules and a way of resolving the conflicts that
arise when several rules match simultaneously.
4) A rule applier, which checks the capability of
rule by matching the current state with the left
hand side of the rule and finds the appropriate
rule from database of rules.
K N Hande 66
Introduction To Artificial Intelligence and applications
Features of Production System
 Expressiveness and intuitiveness
 Simplicity: The structure of each sentence in
a production system is unique and uniform
 Modularity
 Modifiability
 Knowledge intensive
K N Hande 68
Control Strategies
 Control Strategy in Artificial Intelligence
scenario is a technique or strategy, tells us
about which rule has to be applied next
while searching for the solution of a problem
while searching for the solution of a problem
within problem space.
 Control Strategy should cause Motion
 Control strategy should be Systematic
K N Hande 69
One systematic Control Strategy for the Water Jug problem
K N Hande 70
Introduction To Artificial Intelligence and applications
Introduction To Artificial Intelligence and applications
Advantages of Depth First Search
 Requires less memory since only the nodes
on current path are stored.
 May find the solution without examining
much of the search space at all.
much of the search space at all.
K N Hande 73
Advantages of Breadth First Search
 Will not get trapped in exploring a blind
alley
 If there is a solution then Breadth First
Search guaranteed to find it. Longer paths
Search guaranteed to find it. Longer paths
are never explored until all shorter paths
have been examined.
K N Hande 74
The Traveling Salesman Problem
Problem: A traveler needs to visit all the cities from a list,
where distances between all the cities are known and
each city should be visited just once. What is the shortest
possible route that he visits each city exactly once and
returns to the origin city?
 The salesman‘s goal is to keep both the travel
costs and the distance traveled as low as
costs and the distance traveled as low as
possible.
 Focused on optimization, TSP is often used in
computer science to find the most efficient
route for data to travel between
various nodes.
K N Hande 75
Introduction To Artificial Intelligence and applications
The Traveling Salesman Problem
 TSP has been studied for decades and several
solutions have been theorized.
 Rather than focus on finding the most
effective route, TSP is often concerned with
finding the cheapest solution.
finding the cheapest solution.
 Travelling salesman problem is the most
notorious computational problem
 We can use brute-force approach to
evaluate every possible tour
K N Hande 77
The Traveling Salesman Problem
 For n number of vertices in a graph, there
are (n - 1)! Number of possibilities.
 This phenomenon is called combinatorial
explosion.
 Technique called as branch and bound can be
 Technique called as branch and bound can be
used to find the solution to the TPS problem.
 Begin generating complete paths, keeping track of
shortest paths found so far. Give up exploring any
path as soon as its partial length becomes greater
than the shortest path found so far.
K N Hande 78
Heuristics Search
 A Heuristic is a technique to solve a problem
faster than classic methods, or to find an
approximate solution when classic methods
cannot.
 This is a kind of a shortcut as we often trade
one of optimality, completeness, accuracy,
one of optimality, completeness, accuracy,
or precision for speed.
A heuristic is a method that
• might not always find the best solution
• but is guaranteed to find a good solution in
reasonable time.
K N Hande 79
Heuristics Search
 In mathematical optimization and computer
science, heuristic (from Greek I find, discover) is a
technique designed for solving a problem more quickly
when classic methods are too slow, or for finding an
approximate solution when classic methods fail to find
approximate solution when classic methods fail to find
any exact solution.
 In a way, it can be considered a shortcut.
 The objective of a heuristic is to produce a solution in a
reasonable time frame that is good enough for solving
the problem at hand.
K N Hande 80
Heuristics Search
 One example of one general purpose heuristics that
is useful in variety of combinatorial problems is the
nearest neighbor heuristics, which work by
selecting the locally superior alternative at each
step.
 Applying it to TSP we arrive at following
procedure.
procedure.
– Arbitrarily select the starting city
– To select the next city, look at all the cities not
yet visited, and select the one closest to current
city. Go to it next.
– Repeat step 2 until all cities have been visited.
K N Hande 81
Heuristics Search
There are two major ways in which domain-
specific, heuristic knowledge can be
incorporated in rule based search procedure.
• In the rules themselves. For example, rule for
chess playing system might describe not
simply the set of legal moves but rather a set
simply the set of legal moves but rather a set
of “sensible moves” as determined by the
writer.
• As a heuristic function that evaluates the
individual problems states and determines
how desirable they are.
K N Hande 82
A Heuristic Function
 A heuristic function is a function that maps
from problem state descriptions to
measures of desirability, usually
represented as numbers.
 Value of the heuristic function at given node
in the search process will give as good an
in the search process will give as good an
estimate as possible of whether that node is
on desired path to solution.
 Well designed heuristic functions can play an
important part in efficiently guiding a
search process towards a solution.
K N Hande 83
A Heuristic Function
 The purpose of the heuristic function is to guide
the search process in most profitable direction
by suggesting which path to follow first when
more than one path is available.
more than one path is available.
 In general there is a trade-off between the cost
of evaluating a heuristic function and savings in
search time that the function provides.
K N Hande 84
A Heuristic Function
 With respect to the heuristic function we can
define Artificial Intelligence as the study of
techniques for solving exponentially hard
problems in a polynomial time by
problems in a polynomial time by
exploiting knowledge about the problem
domain.
K N Hande 85
PROBLEM CHARACTERISTICS
 In order to choose the most appropriate method for
a particular problem, it is necessary to analyze the
problem along several key dimensions.
 Is the problem decomposable into set of sub
problems?
Can the solution step be ignored or undone?
 Can the solution step be ignored or undone?
 Is the problem universally predictable?
 Is a good solution to the problem obvious
without comparison to all the possible
solutions?
K N Hande 86
PROBLEM CHARACTERISTICS
 Is the desire solution a state of world or a
path to a state?
 Is a large amount of knowledge absolutely
required to solve the problem?
required to solve the problem?
 Will the solution of the problem required
interaction between the computer and the
person?
K N Hande 87
1. Is the Problem Decomposable?
Suppose we want to solve the problem of
computing the expression.
 We 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.
K N Hande 88
Introduction To Artificial Intelligence and applications
Is the Problem Decomposable?
 Problem tree will be generated by the
process of problem decomposition as it can
be exploited by simple recursive
integration program.
integration program.
 Using this technique of problem
decomposition we can easily solve the very
large problems.
K N Hande 90
Is the Problem Decomposable?
Consider the following problem of Blocks
World
K N Hande 91
Is the Problem Decomposable?
Assume following operators are available
K N Hande 92
 The idea of the solution is to reducing the
problem of getting B on C, and A on B to two
separate problems
Introduction To Artificial Intelligence and applications
Is the Problem Decomposable?
 In this problem, the two sub problems are
not independent.
 They interact and those interaction must be
considered to arrive at the solution for the
entire problem.
entire problem.
 These two examples, symbolic integration
and blocks world, illustrate the difference
between decomposable and non-
decomposable problems.
K N Hande 94
2. Can the solution step be ignored or undone?
 Consider the problem of proving a
mathematical problem.
 We proceed by proving a lemma, but we
realize that lemma is no help at all.
 Are we in trouble? No……
 Are we in trouble? No……
 Consider the different problem
K N Hande 95
Introduction To Artificial Intelligence and applications
Can the solution step be ignored or undone?
 In attempting to solve the 8-puzzle we might
make a stupid move.
 An additional step must be performed to
undo each incorrect step, whereas no action
was required to “undo” a useless lemma
was required to “undo” a useless lemma
 The control structure for 8-puzzle solver
must keep track of a order in which the
operations are performed.
K N Hande 97
Can the solution step be ignored or undone?
K N Hande 98
Can the solution step be ignored or undone?
K N Hande 99
Can The Solution Step Be Ignored Or Undone?
 The recoverability of the problem plays an
important role in determining the
complexity of the control structure
necessary for the problem solution.
necessary for the problem solution.
K N Hande 100
3. Is the problem universally predictable?
 In case of 8-puzzle problem, it is possible to
plan entire sequence of moves and be
confident that we know what the resulting
state will be.
 We can use planning to avoid having to undo
 We can use planning to avoid having to undo
actual moves.
 Thus a control structure that allows
backtracking is necessary.
 However in other games this planning
process may not be possible.
K N Hande 101
3. Is the problem universally predictable?
 Suppose we want play Bridge.
 But it is not possible to do such planning with
certainty, since we cannot know where exactly
all the cards are.
all the cards are.
 So here we can investigate several plans and use
probabilities of the various outcomes to choose
a plan that has highest estimated probability of
leading to good score
K N Hande 102
3. Is the problem universally predictable?
 So 8-puzzle is certain-outcome problem and
Bridge is uncertain-outcome problem.
 Planning can be defined here is problem-
solving without a feedback from
environment.
environment.
 For solving certain-outcome problem,
planning will generate the sequence of
operators which will guarantee to lead the
solution of the problem.
K N Hande 103
3. Is the problem universally predictable?
 For uncertain-outcome problems planning
can at best generate the operators that has a
good probability of leading a solution.
 These problem characteristics, ignorable
versus recoverable versus irrecoverable
versus recoverable versus irrecoverable
and certain-outcome versus uncertain-
outcome, interact in an interesting way.
 Thus one of the hardest type of problem to
solve is the irrecoverable, uncertain-
outcome
K N Hande 104
3. Is the problem universally predictable?
A few examples of such problems are:
1. Playing bridge
2. Controlling a robot arm
3. Helping a lawyer decide how to defend his
client against a murder charge.
K N Hande 105
4. Is A Good Solution Absolute Or Relative?
 Consider the problem of answering questions
based on database of simple facts:
K N Hande 106
4. Is A Good Solution Absolute Or Relative?
 Suppose we ask the question “Is Marcus
Alive?”
 By using predicate logic and using formal
inference methods we can easily answer
this question.
this question.
 In fact either of the two reasoning paths will
lead to the answer as shown in following
figure.
K N Hande 107
Introduction To Artificial Intelligence and applications
4. Is A Good Solution Absolute Or Relative?
 But now consider again the traveling salesman
problem. Our goal is to find the shortest route that
will visit the each city exactly once.
K N Hande 109
Introduction To Artificial Intelligence and applications
4. Is A Good Solution Absolute Or Relative?
 These two examples illustrate the difference
between any-path problems and best-path
problems.
Best-path problems are computationally
 Best-path problems are computationally
harder than any-path problems.
K N Hande 111

More Related Content

PDF
introduction to Artificial Intelligence for computer science
PPTX
Introduction to AI
PPTX
Artificial intelligence
PDF
Introduction to Artificial Intelligence: Concepts and Applications
PDF
Lecture 1-Introduction to AI and its application.pdf
PPTX
The IOT Academy Training for Artificial Intelligence ( AI)
PDF
Introduction to Artificial Intelligence (AI) and Machine Learning (ML)
DOCX
Artificial intelligence-full -report.doc
introduction to Artificial Intelligence for computer science
Introduction to AI
Artificial intelligence
Introduction to Artificial Intelligence: Concepts and Applications
Lecture 1-Introduction to AI and its application.pdf
The IOT Academy Training for Artificial Intelligence ( AI)
Introduction to Artificial Intelligence (AI) and Machine Learning (ML)
Artificial intelligence-full -report.doc

Similar to Introduction To Artificial Intelligence and applications (20)

DOC
AiArtificial Itelligence
PDF
Artificial intelligence
DOCX
Artificial Intelligence Report
PDF
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
PDF
AI.pdf
PDF
Artificial Intelligence
PDF
AI Chapter I for Computer Science Students
PPT
Ai introduction and production system and search patterns
PPTX
1_Introduction to advance data techniques.pptx
DOCX
A Seminar Report on Artificial Intelligence
PDF
Introduction to Artificial Intelligence Material
PPTX
AI_01_introduction.pptx
PDF
Algorithmic Pioneers_ Unraveling the Secrets of Machine Learning.pdf
PPTX
Chapter 3- Artificial Intelligence (AI) with history of AI.pptx
PDF
Application Of Artificial Intelligence In Electrical Engineering
PPTX
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
PPTX
1. Inroduction to artificial intelligence.pptx
PPTX
LEC_2_AI_INTRODUCTION - Copy.pptx
PPTX
Emerging Technology Chapter 3 Artificial Intelligence
AiArtificial Itelligence
Artificial intelligence
Artificial Intelligence Report
AI 3.0: Is it Finally Time for Artificial Intelligence and Sensor Networks to...
AI.pdf
Artificial Intelligence
AI Chapter I for Computer Science Students
Ai introduction and production system and search patterns
1_Introduction to advance data techniques.pptx
A Seminar Report on Artificial Intelligence
Introduction to Artificial Intelligence Material
AI_01_introduction.pptx
Algorithmic Pioneers_ Unraveling the Secrets of Machine Learning.pdf
Chapter 3- Artificial Intelligence (AI) with history of AI.pptx
Application Of Artificial Intelligence In Electrical Engineering
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
1. Inroduction to artificial intelligence.pptx
LEC_2_AI_INTRODUCTION - Copy.pptx
Emerging Technology Chapter 3 Artificial Intelligence
Ad

More from kapilhande1 (8)

PDF
Number Theory and Its Applications in Cryptography
PDF
Signal conversion techniques and compression
PDF
Introduction to Data Communication concepts
PDF
Knowledge Representation techniques in Artificial Intelligence
PDF
Searching Techniques in Artificial Intelligence
PDF
Ethics In Information Technology Intellectual Property
PDF
Ethics in Information Technology - Privacy
PDF
Ethics in Information Technology - An Overview
Number Theory and Its Applications in Cryptography
Signal conversion techniques and compression
Introduction to Data Communication concepts
Knowledge Representation techniques in Artificial Intelligence
Searching Techniques in Artificial Intelligence
Ethics In Information Technology Intellectual Property
Ethics in Information Technology - Privacy
Ethics in Information Technology - An Overview
Ad

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Insiders guide to clinical Medicine.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Institutional Correction lecture only . . .
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Insiders guide to clinical Medicine.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Final Presentation General Medicine 03-08-2024.pptx
Renaissance Architecture: A Journey from Faith to Humanism
Sports Quiz easy sports quiz sports quiz
GDM (1) (1).pptx small presentation for students
Institutional Correction lecture only . . .
TR - Agricultural Crops Production NC III.pdf
Pre independence Education in Inndia.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Basic Mud Logging Guide for educational purpose
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf

Introduction To Artificial Intelligence and applications

  • 1. ARTIFICIAL INTELLIGENCE (Unit I) VI Sem B.E. Computer Sc. & Engg Department of Computer Science & Engineering Priyadarshini Bhagwati College of Engineering, Nagpur (Even 2021) Kapil N Hande Head of the Department
  • 2. Introduction A branch of Computer Science named Artificial Intelligence pursues creating the computers or machines as intelligent as human beings. One thing it could be is Making computational models of human behavior. One way, which would be a kind of cognitive One way, which would be a kind of cognitive science, is to do experiments on humans, see how they behave in certain situations and see if you could make computers behave in that same way. K N Hande 2
  • 3. What is AI? Artificial Intelligence is the development of computer systems that are able to perform tasks that would require human intelligence. Examples of these tasks are visual perception, Examples of these tasks are visual perception, speech recognition, decision-making, and translation between languages. K N Hande 3
  • 5. Definitions According to the father of Artificial Intelligence John McCarthy, it is “The science and engineering of making intelligent machines, especially intelligent computer programs”. Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think. K N Hande 5
  • 6. Definitions AI is accomplished by studying how human brain thinks, and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of developing intelligent software and systems. The exciting new effort to make computers think … machines with minds, in the full literal sense. K N Hande 6
  • 7. Definitions The study of mental faculties through the use of computational models. A field of study that seeks to explain and emulate intelligent behavior in terms of computational processes. computational processes. The study of how to make computers do things at which, at the moment, people are better. (Rich Knight, 1991 ) K N Hande 7
  • 8. What is AI? K N Hande 8
  • 9. Definitions Computational models of human behavior? • Programs that behave (externally) like humans Computational models of human “thought” processes? processes? Programs that operate (internally) the way humans do K N Hande 9
  • 11. What is Intelligence? The ability of a system to calculate, reason, perceive relationships and analogies, learn from experience, store and retrieve information from memory, solve problems, comprehend complex ideas, use natural language fluently, classify, generalize, and adapt new situations. • “the capacity to learn and solve problems” • “the capacity to learn and solve problems” In particular, the ability to solve novel problems the ability to act rationally the ability to act like humans K N Hande 11
  • 12. What’s involved in Intelligence? Ability to interact with the real world • to perceive, understand, and act • e.g., speech recognition and understanding and synthesis • e.g., image understanding • e.g., image understanding • e.g., ability to take actions, have an effect K N Hande 12
  • 13. What’s involved in Intelligence? Reasoning and Planning • modeling the external world, given input • solving new problems, planning, and making decisions • ability to deal with unexpected problems, uncertainties Learning and Adaptation • we are continuously learning and adapting • our internal models are always being “updated” • e.g., a baby learning to categorize and recognize animals K N Hande 13
  • 14. Goals of AI • To Create Expert Systems: The systems which exhibit intelligent behavior, learn, demonstrate, explain, and advice its users. To Implement Human Intelligence in • To Implement Human Intelligence in Machines: Creating systems that understand, think, learn, and behave like humans. K N Hande 14
  • 15. What Contributes to AI? Artificial intelligence is a science and technology based on disciplines such as Computer Science, Biology, Psychology, Linguistics, Mathematics, and Engineering. A major thrust of AI is in the development of computer functions associated with human intelligence, such as reasoning, learning, and human intelligence, such as reasoning, learning, and problem solving. Out of the following areas, one or multiple areas can contribute to build an intelligent system. K N Hande 15
  • 17. History of AI 1931 The Austrian Kurt Gödel shows that in first-order predicate logic all true statements are derivable. In higher-order logics, on the other hand, there are true statements that are unprovable 1937 Alan Turing points out the limits of intelligent machines with the halting problem 1943 McCulloch and Pitts model neural networks and make the connection to propositional logic. K N Hande 17 propositional logic. 1950 Alan Turing defines machine intelligence with the Turing test and writes about learning machines and genetic algorithms 1951 Marvin Minsky develops a neural network machine. With 3000 vacuum tubes he simulates 40 neurons. 1955 Arthur Samuel (IBM) builds a learning checkers program that plays better than its developer
  • 18. History of AI 1956 McCarthy organizes a conference in Dartmouth College. Here the name Artificial Intelligence was first introduced. Newell and Simon of Carnegie Mellon University (CMU) present the Logic Theorist, the first symbol-processing computer program 1958 McCarthy invents at MIT (Massachusetts Institute of Technology) the high-level language LISP. He writes programs that are capable of modifying themselves. 1959 Gelernter (IBM) builds the Geometry Theorem Prover. K N Hande 18 1959 Gelernter (IBM) builds the Geometry Theorem Prover. 1961 The General Problem Solver (GPS) by Newell and Simon imitates human thought 1963 McCarthy founds the AI Lab at Stanford University. 1965 Robinson invents the resolution calculus for predicate logic
  • 19. History of AI 1966 Weizenbaum’s program Eliza carries out dialog with people in natural language 1969 Minsky and Papert show in their book Perceptrons that the perceptron, a very simple neural network, can only represent linear functions 1972 French scientist Alain Colmerauer invents the logic programming language PROLOG K N Hande 19 1976 Shortliffe and Buchanan develop MYCIN, an expert system for diagnosis of infectious diseases, which is capable of dealing with uncertainty 1981 Japan begins, at great expense, the “Fifth Generation Project” with the goal of building a powerful PROLOG machine. 1982 R1, the expert system for configuring computers, saves Digital Equipment Corporation 40 million dollars per year
  • 20. History of AI 1986 Renaissance of neural networks through, among others, Rumelhart, Hinton and Sejnowski. The system Nettalk learns to read texts aloud 1990 Pearl , Cheeseman , Whittaker, Spiegelhalter bring probability theory into AI with Bayesian networks . Multi-agent systems become popular. 1992 Tesauros TD-gammon program demonstrates the advantages of reinforcement learning. 1993 Worldwide RoboCup initiative to build soccer-playing autonomous K N Hande 20 1993 Worldwide RoboCup initiative to build soccer-playing autonomous robots 1995 From statistical learning theory, Vapnik develops support vector machines, which are very important today. 1997 IBM’s chess computer Deep Blue defeats the chess world champion Gary Kasparov. 2003 The robots in RoboCup demonstrate impressively what AI and robotics are capable of achieving.
  • 21. History of AI 2006 Service robotics becomes a major AI research area. 2009 First Google self-driving car drives on the California freeway. 2010 Autonomous robots begin to improve their behavior through learning. 2011 IBM’s “Watson” beats two human champions on the television game K N Hande 21 2011 IBM’s “Watson” beats two human champions on the television game show “Jeopardy!”. Watson understands natural language and can answer difficult questions very quickly 2015 Daimler premiers the first autonomous truck on the Autobahn. Google self-driving cars have driven over one million miles and operate within cities. Deep learning enables very good image classification. Paintings in the style of the Old Masters can be automatically generated with deep learning. AI becomes creative!
  • 22. History of AI 2016 The Go program AlphaGo by Google DeepMind beats the European champion 5:0 in January and Korean Lee Sedol, one of the world’s best Go players, 4:1 in March. Deep learning techniques applied to pattern recognition, as well as reinforcement learning K N Hande 22 recognition, as well as reinforcement learning and Monte Carlo tree search lead to this success.
  • 24. Applications of AI 1. Artificial Intelligence in Healthcare: -AI is a study realized to emulate human intelligence into computer technology that could assist both, the doctor and the patients in the following ways: By providing a laboratory for the examination, representation and cataloguing medical information By devising novel tool to support decision making and By devising novel tool to support decision making and research By integrating activities in medical, software and cognitive sciences By offering a content rich discipline for the future scientific medical communities. K N Hande 24
  • 25. Applications of AI 2. Artificial Intelligence in business: Robotic process automation is being applied to highly repetitive tasks normally performed by humans. Chatbots have already been incorporated into websites and e companies to provide immediate websites and e companies to provide immediate service to customers. 3. AI in education: It automates grading, giving educators more time. It can also assess students and adapt to their needs, helping them work at their own pace. K N Hande 25
  • 26. Applications of AI 4. AI in Autonomous vehicles: Just like humans, self- driving cars need to have sensors to understand the world around them and a brain to collect, processes and choose specific actions based on information gathered. AI has several applications for these vehicles and among them the more immediate ones are as follows: Directing the car to gas station or recharge station when Directing the car to gas station or recharge station when it is running low on fuel. Adjust the trips directions based on known traffic conditions to find the quickest route. Incorporate speech recognition for advanced communication with passengers. Natural language interfaces and virtual assistance technologies. K N Hande 26
  • 27. Applications of AI 5. AI for robotics will allow us to address the challenges in taking care of an aging population and allow much longer independence. It will drastically reduce, may be even bring down traffic accidents and deaths, as well as enable disaster response for dangerous situations response for dangerous situations 6. Software systems: Diagnosis of software, technical components 7. Adaptive software systems: Intelligent interfaces, Intelligent helper applications, Web applications, (softbots, shopbots) K N Hande 27
  • 28. 8. AI applications: information retrieval. Web search engines – Improve the quality of search – Rely on methods developed in AI Semantic web: – From information to knowledge sharing – From information to knowledge sharing – OWL (The W3C Web Ontology Language (OWL) is a Semantic Web language designed to represent rich and complex knowledge about things, groups of things, and relations between things.) K N Hande 28
  • 29. 9. AI applications: Speech recognition Speech recognition systems: – Hidden Markov models Adaptive speech systems – Adapt to the user (training) – continuous speech – continuous speech Multi-user speech recognition systems – Restricted (no training) – Customer support: • Airline schedules, baggage tracking • Credit card companies. K N Hande 29
  • 30. 10. Applications: Space exploration K N Hande 30
  • 31. AI applications: Medicine Medical diagnosis: Medical imaging: Image guided surgery K N Hande 31
  • 33. AI applications: Game playing K N Hande 33
  • 34. AI APPLICATIONS Robotic toys – Sony’s Aibo Humanoid robot Humanoid robot – Honda’s ASIMO K N Hande 34
  • 36. Everyday Examples of AI 1. Smartphones:From the obvious AI features such as the built-in smart assistants to not so obvious ones such as the portrait mode in the camera, AI is impacting our lives every day. K N Hande 36
  • 37. Everyday Examples of AI 2. Smart Cars and Drones: Tesla cars are a prime example of how the AI is impacting our daily life. Did you know that all the Tesla cars are connected and the things that your car learns is shared across all the cars? K N Hande 37
  • 38. Everyday Examples of AI 3. Social Media Feeds: From the feeds that you see in your timeline to the notifications that you receive from these apps, everything is curated by AI. AI takes all your past behavior, web searches, interactions, and everything else that you do when you are on these websites and tailors the experience just for you. K N Hande 38
  • 39. Everyday Examples of AI 4. Another great example of how AI impacts our lives are the music and media streaming services that we are using on a daily basis. Whether you are using Spotify, Netflix, or YouTube, AI is making the decisions for you. K N Hande 39
  • 40. Everyday Examples of AI 5. Video Games: The video game industry is probably one of the earliest adopters of AI. The integration started very small with the use of AI to generate random levels that people can play. When you are playing a game such as PUBG or Fortnite, you essentially start against a couple of AI- Fortnite, you essentially start against a couple of AI- powered bots and then move to play against real players. Just know that if you play any game, you are using AI. K N Hande 40
  • 41. Everyday Examples of AI 6. Online Ads Network: One of the biggest users of artificial intelligence is the online ad industry which uses AI to not only track user statistics but also serve us ads based on those statistics. K N Hande 41
  • 42. PROBLEM SPACES AND SEARCH Building a system to solve a problem requires the following steps • Define the problem precisely including detailed specifications and what constitutes an acceptable solution • Analyze the problem thoroughly for some features may have a dominant affect on the features may have a dominant affect on the chosen method of solution • Isolate and represent the background knowledge needed in the solution of the problem • Choose the best problem solving techniques in the solution. K N Hande 42
  • 43. Defining the Problem as state space Search Problems dealt with in artificial intelligence generally use a common term called 'state'. A state represents a status of the solution at a given step of the problem solving procedure. The problem solving procedure applies an The problem solving procedure applies an operator to a state to get the next state The process of applying an operator to a state and its subsequent transition to the next state, thus, is continued until the goal (desired) state is derived. K N Hande 43
  • 45. Defining the Problem as state space Search The opening position can be defined as the initial state and a winning position as a goal state, there can be more than one. The representation of games in this way leads to a state space representation and it leads to a state space representation and it is natural for well organized games with some structure It means that the solution involves using known techniques and a systematic search. K N Hande 45
  • 46. Defining the Problem as state space Search A problem space can also be considered to be a search space because in order to solve the problem, we will search the space for a goal state. K N Hande 46
  • 47. Problem of Playing a Chess Suppose we start with the problem statement “Play Chess” To build a program that would play chess, we would first have to specify the starting position of the chess board, the rules that position of the chess board, the rules that define the legal moves, and the board position that represent the win position for one side or the other. It is fairly easy to provide the complete and formal problem description. K N Hande 47
  • 48. Problem of Playing a Chess The starting position can be described as an 8x8 array where each position contains the symbol standing for the appropriate piece in the official chess opening position. We can define our goal as any board position We can define our goal as any board position in which the opponent does not have a legal move and his or her King is under attack. The legal moves can be described as a set of rules consisting of two parts. K N Hande 48
  • 49. Problem of Playing a Chess A left side that defines the pattern to be matched against the current board position and right side that describes the change to be made to the board position to reflect the move. However if we write the rules like above, we have to write very large number of them since there has to be separate rule for roughly 10120 possible board positions. K N Hande 49
  • 51. Problem of Playing a Chess Write the rules describing the legal moves in as general way as possible. Introduce some convenient notation for describing patterns and substitutions. describing patterns and substitutions. K N Hande 51
  • 52. Rule for Playing Chess K N Hande 52
  • 53. State Space Representation It allows for some formal definition of the problem as the need to convert some given situation into some desired situation using a set of permissible operations. It permits us to define the process of solving It permits us to define the process of solving a particular problem as a combination of known technique and search, the general technique of exploring the space to try to find some path from the current state to goal state. K N Hande 53
  • 54. A Water Jug Problem In Artificial Intelligence Problem: We are given two jugs, a 4-gallon one and 3-gallon one. Neither has any measuring marked on it. There is a pump, which can be used to fill the jugs with water. How can we get exactly 2 gallons of water into 4-gallon jug? The state space for this problem can be described as the set of ordered pairs of integers (X, Y) such that X = 0, 1, 2, 3 or 4 and Y = 0, 1, 2 or 3 that X = 0, 1, 2, 3 or 4 and Y = 0, 1, 2 or 3 X is the number of gallons of water in the 4-gallon jug Y the quantity of water in the 3-gallon jug. K N Hande 54
  • 55. A Water Jug Problem In Artificial Intelligence The start state is (0, 0) and the goal state is (2, n) for any value of n, as the problem does not specify how many gallons need to be filled in the 3-gallon jug (0, 1, 2, 3). K N Hande 55
  • 56. The operators to be used to solve the problem K N Hande 56
  • 57. Assumptions, not mentioned, in the problem state. 1. We can fill a jug from the pump. 2. We can pour water out a jug, onto the ground. 3. We can pour water out of one jug into the other 4. No other measuring devices are available K N Hande 57
  • 58. Water Jug Problem To solve the water jug problem, all we need, in addition to the problem description given above, is a control structure which loops through a simple cycle in which some rule whose left side matches the current state is chosen, the appropriate change to the state is chosen, the appropriate change to the state is made as described in the corresponding right side and the resulting state is checked to see if it corresponds to a goal state. K N Hande 58
  • 60. Issues in Water Jug Problem It has been shown above how an informal problem state (stated in English) has been converted into a formal one (Fig. 2.4) with the help of a water jug problem. In doing so some issues which affect the In doing so some issues which affect the approach towards the solution are: The rules should be stated explicitly and not written because they are allowable K N Hande 60
  • 61. Issues in Water Jug Problem Now consider the rules 3 and 4 should or should not these rules be included in the list of available operators? The rules 11 and 12 are special purpose rules, written to capture special purpose knowledge to solve this problem. to solve this problem. It is thus clear that to create a program for solving a problem simply the formal description of the problem has to be generated using the knowledge about the given problem. This process is called operationalization K N Hande 61
  • 62. To formalize a problem the following steps are needed (i)Define the problem precisely, giving the specification of what the initial situation (s) and the final situation (s) will be. (ii) Analyze the problem because a few important features can have immense impact on the suitability of different techniques available for suitability of different techniques available for solving the problem. (iii) Represent the knowledge completely, which is necessary to solve problem in a given domain. (iv) Choose the best technique(s) and apply it (them) to the particular problem. K N Hande 62
  • 63. Summarizingly any problem can be solved by the following series of step 1. Define a state space which contains all the possible configurations of the relevant objects and even some impossible ones. 2. Specify one or more states within that space which would describe possible situations from which the problem solving process may start. These states are problem solving process may start. These states are called the initial states. 3. Specify one or more states which would be acceptable as solutions to the problem. These states are called goal states. 4. Specify a set of rules which describe the actions (operators) available and a control strategy to decide the order of application of these rules. K N Hande 63
  • 64. Approach The problem can be solved by collecting all knowledge of the problem, (in the present case, water jug problem) with the help of production rules and using an appropriate production rules and using an appropriate control strategy; move through the problem space until a path from an initial state to goal state is found. K N Hande 64
  • 65. PRODUCTION SYSTEM A production is a rule consisting of a situation recognition part and an action part. A production is a situation-action pair in which the left side is a list of things to watch for and the right side is a list of things to do for and the right side is a list of things to do so The production system is a model of computation that can be applied to implement search algorithms and model human problem solving K N Hande 65
  • 66. Components of Production System 1) Set of production rules, which are of the form A®B. 2) A database, which contains all the appropriate information for the particular task. 3) A control strategy that specifies order in which the rules will be compared to the database of the rules will be compared to the database of rules and a way of resolving the conflicts that arise when several rules match simultaneously. 4) A rule applier, which checks the capability of rule by matching the current state with the left hand side of the rule and finds the appropriate rule from database of rules. K N Hande 66
  • 68. Features of Production System Expressiveness and intuitiveness Simplicity: The structure of each sentence in a production system is unique and uniform Modularity Modifiability Knowledge intensive K N Hande 68
  • 69. Control Strategies Control Strategy in Artificial Intelligence scenario is a technique or strategy, tells us about which rule has to be applied next while searching for the solution of a problem while searching for the solution of a problem within problem space. Control Strategy should cause Motion Control strategy should be Systematic K N Hande 69
  • 70. One systematic Control Strategy for the Water Jug problem K N Hande 70
  • 73. Advantages of Depth First Search Requires less memory since only the nodes on current path are stored. May find the solution without examining much of the search space at all. much of the search space at all. K N Hande 73
  • 74. Advantages of Breadth First Search Will not get trapped in exploring a blind alley If there is a solution then Breadth First Search guaranteed to find it. Longer paths Search guaranteed to find it. Longer paths are never explored until all shorter paths have been examined. K N Hande 74
  • 75. The Traveling Salesman Problem Problem: A traveler needs to visit all the cities from a list, where distances between all the cities are known and each city should be visited just once. What is the shortest possible route that he visits each city exactly once and returns to the origin city? The salesman‘s goal is to keep both the travel costs and the distance traveled as low as costs and the distance traveled as low as possible. Focused on optimization, TSP is often used in computer science to find the most efficient route for data to travel between various nodes. K N Hande 75
  • 77. The Traveling Salesman Problem TSP has been studied for decades and several solutions have been theorized. Rather than focus on finding the most effective route, TSP is often concerned with finding the cheapest solution. finding the cheapest solution. Travelling salesman problem is the most notorious computational problem We can use brute-force approach to evaluate every possible tour K N Hande 77
  • 78. The Traveling Salesman Problem For n number of vertices in a graph, there are (n - 1)! Number of possibilities. This phenomenon is called combinatorial explosion. Technique called as branch and bound can be Technique called as branch and bound can be used to find the solution to the TPS problem. Begin generating complete paths, keeping track of shortest paths found so far. Give up exploring any path as soon as its partial length becomes greater than the shortest path found so far. K N Hande 78
  • 79. Heuristics Search A Heuristic is a technique to solve a problem faster than classic methods, or to find an approximate solution when classic methods cannot. This is a kind of a shortcut as we often trade one of optimality, completeness, accuracy, one of optimality, completeness, accuracy, or precision for speed. A heuristic is a method that • might not always find the best solution • but is guaranteed to find a good solution in reasonable time. K N Hande 79
  • 80. Heuristics Search In mathematical optimization and computer science, heuristic (from Greek I find, discover) is a technique designed for solving a problem more quickly when classic methods are too slow, or for finding an approximate solution when classic methods fail to find approximate solution when classic methods fail to find any exact solution. In a way, it can be considered a shortcut. The objective of a heuristic is to produce a solution in a reasonable time frame that is good enough for solving the problem at hand. K N Hande 80
  • 81. Heuristics Search One example of one general purpose heuristics that is useful in variety of combinatorial problems is the nearest neighbor heuristics, which work by selecting the locally superior alternative at each step. Applying it to TSP we arrive at following procedure. procedure. – Arbitrarily select the starting city – To select the next city, look at all the cities not yet visited, and select the one closest to current city. Go to it next. – Repeat step 2 until all cities have been visited. K N Hande 81
  • 82. Heuristics Search There are two major ways in which domain- specific, heuristic knowledge can be incorporated in rule based search procedure. • In the rules themselves. For example, rule for chess playing system might describe not simply the set of legal moves but rather a set simply the set of legal moves but rather a set of “sensible moves” as determined by the writer. • As a heuristic function that evaluates the individual problems states and determines how desirable they are. K N Hande 82
  • 83. A Heuristic Function A heuristic function is a function that maps from problem state descriptions to measures of desirability, usually represented as numbers. Value of the heuristic function at given node in the search process will give as good an in the search process will give as good an estimate as possible of whether that node is on desired path to solution. Well designed heuristic functions can play an important part in efficiently guiding a search process towards a solution. K N Hande 83
  • 84. A Heuristic Function The purpose of the heuristic function is to guide the search process in most profitable direction by suggesting which path to follow first when more than one path is available. more than one path is available. In general there is a trade-off between the cost of evaluating a heuristic function and savings in search time that the function provides. K N Hande 84
  • 85. A Heuristic Function With respect to the heuristic function we can define Artificial Intelligence as the study of techniques for solving exponentially hard problems in a polynomial time by problems in a polynomial time by exploiting knowledge about the problem domain. K N Hande 85
  • 86. PROBLEM CHARACTERISTICS In order to choose the most appropriate method for a particular problem, it is necessary to analyze the problem along several key dimensions. Is the problem decomposable into set of sub problems? Can the solution step be ignored or undone? Can the solution step be ignored or undone? Is the problem universally predictable? Is a good solution to the problem obvious without comparison to all the possible solutions? K N Hande 86
  • 87. PROBLEM CHARACTERISTICS Is the desire solution a state of world or a path to a state? Is a large amount of knowledge absolutely required to solve the problem? required to solve the problem? Will the solution of the problem required interaction between the computer and the person? K N Hande 87
  • 88. 1. Is the Problem Decomposable? Suppose we want to solve the problem of computing the expression. We 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. K N Hande 88
  • 90. Is the Problem Decomposable? Problem tree will be generated by the process of problem decomposition as it can be exploited by simple recursive integration program. integration program. Using this technique of problem decomposition we can easily solve the very large problems. K N Hande 90
  • 91. Is the Problem Decomposable? Consider the following problem of Blocks World K N Hande 91
  • 92. Is the Problem Decomposable? Assume following operators are available K N Hande 92 The idea of the solution is to reducing the problem of getting B on C, and A on B to two separate problems
  • 94. Is the Problem Decomposable? In this problem, the two sub problems are not independent. They interact and those interaction must be considered to arrive at the solution for the entire problem. entire problem. These two examples, symbolic integration and blocks world, illustrate the difference between decomposable and non- decomposable problems. K N Hande 94
  • 95. 2. Can the solution step be ignored or undone? Consider the problem of proving a mathematical problem. We proceed by proving a lemma, but we realize that lemma is no help at all. Are we in trouble? No…… Are we in trouble? No…… Consider the different problem K N Hande 95
  • 97. Can the solution step be ignored or undone? In attempting to solve the 8-puzzle we might make a stupid move. An additional step must be performed to undo each incorrect step, whereas no action was required to “undo” a useless lemma was required to “undo” a useless lemma The control structure for 8-puzzle solver must keep track of a order in which the operations are performed. K N Hande 97
  • 98. Can the solution step be ignored or undone? K N Hande 98
  • 99. Can the solution step be ignored or undone? K N Hande 99
  • 100. Can The Solution Step Be Ignored Or Undone? The recoverability of the problem plays an important role in determining the complexity of the control structure necessary for the problem solution. necessary for the problem solution. K N Hande 100
  • 101. 3. Is the problem universally predictable? In case of 8-puzzle problem, it is possible to plan entire sequence of moves and be confident that we know what the resulting state will be. We can use planning to avoid having to undo We can use planning to avoid having to undo actual moves. Thus a control structure that allows backtracking is necessary. However in other games this planning process may not be possible. K N Hande 101
  • 102. 3. Is the problem universally predictable? Suppose we want play Bridge. But it is not possible to do such planning with certainty, since we cannot know where exactly all the cards are. all the cards are. So here we can investigate several plans and use probabilities of the various outcomes to choose a plan that has highest estimated probability of leading to good score K N Hande 102
  • 103. 3. Is the problem universally predictable? So 8-puzzle is certain-outcome problem and Bridge is uncertain-outcome problem. Planning can be defined here is problem- solving without a feedback from environment. environment. For solving certain-outcome problem, planning will generate the sequence of operators which will guarantee to lead the solution of the problem. K N Hande 103
  • 104. 3. Is the problem universally predictable? For uncertain-outcome problems planning can at best generate the operators that has a good probability of leading a solution. These problem characteristics, ignorable versus recoverable versus irrecoverable versus recoverable versus irrecoverable and certain-outcome versus uncertain- outcome, interact in an interesting way. Thus one of the hardest type of problem to solve is the irrecoverable, uncertain- outcome K N Hande 104
  • 105. 3. Is the problem universally predictable? A few examples of such problems are: 1. Playing bridge 2. Controlling a robot arm 3. Helping a lawyer decide how to defend his client against a murder charge. K N Hande 105
  • 106. 4. Is A Good Solution Absolute Or Relative? Consider the problem of answering questions based on database of simple facts: K N Hande 106
  • 107. 4. Is A Good Solution Absolute Or Relative? Suppose we ask the question “Is Marcus Alive?” By using predicate logic and using formal inference methods we can easily answer this question. this question. In fact either of the two reasoning paths will lead to the answer as shown in following figure. K N Hande 107
  • 109. 4. Is A Good Solution Absolute Or Relative? But now consider again the traveling salesman problem. Our goal is to find the shortest route that will visit the each city exactly once. K N Hande 109
  • 111. 4. Is A Good Solution Absolute Or Relative? These two examples illustrate the difference between any-path problems and best-path problems. Best-path problems are computationally Best-path problems are computationally harder than any-path problems. K N Hande 111