Search Behavior of Greedy Best-First Search Manuel Heusner May - - PowerPoint PPT Presentation

search behavior of greedy best first search
SMART_READER_LITE
LIVE PREVIEW

Search Behavior of Greedy Best-First Search Manuel Heusner May - - PowerPoint PPT Presentation

Search Behavior of Greedy Best-First Search Manuel Heusner May 10th, 2019 University of Basel State Spaces 1/27 State Space Search 1 3 1 3 2 1 3 1 2 2 3 2 1 1 3 3 3 3 1 1 1 3 3 1 2 2 1 3 3 1 2/27 State Space Search


slide-1
SLIDE 1

Search Behavior of Greedy Best-First Search

Manuel Heusner May 10th, 2019

University of Basel

slide-2
SLIDE 2

State Spaces

1/27

slide-3
SLIDE 3

State Space Search

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2

2/27

slide-4
SLIDE 4

State Space Search

input:

  • initial state

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2

2/27

slide-5
SLIDE 5

State Space Search

input:

  • initial state
  • goal test function

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2

2/27

slide-6
SLIDE 6

State Space Search

input:

  • initial state
  • goal test function
  • successor generator

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2 3 1 2

2/27

slide-7
SLIDE 7

State Space Search

input:

  • initial state
  • goal test function
  • successor generator
  • transition cost function

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2

2/27

slide-8
SLIDE 8

State Space Search

input:

  • initial state
  • goal test function
  • successor generator
  • transition cost function
  • utput:
  • solution path

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2 3 1 2 2

2/27

slide-9
SLIDE 9

State Space Search

input:

  • initial state
  • goal test function
  • successor generator
  • transition cost function
  • utput:
  • solution path

additional information:

  • heuristic

heuristic best-first search

1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 1 3 1 3 3 1 3 1 2 2 2 2 2 2

2/27

slide-10
SLIDE 10

Motivation

information of A∗

  • c∗: optimal solution path cost
  • f (s): estimate of optimal solution path cost

3/27

slide-11
SLIDE 11

Motivation

information of A∗

  • c∗: optimal solution path cost
  • f (s): estimate of optimal solution path cost

behavior of A*:

  • necessary: f (s) < c∗
  • never: f (s) > c∗
  • potential: f (s) = c∗
  • worst case: necessary & potential
  • best case: necessary & shortest path of potential states
  • progress: increase of f -value

3/27

slide-12
SLIDE 12

Motivation

information of A∗

  • c∗: optimal solution path cost
  • f (s): estimate of optimal solution path cost

behavior of A*:

  • necessary: f (s) < c∗
  • never: f (s) > c∗
  • potential: f (s) = c∗
  • worst case: necessary & potential
  • best case: necessary & shortest path of potential states
  • progress: increase of f -value

Can we get similar results for greedy best-first search?

3/27

slide-13
SLIDE 13

Guiding Questions

Given a state space and a heuristic:

  • When does GBFS make search progress?
  • Which states does GBFS potentially, never or necessarily

expand?

  • Which are the best-case and worst-case search runs of GBFS?

4/27

slide-14
SLIDE 14

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-15
SLIDE 15

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-16
SLIDE 16

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-17
SLIDE 17

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-18
SLIDE 18

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-19
SLIDE 19

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-20
SLIDE 20

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-21
SLIDE 21

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-22
SLIDE 22

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-23
SLIDE 23

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-24
SLIDE 24

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-25
SLIDE 25

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-26
SLIDE 26

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-27
SLIDE 27

Greedy Best-First Search

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5/27

slide-28
SLIDE 28

When does GBFS make search progress?

6/27

slide-29
SLIDE 29

High-Water Mark of State [Wilt & Ruml,2014]

7/27

slide-30
SLIDE 30

High-Water Mark of State [Wilt & Ruml,2014]

The highest h-value that GBFS reaches during a search run starting in a state.

7/27

slide-31
SLIDE 31

High-Water Mark of State [Wilt & Ruml,2014]

The highest h-value that GBFS reaches during a search run starting in a state.

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 7/27

slide-32
SLIDE 32

High-Water Mark of State [Wilt & Ruml,2014]

The highest h-value that GBFS reaches during a search run starting in a state.

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

hwm(s) :=    minρ∈P(s)(maxs∈ρ h(s)) if P(s) = ∅ ∞

  • therwise

7/27

slide-33
SLIDE 33

High-Water Mark Pruning [Wilt & Ruml,2014]

GBFS never expands a state s with h(s) > hwm(sinit).

8/27

slide-34
SLIDE 34

High-Water Mark Pruning [Wilt & Ruml,2014]

GBFS never expands a state s with h(s) > hwm(sinit).

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 8/27

slide-35
SLIDE 35

Search Progress

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-36
SLIDE 36

Search Progress

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-37
SLIDE 37

Search Progress

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-38
SLIDE 38

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s)) 6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-39
SLIDE 39

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s)) 6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-40
SLIDE 40

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s)) 6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-41
SLIDE 41

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s))

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-42
SLIDE 42

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s)) episodes of local searches!

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-43
SLIDE 43

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s)) episodes of local searches!

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-44
SLIDE 44

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s)) episodes of local searches!

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-45
SLIDE 45

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s)) episodes of local searches!

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-46
SLIDE 46

Search Progress

high-water mark of set of states: hwm(S) := min

s∈S (hwm(s))

