SlideShare a Scribd company logo
1 of 73
Search Problems

 Explorating Alternatives

R&N: Chap. 3, Sect. 3.1โ€“2 + 3.6




                                  1
Example: 8-Puzzle

   8    2                 1   2   3

   3    4   7             4   5   6

   5    1   6             7   8

  Initial state           Goal state


          Search is about the
       exploration of alternatives
                                       2
Exploratory search is an old idea:
The Labyrinth and the Ariadne Thread

According to Greek mythology, Theseus came to Crete to slay the
Minotaur, a monster who lived in a Labyrinth. Ariadne gave Theseus a
ball of yarn which he unwound as he entered the Labyrinth. After
killing the Minotaur, Theseus traced the thread back to the entrance
of the Labyrinth, rejoined Ariadne, and successfully escaped Crete




                                                                  3
Since the dawn of civilization, puzzles and
games that require the exploration of
alternative paths have fascinated mankind
and have been considered a challenge for
human intelligence

๏‚ง Chess originated in Persia and India
  about 4000 years ago
๏‚ง Checkers appeared as early as 1600 B.C
  in Egyptian paintings
๏‚ง Go originated in China over 3000 years
  ago
                                           4
5
15-Puzzle
 Introduced in 1878 by Sam Loyd, who dubbed
 himself โ€œAmericaโ€™s greatest puzzle-expertโ€



 1    2    3    4

 5    6    7    8

 9    10   11   12

 13   14   15
                                              6
7
15-Puzzle
 Sam Loyd offered $1,000 of his own money to
 the first person who would solve the following
 problem:


 1    2    3    4           1   2    3    4

 5    6    7    8    ?      5   6    7    8

 9    10   11   12          9   10   11   12

 13   14   15              13   15   14
                                               8
But no one ever won the prize !!
                                   9
8-Puzzle: State Space

                             ...
             8   2   7

             3   4
 8   2       5   1   6

 3   4   7

 5   1   6   8       2       8   2
             3   4   7   3   4   7

             5   1   6   5   1   6


                                     10
8-Puzzle: Successor Function
              8   2   7

              3   4
              5   1   6



  8   2       8   2   7   8   2   7
  3   4   7   3   4   6   3       4

  5   1   6   5   1       5   1   6


                                      11
Stating a Problem as
a Search Problem

S                ๏‚ง State space S
     1           ๏‚ง Successor function:
         3   2
                    x โˆˆ S โ†’ SUCCESSORS(x) โˆˆ 2S
                 ๏‚ง Arc cost
                 ๏‚ง Initial state s0
                 ๏‚ง Goal test:
                    xโˆˆS โ†’ GOAL?(x) =T or F


                                           12
State Graph
๏‚ง It is defined as follows:
   โ€ข Each state is represented by a distinct
     node
   โ€ข An arc connects a node s to a node sโ€™ if
     sโ€™ โˆˆ SUCCESSORS(s)
๏‚ง The state graph may contain more than
  one connected component


                                           13
14
Solution to the Search Problem
๏‚ง A solution is a path connecting the initial
 node to a goal node (any one)




                                           15
16
Solution to the Search Problem
๏‚ง A solution is a path connecting the initial
  to a goal node (any one)
๏‚ง The cost of a path is the sum of the
  edge costs along this path
๏‚ง An optimal solution is a solution path of
  minimum cost
๏‚ง There might be no solution !

                                              17
18
How big is the state space of
the (n2-1)-puzzle?

๏‚ง 8-puzzle ๏ƒ  9! = 362,880 states
๏‚ง 15-puzzle ๏ƒ  16! ~ 1.3 x 1012 states
๏‚ง 24-puzzle ๏ƒ  25! ~ 1025 states
 But only half of these states are
 reachable from any given state


                                        19
Permutation Inversions
๏‚ง Let the goal be:              1   2     3   4
                                5   6     7   8
                                9 10 11 12
                                13 14 15

๏‚ง Let ni be the number of tiles j < i that appear after tile i
    (from left to right and top to bottom)
๏‚ง   N = n2 + n3 + โ€ฆ + n15 + row number of empty tile

      1   2   3   4   n2 = 0    n3 = 0    n4 = 0
      5 10 7      8   n5 = 0    n6 = 0    n7 = 1
                      n8 = 1    n9 = 1    n10 = 4   ๏ƒ N=7+4
      9   6   11 12
                      n11 = 0   n12 = 0   n13 = 0
     13 14 15         n14 = 0   n15 = 0                      20
๏‚ง Proposition: (N mod 2) is invariant under
  any legal move of the empty tile
๏‚ง Proof:
  โ€ข Any horizontal move of the empty tile
    leaves N unchanged
  โ€ข A vertical move of the empty tile changes
    N by an even increment

     1   2   3   4          1   2   3   4
     5   6       7          5   6 11 7
s=                   sโ€™ =                   N(sโ€™) = N(s) + 3 + 1
     9 10 11 8              9 10        8
     13 14 15 12            13 14 15 12
                                                             21
๏‚ง Proposition: (N mod 2) is invariant under
 any legal move of the empty tile

๏‚ง ๏ƒ  For a goal state g to be reachable
 from a state s, a necessary condition is
 that N(g) and N(s) have the same parity

๏‚ง It can be shown that this is also a
 sufficient condition

๏‚ง ๏ƒ  The state graph consists of two
 connected components of equal size
                                          22
15-Puzzle
Sam Loyd offered $1,000 of his own money to
the first person who would solve the following
problem:


1    2    3    4           1   2    3    4

5    6    7    8    ?      5   6    7    8

