KEMBAR78
Lecture - 2 - Problem Solving.pptx bbbbbb | PPTX
PROBLEM SOLVING
ARTIFICIAL INTELLIGENCE – 2N D
LECTURE
Engr. Muhammad Ali Imran
PROBLEM SOLVING
• Problem solving was one of them when we referred to it using
the examples of a mouse searching a maze and the next
number in the sequence problem.
• Historically people viewed the phenomena of intelligence as
strongly related to problem solving. They used to think that
the person who is able to solve more and more problems is
more intelligent than others.
• In order to understand how exactly problem solving
contributes to intelligence, we need to find out how intelligent
species solve problems.
Engr. Muhammad Ali Imran
PROBLEM SOLVING (Cont’d)
• Problem solving is a process of generating solutions from
observed or given data. It is however not only always possible
to use direct methods (i.e. go directly from data to solution).
Instead, problem solving often need to use indirect or model-
based methods.
• Most real world problems can be solved only by searching for
a solution.
• AI is concerned with these type of problems solving.
• Problem solving is a process of generating solutions from
observed data.
Engr. Muhammad Ali Imran
• The Problems like, computation of the sine of an angle or the
square root of a value. These can be solved through the use of
deterministic procedure and the success is guaranteed.
• In the real world, very few problems lend themselves to
straightforward solutions.
PROBLEM SOLVING (Cont’d)
PROBLEM SOLVING IS FUNDAMENTAL TO MANY
AI-BASED APPLICATIONS.
Engr. Muhammad Ali Imran
CLASSICAL APPROACH
• The classical approach to solving a problem is pretty simple.
Given a problem at hand use hit and trial method to check for
various solutions to that problem.
• This hit and trial approach usually works well for trivial
problems and is referred to as the classical approach to
problem solving.
Engr. Muhammad Ali Imran
EXAMPLE: TOY PROBLEMS
• The problem-solving approach has been applied to a vast array of task
environments. We list some of the best known here, distinguishing between
toy and real-world problems.
• A TOY PROBLEM intended to illustrate or exercise various problem-
solving methods. It can be given a concise, exact description and hence is
usable by different researchers to compare the REAL-WORLD
performance of algorithms.
• A real-world problem is one whose solutions people actually care about.
Such problems tend not to have a single agreed-upon description, but we
can give the general flavor of their formulations.
Engr. Muhammad Ali Imran
Engr. Muhammad Ali Imran
TOY PROBLEMS (Cont’d)
• States: The state is determined by both the agent location and the dirt
locations. The agent is in one of two locations, each of which might or
might not contain dirt. Thus, there are 2 × 22
= 8 possible world states. A
larger environment with n locations has n*2n
states.
• Initial state: Any state can be designated as the initial state.
• Actions: In this simple environment, each state has just three actions: Left,
Right, and Suck. Larger environments might also include Up and Down.
• Transition model: The actions have their expected effects, except that
moving Left in the leftmost square, moving Right in the rightmost square,
and Absorb in a clean square have no effect. The complete state space is
shown in Figure.
• Goal test: This checks whether all the squares are clean.
• Path cost: Each step costs 1, so the path cost is the number of steps in the
path.
Engr. Muhammad Ali Imran
EXAMPLE: 8-PUZZLE PROBLEM
Engr. Muhammad Ali Imran
EXAMPLE: 8-PUZZLE PROBLEM
• States: A state description specifies the location of each of the eight tiles
and the blank in one of the nine squares.
• Initial state: Any state can be designated as the initial state. Note that any
given goal can be reached from exactly half of the possible initial states.
• Actions: The simplest formulation defines the actions as movements of the
blank space Left, Right, Up, or Down. Different subsets of these are
possible depending on where the blank is.
• Transition model: Given a state and action, this returns the resulting state;
for example, if we apply Left to the start state in Figure, the resulting state
has the 5 and the blank switched.
• Goal test: This checks whether the state matches the goal configuration
shown in Figure (Other goal configurations are possible.)
• Path cost: Each step costs 1, so the path cost is the number of steps in the
path.
Engr. Muhammad Ali Imran
• Problem spaces is an abstract space.
• A problem space encompasses all valid states that can be
generated by the application of any combination of operators on
any combination of objects.
• The problem spaces may contain one or more solutions.
• Solution is a combination of operations and objects that achieve
the goals…
• Search refers to the search for a solution in a problem space.
• Search proceeds with different type of search control strategies.
• The depth-first search and breadth-first are the two common
search strategies.
PROBLEM SPACE
Engr. Muhammad Ali Imran
PROBLEM SPACE (Cont’d)
Engr. Muhammad Ali Imran
PROBLEM SPACE (Cont’d)
• A problem space is represented by directed graph, where
‘Nodes’ represent ‘search state’ and ‘paths’ represented the
‘operators’ applied to change the state.
• To simplify a search algorithm, it is often convenient to
logically and programmatically represent a problem space as a
tree. A tree usually decrease the complexity of a search at a
cost. Here, cost is due to duplicating some nodes on the tree
that were linked numerous times in the graph; e.g., B and D
nodes shown in example.
Engr. Muhammad Ali Imran
EXAMPLE: TOWER OF HANOI PUZZLE
• For a Robot this might consist of PICKUP, PUTDOWN,
MOVEFORWARD, MOVEBACKWORD, MOVELEFT,
MOVERIGHT – until the goal reached.
• Puzzles and games have explicit rules: the tower of Hanoi
puzzle.
• Situations encountered while solving the problem are
described as STATES. The set of all possible configurations of
rings on the pegs is called problem space.
Engr. Muhammad Ali Imran
EXAMPLE: TOWER OF HANOI PUZZLE
Engr. Muhammad Ali Imran