progress state: hwm(s) > hwm(succ(s)) episodes of local searches! Search Progress GBFS makes progress when expanding a progress state.

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 9/27

slide-47
SLIDE 47

Which states does GBFS potentially or never expand?

10/27

slide-48
SLIDE 48

Progress States

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 11/27

slide-49
SLIDE 49

Benches

  • progress state s induces

bench B(s)

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 12/27

slide-50
SLIDE 50

Benches

  • progress state s induces

bench B(s)

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 12/27

slide-51
SLIDE 51

Bench Space

  • connects the benches via

progress states

4 3 2 1 −∞ B(B) B(C) B(D) B(G) B(K) B(N) B(U) B(Z) 13/27

slide-52
SLIDE 52

Potentially or Never Expanded States

Potentially and Never Expanded States GBFS potentially expands a state that is on at least one bench from the bench space. GBFS never expands all other states.

6 5 4 3 2 1 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 14/27

slide-53
SLIDE 53

Which states does GBFS necessarily expand?

15/27

slide-54
SLIDE 54

Crater and Surface States

  • crater state: h(s) < hwm of

bench

  • surface states: all other

states on the bench

G K L M P Q R V W X 16/27

slide-55
SLIDE 55

Craters

  • surface state s induces

crater C(s)

G K L M P Q R V W X G K L M P Q R V W X 17/27

slide-56
SLIDE 56

Craters

  • surface state s induces

crater C(s)

G K L M P Q R V W X G K L M P Q R V W X 17/27

slide-57
SLIDE 57

Craters

  • surface state s induces

crater C(s) Necessarily Expanded States If GBFS expands a surface state s on a bench, then it necessarily expands all the crater states from crater C(s).

G K L M P Q R V W X G K L M P Q R V W X 17/27

slide-58
SLIDE 58

Which is a best-case search run of GBFS?

18/27

slide-59
SLIDE 59

Crater Space

  • connects craters of a bench

via surface states

C(G) C(K) C(L) C(M) 19/27

slide-60
SLIDE 60

Best-Case Search Run

Best-Case Search Run

  • path in crater space
  • minimize length of path and

number of crater states

C(B) C(C) C(D) C(E) C(G) C(J) C(K) C(L) C(M) C(N) C(O) C(S) C(T) C(U) C(Z) 20/27

slide-61
SLIDE 61

Best-Case Search Run

Best-Case Search Run

  • path in crater space
  • minimize length of path and

number of crater states

C(B) C(C) C(D) C(E) C(G) C(J) C(K) C(L) C(M) C(N) C(O) C(S) C(T) C(U) C(Z)

D E G V K L M P Q V W

20/27

slide-62
SLIDE 62

Best-Case Search Run

Best-Case Search Run

  • path in crater space
  • minimize length of path and

number of crater states Complexity Results Given a state space and heuristic:

  • NP-complete
  • polynomial-time if
  • verlap-free or undirected

C(B) C(C) C(D) C(E) C(G) C(J) C(K) C(L) C(M) C(N) C(O) C(S) C(T) C(U) C(Z)

D E G V K L M P Q V W

20/27

slide-63
SLIDE 63

Which is a worst-case search run of GBFS?

21/27

slide-64
SLIDE 64

Worst-Case Search Run

Worst-Case Search Run

  • path in bench space
  • maximize length of path

and number of non-progress states

4 3 2 1 −∞ B(B) B(C) B(D) B(G) B(K) B(N) B(U) B(Z) 22/27

slide-65
SLIDE 65

Worst-Case Search Run

Worst-Case Search Run

  • path in bench space
  • maximize length of path

and number of non-progress states

4 3 2 1 −∞ B(B) B(C) B(D) B(G) B(K) B(N) B(U) B(Z)

B C D E G V G K L M P Q R V W X

22/27

slide-66
SLIDE 66

Worst-Case Search Run

Worst-Case Search Run

  • path in bench space
  • maximize length of path

and number of non-progress states Complexity Results Given a state space and heuristic:

  • NP-complete
  • polynomial-time if
  • verlap-free or undirected

4 3 2 1 −∞ B(B) B(C) B(D) B(G) B(K) B(N) B(U) B(Z)

B C D E G V G K L M P Q R V W X

22/27

slide-67
SLIDE 67

Experiments

  • implemented algorithms for extracting the search behavior
  • state spaces: classical planning tasks from international

planning competitions

  • heuristic: hff

23/27

slide-68
SLIDE 68

Feasibility: Potential State Space

all instances (3903) instances solved by GBFS (2936) potential state spaces (1320)

24/27

slide-69
SLIDE 69

Feasibility: Best-Case and Worst-Case Search Runs best case

potential state spaces (1320) poly-time (785 of 786) NP-complete (396 of 460)

worst case

potential state spaces (1320) poly-time (803 of 814) NP- complete (399 of 436)

25/27

slide-70
SLIDE 70

Tie-Breaking Policies

100 101 102 103 104 105 200 400

expansions covered instances without crater states

best rand lifo fifo worst 101 102 103 104 105 106 200 400

expansions with crater states

best fifo lifo rand worst

26/27

slide-71
SLIDE 71

Conclusion

  • search progress based on high-water mark
  • criterion for expanded states based on benches and craters
  • characterization of best-case and worst-case search runs based
  • n bench space and crate space
  • demonstrated potential for improvement of tie-breaking

27/27