9    10   11   12          9   10   11   12

13   14   15              13   15   14

     N=4                       N=5
                                             So, the second state is
                                             not reachable from the
                                             first, and Sam Loyd took
                                             no risk with his money ...

                                                                    23
What is the Actual State Space?
โ€ข   The set of all states?
    [e.g., a set of 16! states for the 15-puzzle]
โ€ข   The set of all states from which a given goal
    state is reachable?
    [e.g., a set of 16!/2 states for the 15-puzzle]
โ€ข   The set of all states reachable from a given
    initial state?
In general, the answer is a)




                                                      24
What is the Actual State Space?
โ€ข   The set of all states?
    [e.g., a set of 16! states for the 15-puzzle]
โ€ข   The set of all states from which a given goal
    state is reachable?
    [e.g., a set of 16!/2 states for the 15-puzzle]
โ€ข   The set of all states reachable from a given
    initial state?
In general, the answer is a)
But a fast test determining whether a state is reachable
from another is very useful, as search-based problem
solvers are often very inefficient when a problem has no
solution
                                                      25
Stating a Problem as
a Search Problem

S                ๏‚ง State space S
     1           ๏‚ง Successor function:
         3   2
                    x โˆˆ S โ†’ SUCCESSORS(x) โˆˆ 2S
                 ๏‚ง Arc cost
                 ๏‚ง Initial state s0
                 ๏‚ง Goal test:
                    xโˆˆS โ†’ GOAL?(x) =T or F
                 ๏‚ง A solution is a path joining
                   the initial to a goal node
                                            26
Searching the State Space
                    ๏‚ง Often it is not
                      feasible to build
                      a complete
                      representation
                      of the state
                      graph




                                    27
8-, 15-, 24-Puzzles
                  8-puzzle ๏ƒ  362,880 states

                                       0.036 sec

       15-puzzle ๏ƒ  1.3 x 1012 states

                           < 4 hours


24-puzzle ๏ƒ  1025 states
                    > 109 years


                             100 millions states/sec

                                                       28
Searching the State Space
                    ๏‚ง Often it is not
                        feasible to build
                        a complete
                        representation
                        of the state
                        graph
                    ๏‚ง   A problem solver
                        must construct a
                        solution by
                        exploring a small
                        portion of the
                        graph


                                      29
Searching the State Space




                            30
Searching the State Space




                     Search tree




                                   31
Searching the State Space




                     Search tree




                                   32
Searching the State Space




                     Search tree




                                   33
Searching the State Space




                     Search tree




                                   34
Searching the State Space




                     Search tree




                                   35
Simple Problem-Solving-Agent
Algorithm


  ๏ท   s0 ๏ƒŸ sense/read initial state
  ๏ท   GOAL? ๏ƒŸ select/read goal test
  ๏ท   Succ ๏ƒŸ select/read successor function
  ๏ท   solution ๏ƒŸ search(s0, GOAL?, Succ)
  ๏ท   perform(solution)


                                              36
State Space
๏‚ง Each state is an abstract representation
 of a collection of possible worlds sharing
 some crucial properties and differing on
 non-important details only
 E.g.: In assembly planning, a state does not
 define exactly the absolute position of each part




๏‚ง The state space is discrete. It may be
 finite, or infinite                           37
Successor Function
๏‚ง It implicitly represents all the actions
 that are feasible in each state




                                             38
Successor Function
๏‚ง It implicitly represents all the actions
  that are feasible in each state
๏‚ง Only the results of the actions (the
  successor states) and their costs are
  returned by the function
๏‚ง The successor function is a โ€œblack boxโ€:
  its content is unknown
 E.g., in assembly planning, the function does
 not say if it only allows two sub-assemblies to
 be merged or if it makes assumptions about
 subassembly stability                           39
Path Cost
๏‚ง An arc cost is a positive number
 measuring the โ€œcostโ€ of performing the
 action corresponding to the arc, e.g.:
  โ€ข 1 in the 8-puzzle example
  โ€ข expected time to merge two sub-assemblies
๏‚ง We will assume that for any given
 problem the cost c of an arc always
 verifies: c โ‰ฅ ฮต > 0, where ฮต is a constant


                                            40
Path Cost
๏‚ง An arc cost is a positive number
 measuring the โ€œcostโ€ of performing the
 action corresponding to the arc, e.g.:
  โ€ข 1 in the 8-puzzle example
  โ€ข expected time to merge two sub-assemblies
๏‚ง We will assume that for any given
 problem the cost c of an arc always
 verifies: c โ‰ฅ ฮต > 0, where ฮต is a constant
 [This condition guarantees that, if path becomes
 arbitrarily long, its cost also becomes arbitrarily large]
                                 Why is this needed?    41
Goal State                            1   2 3
๏‚ง It may be explicitly described:     4 5 6
                                      7 8
                            1 a a
๏‚ง   or partially described:
                            a 5 a
                                     (โ€œaโ€ stands for โ€œanyโ€)
                            a 8 a
๏‚ง or defined by a condition,
    e.g., the sum of every row, of every column,
    and of every diagonals equals 30 15 1 2 12
                                      4 10 9      7
                                      8   6   5 11
                                      3 13 14
                                                       42
Other examples




                 43
8-Queens Problem
Place 8 queens in a chessboard so that no two
queens are in the same row, column, or diagonal.




       A solution            Not a solution


                                              44