Lecture - 2 - Problem Solving.pptx bbbbbb

  • 1.
    PROBLEM SOLVING ARTIFICIAL INTELLIGENCE– 2N D LECTURE Engr. Muhammad Ali Imran
  • 2.
    PROBLEM SOLVING • Problemsolving was one of them when we referred to it using the examples of a mouse searching a maze and the next number in the sequence problem. • Historically people viewed the phenomena of intelligence as strongly related to problem solving. They used to think that the person who is able to solve more and more problems is more intelligent than others. • In order to understand how exactly problem solving contributes to intelligence, we need to find out how intelligent species solve problems. Engr. Muhammad Ali Imran
  • 3.
    PROBLEM SOLVING (Cont’d) •Problem solving is a process of generating solutions from observed or given data. It is however not only always possible to use direct methods (i.e. go directly from data to solution). Instead, problem solving often need to use indirect or model- based methods. • Most real world problems can be solved only by searching for a solution. • AI is concerned with these type of problems solving. • Problem solving is a process of generating solutions from observed data. Engr. Muhammad Ali Imran
  • 4.
    • The Problemslike, computation of the sine of an angle or the square root of a value. These can be solved through the use of deterministic procedure and the success is guaranteed. • In the real world, very few problems lend themselves to straightforward solutions. PROBLEM SOLVING (Cont’d) PROBLEM SOLVING IS FUNDAMENTAL TO MANY AI-BASED APPLICATIONS. Engr. Muhammad Ali Imran
  • 5.
    CLASSICAL APPROACH • Theclassical approach to solving a problem is pretty simple. Given a problem at hand use hit and trial method to check for various solutions to that problem. • This hit and trial approach usually works well for trivial problems and is referred to as the classical approach to problem solving. Engr. Muhammad Ali Imran
  • 6.
    EXAMPLE: TOY PROBLEMS •The problem-solving approach has been applied to a vast array of task environments. We list some of the best known here, distinguishing between toy and real-world problems. • A TOY PROBLEM intended to illustrate or exercise various problem- solving methods. It can be given a concise, exact description and hence is usable by different researchers to compare the REAL-WORLD performance of algorithms. • A real-world problem is one whose solutions people actually care about. Such problems tend not to have a single agreed-upon description, but we can give the general flavor of their formulations. Engr. Muhammad Ali Imran
  • 7.
  • 8.
    TOY PROBLEMS (Cont’d) •States: The state is determined by both the agent location and the dirt locations. The agent is in one of two locations, each of which might or might not contain dirt. Thus, there are 2 × 22 = 8 possible world states. A larger environment with n locations has n*2n states. • Initial state: Any state can be designated as the initial state. • Actions: In this simple environment, each state has just three actions: Left, Right, and Suck. Larger environments might also include Up and Down. • Transition model: The actions have their expected effects, except that moving Left in the leftmost square, moving Right in the rightmost square, and Absorb in a clean square have no effect. The complete state space is shown in Figure. • Goal test: This checks whether all the squares are clean. • Path cost: Each step costs 1, so the path cost is the number of steps in the path. Engr. Muhammad Ali Imran
  • 9.
  • 10.
    EXAMPLE: 8-PUZZLE PROBLEM •States: A state description specifies the location of each of the eight tiles and the blank in one of the nine squares. • Initial state: Any state can be designated as the initial state. Note that any given goal can be reached from exactly half of the possible initial states. • Actions: The simplest formulation defines the actions as movements of the blank space Left, Right, Up, or Down. Different subsets of these are possible depending on where the blank is. • Transition model: Given a state and action, this returns the resulting state; for example, if we apply Left to the start state in Figure, the resulting state has the 5 and the blank switched. • Goal test: This checks whether the state matches the goal configuration shown in Figure (Other goal configurations are possible.) • Path cost: Each step costs 1, so the path cost is the number of steps in the path. Engr. Muhammad Ali Imran
  • 11.
    • Problem spacesis an abstract space. • A problem space encompasses all valid states that can be generated by the application of any combination of operators on any combination of objects. • The problem spaces may contain one or more solutions. • Solution is a combination of operations and objects that achieve the goals… • Search refers to the search for a solution in a problem space. • Search proceeds with different type of search control strategies. • The depth-first search and breadth-first are the two common search strategies. PROBLEM SPACE Engr. Muhammad Ali Imran
  • 12.
  • 13.
    PROBLEM SPACE (Cont’d) •A problem space is represented by directed graph, where ‘Nodes’ represent ‘search state’ and ‘paths’ represented the ‘operators’ applied to change the state. • To simplify a search algorithm, it is often convenient to logically and programmatically represent a problem space as a tree. A tree usually decrease the complexity of a search at a cost. Here, cost is due to duplicating some nodes on the tree that were linked numerous times in the graph; e.g., B and D nodes shown in example. Engr. Muhammad Ali Imran
  • 14.
    EXAMPLE: TOWER OFHANOI PUZZLE • For a Robot this might consist of PICKUP, PUTDOWN, MOVEFORWARD, MOVEBACKWORD, MOVELEFT, MOVERIGHT – until the goal reached. • Puzzles and games have explicit rules: the tower of Hanoi puzzle. • Situations encountered while solving the problem are described as STATES. The set of all possible configurations of rings on the pegs is called problem space. Engr. Muhammad Ali Imran
  • 15.
    EXAMPLE: TOWER OFHANOI PUZZLE Engr. Muhammad Ali Imran