BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented...

42
BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross

Transcript of BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented...

Page 1: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

BEAM-STACK SEARCH:INTEGRATING BACKTRACKING WITH BEAM SEARCH

Ring Zhou and Eric A. Hansen

Presented by Paul Gross

Page 2: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-Stack Search Overview Complete, anytime algorithm O(dw) Memory Complexity

d = depth of optimal solution, w = beam width Uses novel beam stack structure

Stores most promising, unexpanded nodes at each level

Bounds, admissibly prunes sub-optimal nodes Outperforms

Breadth-first Branch and Bound (BFBnB) Divide and Conquer Solution Reconstruction implementation

Depth-first Iterative Deepening A* (DFIDA*) Iterative-Deepening A* heuristic implementation

Page 3: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam Search Algorithm

Breadth-first approach Bound level fringe size

Size is beam width (w) Branches most w

promising nodes at each level

Width bound reduces complexity Time, Memory: O(wd)

Incomplete due to inadmissible pruning rule

w = 2

...

Goal State

Page 4: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Making Beam Search Complete Beam-Stack search

Builds off Breadth-first Beam Search Prune layers by beam width Each layer expands at most w nodes

Expand layers by f(n) bounds f(n) = g(n) + h(n) as in A*, where h(n) admissible

Beam Stack stores f(n) ranges for each layer Successor layer nodes have f(n) value in range

Backtracking pruned nodes by shifting f(n) ranges Provides completeness

Page 5: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

Level Open Closed

Current Node

Beam Width (w)

Upper f(n) Bound

S

Current Level

Best Goal

A B C

2 2 3

4 65 2 62 4

D E F G H I J

1

0 1 1 2 2 0 2

2 2

g(n) = Vh(n) =

V

3

Page 6: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

[ 0 , 10 )

Level Open Closed

Current Node

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level

Best Goal

g(n) = Vh(n) =

V

Page 7: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

g(n) = Vh(n) =

V

Page 8: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

g(n) = Vh(n) =

V

Page 9: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

f(A) = g(A) + h(A) = 2 + 1 = 3

Page 10: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1 A

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

f(A) = g(A) + h(A) = 2 + 1 = 3

Page 11: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1 A

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2

Page 12: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1 AB

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2

Page 13: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1 AB

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

Page 14: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 10

Level Open Closed

0 S

1 ABC

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

layerSize(1) = 3> w

f(A), f(B) < f(C), prune C Adjust beam stack to

backtrack to C

Page 15: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

Level Open Closed

0 S

1 AB

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 0

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

layerSize(1) = 3> w

f(A), f(B) < f(C), prune C Adjust beam stack to

backtrack to C

Page 16: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 10

Level Open Closed

0 S

1 B A

2

Current Node

A

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

Page 17: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 10

Level Open Closed

0 S

1 B A

2 D

Current Node

A

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

Page 18: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 10

Level Open Closed

0 S

1 B A

2 DE

Current Node

A

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

Page 19: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 10

Level Open Closed

0 S

1 B A

2 DEF

Current Node

A

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

layerSize(2) = 3> w

Page 20: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 9

Level Open Closed

0 S

1 B A

2 DE

Current Node

A

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

Page 21: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 9

Level Open Closed

0 S

1 AB

2 DE

Current Node

B

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

Page 22: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 9

Level Open Closed

0 S

1 AB

2 DE

Current Node

B

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

Page 23: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 9

Level Open Closed

0 S

1 AB

2 DEG

Current Node

B

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

f(G) < f(E)

Page 24: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 DG

Current Node

B

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

Page 25: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 DG

Current Node

B

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 1

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

Page 26: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 G D

Current Node

D

Beam Width (w)

2

Upper f(n) Bound

10S

Current Level 2

Best Goal

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

Page 27: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 G D

Current Node

D

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 2

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

Page 28: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 DG

Current Node

G

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 2

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

3

Page 29: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

0 S

1 AB

2 DG

Current Node

G

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 2

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

3

Page 30: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

0 8

Level Open Closed

Current Node

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

3

Page 31: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

0 5

Level Open Closed

Current Node

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

3

Page 32: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 6

Level Open Closed

Current Node

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level

Best Goal D

A

2

1

g(n) = Vh(n) =

V

B

2

2 C

3

2

4

D0

5

E1

6

F1

2

G2

4

H2

3

Page 33: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 6

Level Open Closed

0 S

1

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 0

Best Goal D

g(n) = Vh(n) =

V

Page 34: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 6

Level Open Closed

0 S

1

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 0

Best Goal D

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

Page 35: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 6

Level Open Closed

0 S

1 C

Current Node

S

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 0

Best Goal D

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

Page 36: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

0 6

Level Open Closed

0 S

1 C

2

Current Node

C

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 1

Best Goal D

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

Page 37: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

0 6

Level Open Closed

0 S

1 C

2 I

Current Node

C

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 1

Best Goal D

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

Page 38: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

0 6

Level Open Closed

0 S

1 C

2 I

Current Node

I

Beam Width (w)

2

Upper f(n) Bound

6S

Current Level 2

Best Goal D

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

Page 39: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

0 6

Level Open Closed

0 S

1 C

2 I

Current Node

I

Beam Width (w)

2

Upper f(n) Bound

5S

Current Level 2

Best Goal I

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

Page 40: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

0 6

Level Open Closed

0 S

1 C

2 I

Current Node

I

Beam Width (w)

2

Upper f(n) Bound

5S

Current Level 2

Best Goal I

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

Page 41: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

5 5

Level Open Closed

0 S

1 C

2 I

Current Node

I

Beam Width (w)

2

Upper f(n) Bound

5S

Current Level 2

Best Goal I

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

Page 42: BEAM-STACK SEARCH: INTEGRATING BACKTRACKING WITH BEAM SEARCH Ring Zhou and Eric A. Hansen Presented by Paul Gross.

Beam-stack Search Algorithm

Beam Stack

Level Open Closed

0 S

1 C

2 I

Current Node

I

Beam Width (w)

2

Upper f(n) Bound

5S

Current Level 2

Best Goal I

g(n) = Vh(n) =

V

A B C

2 2 3

1 2 2

2

I0

6

J2

5 is the optimal solution