Formulation #1
                  ๏‚ง States: all arrangements of 0,
                      1, 2, ..., or 8 queens on the
                      board
                  ๏‚ง   Initial state: 0 queen on the
                      board
                  ๏‚ง   Successor function: each of
                      the successors is obtained by
                      adding one queen in an empty
                      square
                  ๏‚ง   Arc cost: irrelevant
                  ๏‚ง   Goal test: 8 queens are on the
                      board, with no two of them
                      attacking each other
 ๏ƒ  64x63x...x53 ~ 3x1014 states
                                                  45
Formulation #2
                  ๏‚ง States: all arrangements of k =
                      0, 1, 2, ..., or 8 queens in the k
                      leftmost columns with no two
                      queens attacking each other
                  ๏‚ง   Initial state: 0 queen on the
                      board
                  ๏‚ง   Successor function: each
                      successor is obtained by adding
                      one queen in any square that is
                      not attacked by any queen
                      already in the board, in the
                      leftmost empty column
                  ๏‚ง   Arc cost: irrelevant
                  ๏‚ง   Goal test: 8 queens are on the
 ๏ƒ  2,057 states       board                            46
n-Queens Problem
๏‚ง A solution is a goal node, not a path to this
    node (typical of design problem)
๏‚ง   Number of states in state space:
    โ€ข 8-queens ๏ƒ  2,057
    โ€ข 100-queens ๏ƒ  1052
๏‚ง But techniques exist to solve n-queens
    problems efficiently for large values of n
    They exploit the fact that there are many
    solutions well distributed in the state space


                                                    47
Path Planning




   What is the state space?
                              48
Formulation #1




   Cost of one horizontal/vertical step = 1
   Cost of one diagonal step = โˆš2
                                              49
Optimal Solution




   This path is the shortest in the discretized state
   space, but not in the original continuous space
                                                   50
Formulation #2
sweep-line




                   51
Formulation #2




                 52
States




         53
Successor Function




                     54
Solution Path




    A path-smoothing post-processing step is
    usually needed to shorten the path further
                                                 55
Formulation #3




    Cost of one step: length of segment
                                          56
Formulation #3




   Visibility graph

     Cost of one step: length of segment
                                           57
Solution Path




    The shortest path in this state space is also the
    shortest in the original continuous space
                                                    58
Assembly (Sequence) Planning




                               59
Possible Formulation
๏‚ง States: All decompositions of the assembly
    into subassemblies (subsets of parts in their
    relative placements in the assembly)
๏‚ง   Initial state: All subassemblies are made of a
    single part
๏‚ง   Goal state: Un-decomposed assembly
๏‚ง   Successor function: Each successor of a state
    is obtained by merging two subassemblies (the
    successor function must check if the merging
    is feasible: collision, stability, grasping, ...)
๏‚ง   Arc cost: 1 or time to carry the merging
                                                   60
A Portion of State Space




                           61
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




                                62
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




                                63
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




                                64
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




                                65
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




                                66
But the formulation rules out
โ€œnon-monotonicโ€ assemblies




    X
               This โ€œsubassemblyโ€ is not
               allowed in the definition of
               the state space: the 2 parts
               are not in their relative
               placements in the assembly

           Allowing any grouping of parts
           as a valid subassembly would
           make the state space much
           bigger and more difficult
           to search
                                              67
Assumptions in Basic Search

๏‚ง The world is static
๏‚ง The world is discretizable
๏‚ง The world is observable
๏‚ง The actions are deterministic

 But many of these assumptions can be
 removed, and search still remains an
 important problem-solving tool

                                        68
Vacuum Cleaner Problem
๏‚ง A vacuum robot lives in a two-room environment


๏‚ง States: The robot is in one of the two rooms,
    and each room may or may not contain dirt
    ๏ƒ  8 states
๏‚ง   Successor function: the successors of a state
    correspond to trying 3 actions: Right, Left,
    Suck.
๏‚ง   Initial state: Unknown (not observable)
๏‚ง   Goal state: No dust in the rooms
                                               69
Re-Formulation with โ€œBelief Statesโ€
๏‚ง Belief states: sets of states ๏ƒ  28 =256
  belief states
๏‚ง Initial belief state: set of 8 states
๏‚ง Successor function: the successors of a
  belief state correspond to trying Right,
  Left, Suck on all states in the belief
  state.
๏‚ง Goal belief state: any set of states with
  none having dust in any of the rooms
                                         70
Left   Suck   Right




                      71
Search and AI
๏‚ง Search methods are ubiquitous in AI systems.
    They often are the backbones of both core
    and peripheral modules
๏‚ง   An autonomous robot uses search methods:
    โ€ข to decide which actions to take and which sensing
      operations to perform,
    โ€ข to quickly anticipate and prevent collision,
    โ€ข to plan trajectories,
    โ€ข to interpret large numerical datasets provided by
      sensors into compact symbolic representations,
    โ€ข to diagnose why something did not happen as
      expected,
    โ€ข etc...
                                                        72
                                                        72
Applications
Search plays a key role in many applications, e.g.:

๏‚ง   Route finding: airline travel, networks
๏‚ง   Package/mail distribution
๏‚ง   Pipe routing
๏‚ง   Comparison and classification of protein folds
๏‚ง   Pharmaceutical drug design
๏‚ง   Design of protein-like molecules
๏‚ง   Video games

                                                 73

More Related Content

What's hot

