combining front-to-end perimeter search and pattern databases cmput 652 eddie rafols

32
Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Post on 21-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Combining Front-to-End Perimeter Search and

Pattern Databases

CMPUT 652Eddie Rafols

Page 2: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Motivation

From Russell, 1992

Page 3: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Allocating Memory

• More memory for Open/Closed Lists• Caching• Perimeter Search• Pattern Databases

Page 4: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Allocating Memory

• More memory for Open/Closed Lists• Caching• Perimeter Search• Pattern Databases

Page 5: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Perimeter Search

• Generate a perimeter around the Goal

• Any path to Goal must pass through a perimeter node Bi

• We know the optimal path from Bi to Goal

• Stopping condition for IDA* is now: If A is a perimeter node and g(Start,A)

+g*(A,Goal) Bound

Page 6: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Perimeter Search

• Traditional Search O(bd)• Perimeter Search O(br+bd-r)

• Large potential savings!

Page 7: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Perimeter Search

• Can be used to improve our heuristic• Kaindl & Kainz, 1997

Add Method Max Method

Page 8: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Pattern Databases

• Provide us with a consistent estimate of the distance from any given state to the goal*

*This point will become relevant in a few slides

Page 9: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Approach

• Generate a pattern database to provide a heuristic

• Use Kaindl & Kainz’s techniques to improve on heuristic values (Add,Max)

• Determine how perimeter search and PDBs can most effectively be combined via empirical testing

Page 10: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression…

• Among other things, the Max method requires: h(Start, A), where A is a search node h(Start, Bi), where Bi is a perimeter node

Page 11: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression…

• Among other things, the Max method requires: h(Start, A), where A is a search node h(Start, Bi), where Bi is a perimeter node

• We are not explicitly given this information in a PDB.

Page 12: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

• Recall: Alternate PDB lookups

• If we are dealing with a state space where distances are symmetric and ‘tile’-independant, we can use this technique

Page 13: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

• ex. Pancake Problem

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Page 14: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

• However, this technique may provide inconsistent heuristics

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

ϕ1

ϕ2

ϕ1 ϕ2

Page 15: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

• Kaindl’s proof of the max method relies on a consistent heuristic

• ...but we can still use our pattern database

• We just have to use it correctly

Page 16: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

• Distances are symmetric, therefore h*(Start, A) = h*(A, Start) h*(Start, Bi) = h*(Bi, Start)

• We can map the Start state to the Goal state

• In this case, when we do alternate lookups on A and Bi, we are using the same mapping!

• Our heuristic is now consistent!

Page 17: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Digression...

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

ϕ

ϕ

ϕ

Page 18: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

A Third Heuristic?

• Since we have the mechanisms in place, why not use alternate lookup to get h’(Goal, A)?

• Turns out that this is the exact same lookup as h(A,Goal)

Page 19: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Combining the Heuristics

• The Add method lets us adjust our normal PDB estimate: h’1(A,goal) = h(A,goal) +

• The Max method gives us another heuristic: h’2(A,goal)=mini(h(Bi,start) +g*(Bi,goal))-h(A, start)

• Our final heuristic: H(A,goal)=max(h’1(A,goal),h’2(A,goal))

Page 20: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Hypotheses

All memory used on perimeter, expect poor performance

All memory used on PDB, expect good performance, but not the best possible

Small perimeters combined with large PDBs should outperform large perimeters with small PDBs

Page 21: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Method

• Do a binary search in the memory space. Test ‘pure’ perimeter search and ‘pure’

PDB search Give half the memory to the winner,

compare whether a PDB or a perimeter would be a more effective use of the remaining memory

Repeat until perimeter search becomes a more effective use of memory

Page 22: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Results

100% Perimeter

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

Nodes Generated

100% PDB

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

Page 23: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Results

50% PDB, 50% PDB

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

50% PDB, 50% Perimeter

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

Page 24: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Results

75% PDB, 25% PDB

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

75% PDB, 25% Perimeter

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start States

log(Nodes Generated)

Page 25: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Results

87% PDB, 13% PDB

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

87% PDB, 13% Perimeter

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

Page 26: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Results

92% PDB, 8% Perimeter

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

92% PDB, 8% PDB

1

10

100

1000

10000

100000

1000000

10000000

1 2 3 4 5 6 7 8 9 10

Start State

log(Nodes Generated)

Page 27: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Discussion

• Discouraging results• Using “extra” space for a PDB seems

to provide better results across the board

Page 28: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Discussion

• Adding a perimeter does not appear to have a significant effect

Average Nodes Generated

1000

10000

100000

1000000

0 2 4 6 8 10 12

100PDB

50PDB-50Perim

75PDB-25 Perim

87PDB-13Perim

92PDB-8Perim

Page 29: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Discussion

• Empirically, the Add method is always returning = 0 A directed strategy for perimeter

creation is likely needed for this method to have any effect

Page 30: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Discussion

• Further experiments show that given a fixed PDB, as perimeters increase in size, there is a negligible performance increase

Page 31: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

An Idea

• Is the heuristic effectively causing paths to perimeter nodes to be pruned?

• This means that performance is only being improved along a narrow search path

• Can we generate the perimeter ‘intelligently’ to make it more useful?

Page 32: Combining Front-to-End Perimeter Search and Pattern Databases CMPUT 652 Eddie Rafols

Questions?