Summary of algorithms - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Summary of algorithms

Description:

Summary of algorithms. Properties of Iterative Deepening Search. While it SOUNDS like a huge waste of time to continually reconsider the upper ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 15
Provided by: systema178
Category:

less

Transcript and Presenter's Notes

Title: Summary of algorithms


1
Summary of algorithms
2
Properties of Iterative Deepening Search
  • While it SOUNDS like a huge waste of time to
    continually reconsider the upper part of the
    tree, the amount of duplication is actually
    offset by the fact you dont expand and enter
    into the queue/fringe the nodes at level d1 (as
    you do with breadth first)

3
Properties of Iterative Deepening Search
  • Numerical comparison for b10 and d5, solution
    at far right
  • N(BFS) 10 100 1,000 10,000 100,000
    999,990 1,111,100
  • N(IDS) 50 400 3,000 20,000 100,000
    123,450

4
Repeated States
  • A failure to detect repeated states can turn a
    linear problem into an exponential one!

5
Bi-directional search
  • Run two simultaneous breadth first searches that
    meet in the middle.
  • If a node to be expanded is in the other searchs
    fringe, then a solution has been found.
  • bd/2 bd/2 lt bd

6
Bi-directional search
  • Complete? Yes
  • Time? O(bd/2 )
  • Space? O(bd/2 )
  • Optimal? Yes, if costs are identical

7
Consider it again
  • Consider a state space where the start state is
    number 1 and the successor function for state n
    returns two states, numbers 2n and 2n1.
  • Would bidirectional search be appropriate for
    this problem?
  • What is the branching factor in each direction?
  • What about depth?
  • Do you see how to reformulate the problem so that
    there is (basically) no search needed?

8
Homework 2
  • Solve the Jewel Problem
  • 9 jewels in a 3x3 grid.
  • Three jewel types (D/R/E)
  • Casting a spell at a jewel rotates it one type.
  • Casting a spell also changes the jewels
    immediately adjacent.
  • Goal is to get the whole grid to same jewel type

9
Homework 2
  • D D R E E E
  • D D D ? E E E
  • D D D E E E
  • Several optimal solutions
  • 18394, 38941, 14893, 39481 and 13489

10
Homework 2
  • Which search strategies are going to work well?
  • Which are not?

11
Hill Climbing
  • An informed, irrevocable search method.
  • Easiest to understand when considered as a method
    for finding the highest point in a three
    dimensional search space
  • Check the height one foot away from your current
    location in each direction North, South, East
    and West.
  • As soon as you find a position whose height is
    higher than your current position, move to that
    location, and restart the algorithm.

12
Foothills
  • Cause difficulties for hill-climbing methods.
  • A foothill is a local maximum.

13
Plateaus
  • Cause difficulties for hill-climbing methods.
  • Flat areas that make it hard to find where to go
    next.

14
Ridges
  • Cause difficulties for hill-climbing methods
  • B is higher than A.
  • At C, the hill-climber cant find a higher
    point North, South, East or West, so it stops.
Write a Comment
User Comments (0)
About PowerShow.com