Chapter 15
Chapter 15Chapter 15
Chapter 15ramiz100111
ย 
10.1
10.110.1
10.1nglaze10
ย 
Nov. 17 Rational Inequalities
Nov. 17 Rational InequalitiesNov. 17 Rational Inequalities
Nov. 17 Rational InequalitiesRyanWatt
ย 
09 sistema de equaรงรฃo do primeiro grau
09 sistema de equaรงรฃo do primeiro grau09 sistema de equaรงรฃo do primeiro grau
09 sistema de equaรงรฃo do primeiro grauWollker Colares
ย 
Solving Trinomial Equations with Negatives X Coefficient
Solving Trinomial Equations with Negatives X CoefficientSolving Trinomial Equations with Negatives X Coefficient
Solving Trinomial Equations with Negatives X Coefficientjames.northrup
ย 
Day 8 - Rational Inequalities
Day 8 - Rational InequalitiesDay 8 - Rational Inequalities
Day 8 - Rational InequalitiesKate Nowak
ย 
Multiplying & dividing rational expressions
Multiplying & dividing rational expressionsMultiplying & dividing rational expressions
Multiplying & dividing rational expressionsDaisyListening
ย 
Day 8 dividing polynomials by monomials
Day 8 dividing polynomials by monomialsDay 8 dividing polynomials by monomials
Day 8 dividing polynomials by monomialsErik Tjersland
ย 
Lesson29 Intro To Difference Equations Slides
Lesson29   Intro To Difference Equations SlidesLesson29   Intro To Difference Equations Slides
Lesson29 Intro To Difference Equations SlidesMatthew Leingang
ย 
Chapter 01
Chapter 01Chapter 01
Chapter 01ramiz100111
ย 
Jejemon
JejemonJejemon
JejemonRj Laserna
ย 
Formulas de taylor
Formulas de taylorFormulas de taylor
Formulas de taylorERICK CONDE
ย 
Picture arithmetic cryptosystem module explanation
Picture arithmetic cryptosystem module explanationPicture arithmetic cryptosystem module explanation
Picture arithmetic cryptosystem module explanationhari krishnan.n
ย 
Solving Trinomial Equations
Solving Trinomial EquationsSolving Trinomial Equations
Solving Trinomial Equationsjames.northrup
ย 
STUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex numberSTUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex numberAPEX INSTITUTE
ย 
8-5 Adding and Subtracting Rational Expressions
8-5 Adding and Subtracting Rational Expressions8-5 Adding and Subtracting Rational Expressions
8-5 Adding and Subtracting Rational Expressionsrfrettig
ย 
Lesson 15: The Chain Rule
Lesson 15: The Chain RuleLesson 15: The Chain Rule
Lesson 15: The Chain RuleMatthew Leingang
ย 

What's hot (20)

Chapter 15
Chapter 15Chapter 15
Chapter 15
ย 
10.1
10.110.1
10.1
ย 
Nov. 17 Rational Inequalities
Nov. 17 Rational InequalitiesNov. 17 Rational Inequalities
Nov. 17 Rational Inequalities
ย 
Stepenovanje
StepenovanjeStepenovanje
Stepenovanje
ย 
09 sistema de equaรงรฃo do primeiro grau
09 sistema de equaรงรฃo do primeiro grau09 sistema de equaรงรฃo do primeiro grau
09 sistema de equaรงรฃo do primeiro grau
ย 
Solving Trinomial Equations with Negatives X Coefficient
Solving Trinomial Equations with Negatives X CoefficientSolving Trinomial Equations with Negatives X Coefficient
Solving Trinomial Equations with Negatives X Coefficient
ย 
Day 8 - Rational Inequalities
Day 8 - Rational InequalitiesDay 8 - Rational Inequalities
Day 8 - Rational Inequalities
ย 
Multiplying & dividing rational expressions
Multiplying & dividing rational expressionsMultiplying & dividing rational expressions
Multiplying & dividing rational expressions
ย 
Day 8 dividing polynomials by monomials
Day 8 dividing polynomials by monomialsDay 8 dividing polynomials by monomials
Day 8 dividing polynomials by monomials
ย 
Lesson29 Intro To Difference Equations Slides
Lesson29   Intro To Difference Equations SlidesLesson29   Intro To Difference Equations Slides
Lesson29 Intro To Difference Equations Slides
ย 
Chapter 01
Chapter 01Chapter 01
Chapter 01
ย 
Jejemon
JejemonJejemon
Jejemon
ย 
Formulas de taylor
Formulas de taylorFormulas de taylor
Formulas de taylor
ย 
Picture arithmetic cryptosystem module explanation
Picture arithmetic cryptosystem module explanationPicture arithmetic cryptosystem module explanation
Picture arithmetic cryptosystem module explanation
ย 
Solving Trinomial Equations
Solving Trinomial EquationsSolving Trinomial Equations
Solving Trinomial Equations
ย 
STUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex numberSTUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex number
ย 
Dev
DevDev
Dev
ย 
8-5 Adding and Subtracting Rational Expressions
8-5 Adding and Subtracting Rational Expressions8-5 Adding and Subtracting Rational Expressions
8-5 Adding and Subtracting Rational Expressions
ย 
Algebra Lineal. Tarea1
Algebra Lineal. Tarea1Algebra Lineal. Tarea1
Algebra Lineal. Tarea1
ย 
Lesson 15: The Chain Rule
Lesson 15: The Chain RuleLesson 15: The Chain Rule
Lesson 15: The Chain Rule
ย 

Viewers also liked

Cse 402 offline b2
Cse 402 offline b2Cse 402 offline b2
Cse 402 offline b2sujoyhnkc
ย 
Applications of Artificial Intelligence
Applications of Artificial IntelligenceApplications of Artificial Intelligence
Applications of Artificial IntelligenceMehr Un Nisa Manjotho
ย 
Artificial intelligence and its application
Artificial intelligence and its applicationArtificial intelligence and its application
Artificial intelligence and its applicationMohammed Abdel Razek
ย 
01 knapsack using backtracking
01 knapsack using backtracking01 knapsack using backtracking
01 knapsack using backtrackingmandlapure
ย 
Discrete Mathematics Presentation
Discrete Mathematics PresentationDiscrete Mathematics Presentation
Discrete Mathematics PresentationSalman Elahi
ย 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of adaSahil Kumar
ย 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
ย 

Viewers also liked (8)

Cse 402 offline b2
Cse 402 offline b2Cse 402 offline b2
Cse 402 offline b2
ย 
Applications of Artificial Intelligence
Applications of Artificial IntelligenceApplications of Artificial Intelligence
Applications of Artificial Intelligence
ย 
Artificial intelligence and its application
Artificial intelligence and its applicationArtificial intelligence and its application
Artificial intelligence and its application
ย 
01 knapsack using backtracking
01 knapsack using backtracking01 knapsack using backtracking
01 knapsack using backtracking
ย 
Discrete Mathematics Presentation
Discrete Mathematics PresentationDiscrete Mathematics Presentation
Discrete Mathematics Presentation
ย 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of ada
ย 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
ย 
Backtracking
BacktrackingBacktracking
Backtracking
ย 

Similar to 02 search problems

AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekpavan402055
ย 
Stochastic Process Exam Help
Stochastic Process Exam HelpStochastic Process Exam Help
Stochastic Process Exam HelpStatistics Exam Help
ย 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsMenglinLiu1
ย 
GATE Mathematics Paper-2000
GATE Mathematics Paper-2000GATE Mathematics Paper-2000
GATE Mathematics Paper-2000Dips Academy
ย 
Review for final exam
Review for final examReview for final exam
Review for final examMatthew Leingang
ย 
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...CrackVerbal
ย 
Battleship a
Battleship aBattleship a
Battleship ambetzel
ย 
Review for interim ii accelerated
Review for interim ii acceleratedReview for interim ii accelerated
Review for interim ii acceleratedMs. Jones
ย 
Monopole zurich
Monopole zurichMonopole zurich
Monopole zurichTapio Salminen
ย 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptxThanga Ramya S
ย 
Ch 01
Ch 01Ch 01
Ch 01Julia Li
ย 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework HelpExcel Homework Help
ย 
Msa blast 4-5
Msa blast 4-5Msa blast 4-5
Msa blast 4-5msfochler
ย 
[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdfEleanor McHugh
ย 
Chapter 3 โ€“ review packet solutions
Chapter 3 โ€“ review packet solutionsChapter 3 โ€“ review packet solutions
Chapter 3 โ€“ review packet solutionsRass Dunn
ย 
Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motionJa-Keoung Koo
ย 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxjacksnathalie
ย 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theoremNarayana Galla
ย 

Similar to 02 search problems (20)

Stochastic Process Assignment Help
Stochastic Process Assignment HelpStochastic Process Assignment Help
Stochastic Process Assignment Help
ย 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
ย 
Mathematicalgames
MathematicalgamesMathematicalgames
Mathematicalgames
ย 
Stochastic Process Exam Help
Stochastic Process Exam HelpStochastic Process Exam Help
Stochastic Process Exam Help
ย 
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus ProblemsRecurrent problems: TOH, Pizza Cutting and Josephus Problems
Recurrent problems: TOH, Pizza Cutting and Josephus Problems
ย 
GATE Mathematics Paper-2000
GATE Mathematics Paper-2000GATE Mathematics Paper-2000
GATE Mathematics Paper-2000
ย 
Review for final exam
Review for final examReview for final exam
Review for final exam
ย 
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...
GMAT Quant Strategy- What to expect in Quantitative Reasoning Section on the ...
ย 
Battleship a
Battleship aBattleship a
Battleship a
ย 
Review for interim ii accelerated
Review for interim ii acceleratedReview for interim ii accelerated
Review for interim ii accelerated
ย 
Monopole zurich
Monopole zurichMonopole zurich
Monopole zurich
ย 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptx
ย 
Ch 01
Ch 01Ch 01
Ch 01
ย 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework Help
ย 
Msa blast 4-5
Msa blast 4-5Msa blast 4-5
Msa blast 4-5
ย 
[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
ย 
Chapter 3 โ€“ review packet solutions
Chapter 3 โ€“ review packet solutionsChapter 3 โ€“ review packet solutions
Chapter 3 โ€“ review packet solutions
ย 
Journey to structure from motion
Journey to structure from motionJourney to structure from motion
Journey to structure from motion
ย 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
ย 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
ย 

Recently uploaded

Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls AgencyNitya salvi
ย 
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRL
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRLBhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRL
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRLNitya salvi
ย 
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...ritikasharma
ย 
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)amitlee9823
ย 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
ย 
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...ritikasharma
ย 
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableCall Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableNitya salvi
ย 
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...ritikasharma
ย 
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...ritikasharma
ย 
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...ritikasharma
ย 
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย Service
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย ServiceBorum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย Service
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย ServiceDamini Dixit
ย 
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...ritikasharma
ย 
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With... Shivani Pandey
ย 
2k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 92055419142k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 9205541914Delhi Call girls
ย 
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
ย 
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call GirlsNitya salvi
ย 
CHEAP Call Girls in Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448ont65320
ย 
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034 Independe... Shivani Pandey
ย 
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
ย 

Recently uploaded (20)

Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire ๐Ÿ’• 8617697112 North Sikkim Call Girls Service Call Girls Agency
ย 
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRL
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRLBhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRL
Bhimtal โคCALL GIRL 8617697112 โคCALL GIRLS IN Bhimtal ESCORT SERVICEโคCALL GIRL
ย 
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...
Hotel And Home Service Available Kolkata Call Girls Park Street โœ” 6297143586 ...
ย 
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)
Call Girls Bellandur โ˜Ž 7737669865โ˜Ž Book Your One night Stand (Bangalore)
ย 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...
Hotel And Home Service Available Kolkata Call Girls Dum Dum โœ” 6297143586 โœ”Cal...
ย 
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service AvailableCall Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
Call Girls Bhandara Just Call 8617697112 Top Class Call Girl Service Available
ย 
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...
Hotel And Home Service Available Kolkata Call Girls Lake Town โœ” 6297143586 โœ”C...
ย 
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata โœ” 6297143586 โœ” Hot Model With Sexy Bhabi ...
ย 
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park โœ” 62971435...
ย 
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย Service
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย ServiceBorum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย Service
Borum Call Girls Service โ˜Ž ๏ธ93326-06886 โค๏ธโ€๐Ÿ”ฅ Enjoy 24/7 Escortย Service
ย 
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex S...
ย 
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
(TOP CLASS) Call Girls In Nungambakkam Phone 7427069034 Call Girls Model With...
ย 
2k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 92055419142k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 9205541914
ย 
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
๐“€คCall On 6297143586 ๐“€ค Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
ย 
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls
๐Ÿ“ž Contact Number 8617697112 VIP East Sikkim Call Girls
ย 
CHEAP Call Girls in Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448
Beautiful ๐Ÿ˜‹ Call girls in Lahore 03210033448
ย 
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai โœ”โœ”7427069034 Independe...
ย 
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Koregaon Park ( Pune ) Call ON 8005736733 Starting From ...
ย 

02 search problems

  • 1. Search Problems Explorating Alternatives R&N: Chap. 3, Sect. 3.1โ€“2 + 3.6 1
  • 2. Example: 8-Puzzle 8 2 1 2 3 3 4 7 4 5 6 5 1 6 7 8 Initial state Goal state Search is about the exploration of alternatives 2
  • 3. Exploratory search is an old idea: The Labyrinth and the Ariadne Thread According to Greek mythology, Theseus came to Crete to slay the Minotaur, a monster who lived in a Labyrinth. Ariadne gave Theseus a ball of yarn which he unwound as he entered the Labyrinth. After killing the Minotaur, Theseus traced the thread back to the entrance of the Labyrinth, rejoined Ariadne, and successfully escaped Crete 3
  • 4. Since the dawn of civilization, puzzles and games that require the exploration of alternative paths have fascinated mankind and have been considered a challenge for human intelligence ๏‚ง Chess originated in Persia and India about 4000 years ago ๏‚ง Checkers appeared as early as 1600 B.C in Egyptian paintings ๏‚ง Go originated in China over 3000 years ago 4
  • 5. 5
  • 6. 15-Puzzle Introduced in 1878 by Sam Loyd, who dubbed himself โ€œAmericaโ€™s greatest puzzle-expertโ€ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6
  • 7. 7
  • 8. 15-Puzzle Sam Loyd offered $1,000 of his own money to the first person who would solve the following problem: 1 2 3 4 1 2 3 4 5 6 7 8 ? 5 6 7 8 9 10 11 12 9 10 11 12 13 14 15 13 15 14 8
  • 9. But no one ever won the prize !! 9
  • 10. 8-Puzzle: State Space ... 8 2 7 3 4 8 2 5 1 6 3 4 7 5 1 6 8 2 8 2 3 4 7 3 4 7 5 1 6 5 1 6 10
  • 11. 8-Puzzle: Successor Function 8 2 7 3 4 5 1 6 8 2 8 2 7 8 2 7 3 4 7 3 4 6 3 4 5 1 6 5 1 5 1 6 11
  • 12. Stating a Problem as a Search Problem S ๏‚ง State space S 1 ๏‚ง Successor function: 3 2 x โˆˆ S โ†’ SUCCESSORS(x) โˆˆ 2S ๏‚ง Arc cost ๏‚ง Initial state s0 ๏‚ง Goal test: xโˆˆS โ†’ GOAL?(x) =T or F 12
  • 13. State Graph ๏‚ง It is defined as follows: โ€ข Each state is represented by a distinct node โ€ข An arc connects a node s to a node sโ€™ if sโ€™ โˆˆ SUCCESSORS(s) ๏‚ง The state graph may contain more than one connected component 13
  • 14. 14
  • 15. Solution to the Search Problem ๏‚ง A solution is a path connecting the initial node to a goal node (any one) 15
  • 16. 16
  • 17. Solution to the Search Problem ๏‚ง A solution is a path connecting the initial to a goal node (any one) ๏‚ง The cost of a path is the sum of the edge costs along this path ๏‚ง An optimal solution is a solution path of minimum cost ๏‚ง There might be no solution ! 17
  • 18. 18
  • 19. How big is the state space of the (n2-1)-puzzle? ๏‚ง 8-puzzle ๏ƒ  9! = 362,880 states ๏‚ง 15-puzzle ๏ƒ  16! ~ 1.3 x 1012 states ๏‚ง 24-puzzle ๏ƒ  25! ~ 1025 states But only half of these states are reachable from any given state 19
  • 20. Permutation Inversions ๏‚ง Let the goal be: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ๏‚ง Let ni be the number of tiles j < i that appear after tile i (from left to right and top to bottom) ๏‚ง N = n2 + n3 + โ€ฆ + n15 + row number of empty tile 1 2 3 4 n2 = 0 n3 = 0 n4 = 0 5 10 7 8 n5 = 0 n6 = 0 n7 = 1 n8 = 1 n9 = 1 n10 = 4 ๏ƒ N=7+4 9 6 11 12 n11 = 0 n12 = 0 n13 = 0 13 14 15 n14 = 0 n15 = 0 20
  • 21. ๏‚ง Proposition: (N mod 2) is invariant under any legal move of the empty tile ๏‚ง Proof: โ€ข Any horizontal move of the empty tile leaves N unchanged โ€ข A vertical move of the empty tile changes N by an even increment 1 2 3 4 1 2 3 4 5 6 7 5 6 11 7 s= sโ€™ = N(sโ€™) = N(s) + 3 + 1 9 10 11 8 9 10 8 13 14 15 12 13 14 15 12 21
  • 22. ๏‚ง Proposition: (N mod 2) is invariant under any legal move of the empty tile ๏‚ง ๏ƒ  For a goal state g to be reachable from a state s, a necessary condition is that N(g) and N(s) have the same parity ๏‚ง It can be shown that this is also a sufficient condition ๏‚ง ๏ƒ  The state graph consists of two connected components of equal size 22
  • 23. 15-Puzzle Sam Loyd offered $1,000 of his own money to the first person who would solve the following problem: 1 2 3 4 1 2 3 4 5 6 7 8 ? 5 6 7 8 9 10 11 12 9 10 11 12 13 14 15 13 15 14 N=4 N=5 So, the second state is not reachable from the first, and Sam Loyd took no risk with his money ... 23
  • 24. What is the Actual State Space? โ€ข The set of all states? [e.g., a set of 16! states for the 15-puzzle] โ€ข The set of all states from which a given goal state is reachable? [e.g., a set of 16!/2 states for the 15-puzzle] โ€ข The set of all states reachable from a given initial state? In general, the answer is a) 24
  • 25. What is the Actual State Space? โ€ข The set of all states? [e.g., a set of 16! states for the 15-puzzle] โ€ข The set of all states from which a given goal state is reachable? [e.g., a set of 16!/2 states for the 15-puzzle] โ€ข The set of all states reachable from a given initial state? In general, the answer is a) But a fast test determining whether a state is reachable from another is very useful, as search-based problem solvers are often very inefficient when a problem has no solution 25
  • 26. Stating a Problem as a Search Problem S ๏‚ง State space S 1 ๏‚ง Successor function: 3 2 x โˆˆ S โ†’ SUCCESSORS(x) โˆˆ 2S ๏‚ง Arc cost ๏‚ง Initial state s0 ๏‚ง Goal test: xโˆˆS โ†’ GOAL?(x) =T or F ๏‚ง A solution is a path joining the initial to a goal node 26
  • 27. Searching the State Space ๏‚ง Often it is not feasible to build a complete representation of the state graph 27
  • 28. 8-, 15-, 24-Puzzles 8-puzzle ๏ƒ  362,880 states 0.036 sec 15-puzzle ๏ƒ  1.3 x 1012 states < 4 hours 24-puzzle ๏ƒ  1025 states > 109 years 100 millions states/sec 28
  • 29. Searching the State Space ๏‚ง Often it is not feasible to build a complete representation of the state graph ๏‚ง A problem solver must construct a solution by exploring a small portion of the graph 29
  • 31. Searching the State Space Search tree 31
  • 32. Searching the State Space Search tree 32
  • 33. Searching the State Space Search tree 33
  • 34. Searching the State Space Search tree 34
  • 35. Searching the State Space Search tree 35
  • 36. Simple Problem-Solving-Agent Algorithm ๏ท s0 ๏ƒŸ sense/read initial state ๏ท GOAL? ๏ƒŸ select/read goal test ๏ท Succ ๏ƒŸ select/read successor function ๏ท solution ๏ƒŸ search(s0, GOAL?, Succ) ๏ท perform(solution) 36
  • 37. State Space ๏‚ง Each state is an abstract representation of a collection of possible worlds sharing some crucial properties and differing on non-important details only E.g.: In assembly planning, a state does not define exactly the absolute position of each part ๏‚ง The state space is discrete. It may be finite, or infinite 37
  • 38. Successor Function ๏‚ง It implicitly represents all the actions that are feasible in each state 38
  • 39. Successor Function ๏‚ง It implicitly represents all the actions that are feasible in each state ๏‚ง Only the results of the actions (the successor states) and their costs are returned by the function ๏‚ง The successor function is a โ€œblack boxโ€: its content is unknown E.g., in assembly planning, the function does not say if it only allows two sub-assemblies to be merged or if it makes assumptions about subassembly stability 39
  • 40. Path Cost ๏‚ง An arc cost is a positive number measuring the โ€œcostโ€ of performing the action corresponding to the arc, e.g.: โ€ข 1 in the 8-puzzle example โ€ข expected time to merge two sub-assemblies ๏‚ง We will assume that for any given problem the cost c of an arc always verifies: c โ‰ฅ ฮต > 0, where ฮต is a constant 40
  • 41. Path Cost ๏‚ง An arc cost is a positive number measuring the โ€œcostโ€ of performing the action corresponding to the arc, e.g.: โ€ข 1 in the 8-puzzle example โ€ข expected time to merge two sub-assemblies ๏‚ง We will assume that for any given problem the cost c of an arc always verifies: c โ‰ฅ ฮต > 0, where ฮต is a constant [This condition guarantees that, if path becomes arbitrarily long, its cost also becomes arbitrarily large] Why is this needed? 41
  • 42. Goal State 1 2 3 ๏‚ง It may be explicitly described: 4 5 6 7 8 1 a a ๏‚ง or partially described: a 5 a (โ€œaโ€ stands for โ€œanyโ€) a 8 a ๏‚ง or defined by a condition, e.g., the sum of every row, of every column, and of every diagonals equals 30 15 1 2 12 4 10 9 7 8 6 5 11 3 13 14 42
  • 44. 8-Queens Problem Place 8 queens in a chessboard so that no two queens are in the same row, column, or diagonal. A solution Not a solution 44
  • 45. Formulation #1 ๏‚ง States: all arrangements of 0, 1, 2, ..., or 8 queens on the board ๏‚ง Initial state: 0 queen on the board ๏‚ง Successor function: each of the successors is obtained by adding one queen in an empty square ๏‚ง Arc cost: irrelevant ๏‚ง Goal test: 8 queens are on the board, with no two of them attacking each other ๏ƒ  64x63x...x53 ~ 3x1014 states 45
  • 46. Formulation #2 ๏‚ง States: all arrangements of k = 0, 1, 2, ..., or 8 queens in the k leftmost columns with no two queens attacking each other ๏‚ง Initial state: 0 queen on the board ๏‚ง Successor function: each successor is obtained by adding one queen in any square that is not attacked by any queen already in the board, in the leftmost empty column ๏‚ง Arc cost: irrelevant ๏‚ง Goal test: 8 queens are on the ๏ƒ  2,057 states board 46
  • 47. n-Queens Problem ๏‚ง A solution is a goal node, not a path to this node (typical of design problem) ๏‚ง Number of states in state space: โ€ข 8-queens ๏ƒ  2,057 โ€ข 100-queens ๏ƒ  1052 ๏‚ง But techniques exist to solve n-queens problems efficiently for large values of n They exploit the fact that there are many solutions well distributed in the state space 47
  • 48. Path Planning What is the state space? 48
  • 49. Formulation #1 Cost of one horizontal/vertical step = 1 Cost of one diagonal step = โˆš2 49
  • 50. Optimal Solution This path is the shortest in the discretized state space, but not in the original continuous space 50
  • 53. States 53
  • 55. Solution Path A path-smoothing post-processing step is usually needed to shorten the path further 55
  • 56. Formulation #3 Cost of one step: length of segment 56
  • 57. Formulation #3 Visibility graph Cost of one step: length of segment 57
  • 58. Solution Path The shortest path in this state space is also the shortest in the original continuous space 58
  • 60. Possible Formulation ๏‚ง States: All decompositions of the assembly into subassemblies (subsets of parts in their relative placements in the assembly) ๏‚ง Initial state: All subassemblies are made of a single part ๏‚ง Goal state: Un-decomposed assembly ๏‚ง Successor function: Each successor of a state is obtained by merging two subassemblies (the successor function must check if the merging is feasible: collision, stability, grasping, ...) ๏‚ง Arc cost: 1 or time to carry the merging 60
  • 61. A Portion of State Space 61
  • 62. But the formulation rules out โ€œnon-monotonicโ€ assemblies 62
  • 63. But the formulation rules out โ€œnon-monotonicโ€ assemblies 63
  • 64. But the formulation rules out โ€œnon-monotonicโ€ assemblies 64
  • 65. But the formulation rules out โ€œnon-monotonicโ€ assemblies 65
  • 66. But the formulation rules out โ€œnon-monotonicโ€ assemblies 66
  • 67. But the formulation rules out โ€œnon-monotonicโ€ assemblies X This โ€œsubassemblyโ€ is not allowed in the definition of the state space: the 2 parts are not in their relative placements in the assembly Allowing any grouping of parts as a valid subassembly would make the state space much bigger and more difficult to search 67
  • 68. Assumptions in Basic Search ๏‚ง The world is static ๏‚ง The world is discretizable ๏‚ง The world is observable ๏‚ง The actions are deterministic But many of these assumptions can be removed, and search still remains an important problem-solving tool 68
  • 69. Vacuum Cleaner Problem ๏‚ง A vacuum robot lives in a two-room environment ๏‚ง States: The robot is in one of the two rooms, and each room may or may not contain dirt ๏ƒ  8 states ๏‚ง Successor function: the successors of a state correspond to trying 3 actions: Right, Left, Suck. ๏‚ง Initial state: Unknown (not observable) ๏‚ง Goal state: No dust in the rooms 69
  • 70. Re-Formulation with โ€œBelief Statesโ€ ๏‚ง Belief states: sets of states ๏ƒ  28 =256 belief states ๏‚ง Initial belief state: set of 8 states ๏‚ง Successor function: the successors of a belief state correspond to trying Right, Left, Suck on all states in the belief state. ๏‚ง Goal belief state: any set of states with none having dust in any of the rooms 70
  • 71. Left Suck Right 71
  • 72. Search and AI ๏‚ง Search methods are ubiquitous in AI systems. They often are the backbones of both core and peripheral modules ๏‚ง An autonomous robot uses search methods: โ€ข to decide which actions to take and which sensing operations to perform, โ€ข to quickly anticipate and prevent collision, โ€ข to plan trajectories, โ€ข to interpret large numerical datasets provided by sensors into compact symbolic representations, โ€ข to diagnose why something did not happen as expected, โ€ข etc... 72 72
  • 73. Applications Search plays a key role in many applications, e.g.: ๏‚ง Route finding: airline travel, networks ๏‚ง Package/mail distribution ๏‚ง Pipe routing ๏‚ง Comparison and classification of protein folds ๏‚ง Pharmaceutical drug design ๏‚ง Design of protein-like molecules ๏‚ง Video games 73