Top Banner
University of Toronto Mechanical & Industrial Engineering The Phase Transition in Heuristic Search J. Christopher Beck Department of Mechanical & Industrial Engineering University of Toronto Canada [email protected] PlanSOpt Workshop, ICAPS2017 June 19, 2017
51

The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

Mar 09, 2018

Download

Documents

DuongAnh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Phase Transition in Heuristic Search

J. Christopher Beck Department of Mechanical & Industrial Engineering

University of Toronto Canada

[email protected]

PlanSOpt Workshop, ICAPS2017 June 19, 2017

Page 2: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

2

Nothing is as good as it used to be, and it never was. The “golden age of sports,” the golden age of anything,

is the age of everyone’s childhood. - Ken Dryden, “The Game”

The lack of interest, the distain for history is

what makes computing not-quite-a-field.

- Alan Kay, Dr. Dobbs, July 10, 2012

Corollary: The best papers are the ones we read during grad school.

Page 3: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Outline

•  The Phase Transition – aka Flashback to the 1990s

•  The Phase Transition in Heuristic Search – An abstract model and benchmark problems

•  The Effect of Operator Cost Ratio •  Next Steps

– Heavy-Tails and Local Minima?

3

Page 4: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Where the Hard Problems Are

•  While NP problems are worst-case exponential to solve, often typical instances are practically solvable

•  Q: What is the distribution of the empirically hard instances?

4

Page 5: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Graph Coloring 5

[Cheeseman et al. 1991] IJCAI, 1991.

Page 6: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Graph Coloring 6

[Cheeseman et al. 1991] IJCAI, 1991.

Page 7: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Conjectures

•  All NP-complete problems have an “order parameter” (TSP, CSP, SAT, HC, ...)

•  A critical value of the order parameter separates regions of under-constrained and over-constrained problem instances

•  The hard problem instances are found around this critical value

7

[Cheeseman et al. 1991] IJCAI, 1991.

The Phase

Transition

Page 8: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Random 3-SAT 8

[Crawford & Auton 1996] AIJ, 81, 31-57, 1996. Clause/variable ratio

% Solubility and

Normalized difficulty

Page 9: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Why Do We Care?

•  A lot of recent interest in understanding the difficulty of heuristic search problems –  i.e., “A*-style” state-based search

•  The phase transition has not (yet) been shown for heuristic search problems

9

Does the phase transition phenomenon play a role in problem difficulty for

heuristic search?

Page 10: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Some more background ...

10

Page 11: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

State-Space Search (aka “Heuristic Search”)

11

s *

Possible transitions

h = 10

h = 5

h = 8

Path from node to goal (estimate): h = 5 Greedy Best-First Search (GBFS):

choose node with minimum h

Page 12: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

PT in Planning

•  Randomly generate planning problems – operators, preconditions, effects, ...

•  Bylander [AIJ 1996] – Bounds based on goals and atoms to

operators ratio •  Rintanen [KR 2004]

– Gradual transition between soluble and insoluble based on operator/variable ratio

– Hampered by lack of insolubility test

12

Page 13: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Quantified SAT (2-QSAT)

•  Gent & Walsh [AAAI 1999] – apply theory of “constrainedness” from NP to

PSPACE – PT and easy-hard-easy observed for 2-QSAT

once trivially insoluble instances removed – More convincing evidence of abrupt PT than

in the planning work

13

Page 14: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Problem Difficulty for GBFS

•  Operator cost ratio – higher ratio ≈ more effort

•  (but see Fan et al. ICAPS2017)

•  Uninformative Heuristic Regions (UHRs) – plateaux and local minima ≈ more effort

•  Correlation between heuristic and distance –  lower correlation ≈ more effort

14

Does the phase transition phenomenon play a role in problem difficulty for

heuristic search? GBFS?

Page 15: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Outline

•  The Phase Transition – aka Flashback to the 1990s

•  The Phase Transition in Heuristic Search – An abstract model and benchmark problems

•  The Effect of Operator Cost Ratio •  Next Steps

– Heavy-Tails and Local Minima?

15

Page 16: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Abstract Model 16

[Cohen & B. 2017] AAAI, 780-786, 2017.

Page 17: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Control Parameter 17

Page 18: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Solubility 18

Is this surprising? Solubility:

0.1% to 99.9%

Page 19: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

# Nodes Expanded 19

Page 20: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Effect of the Heuristic 20

True cost to goal

A new question: What is the impact of

systematically stronger heuristics?

Page 21: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Effect of the Heuristic 21

Soluble instances only

Page 22: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Abstract Model

•  Solubility phase transition •  Easy-hard-easy pattern

associated with PT •  New results on the impact

of heuristics across PT

22

Standard PT work (CP, SAT) uses an abstract model on random problems

analogous to ours.

What about benchmark problems?

Page 23: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Benchmarks

•  Given an existing benchmark problem, we can generate relaxed/restricted instances by adding/removing transitions

23

Page 24: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Benchmarks 24

Page 25: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Pancake Problem 25

[Helmert 2010] SoCS, 109-110, 2010.

Action Fk: flip top k

Solution: F5, F6, F3, F4, F5

Page 26: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Pancake Problem 26

Page 27: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Grid Navigation Problem 27

G

S

Page 28: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Grid Navigation Problem 28

Page 29: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Similar Results

•  TopSpin •  Towers of Hanoi •  Interesting differences

with 8 Sliding Tile Puzzle due to disconnected search space

29

Page 30: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Effect of Heuristic (8-Pancake) 30

Page 31: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

So ...

•  Phase transition and easy-hard-easy patterns exist in GBFS for both abstract model and benchmark problems

•  Heuristics of systematically increasing strengths show radically different performance across the phase transition – Lowest improvement on hardest problems

31

What about existing ideas about problem difficulty in heuristic search?

Page 32: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Outline

•  The Phase Transition – aka Flashback to the 1990s

•  The Phase Transition in Heuristic Search – An abstract model and benchmark problems

•  The Effect of Operator Cost Ratio •  Next Steps

– Heavy-Tails and Local Minima?

32

Page 33: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Operator Cost Ratio

•  [Wilt & Ruml 2011] –  Instances are far more difficult with non-unit

costs despite the same connection structure •  [Cushing et al. 2011]

– Cost variance fundamentally misleads heuristic search

•  [Fan et al. 2017] – No Free Lunch Theorem for Dijkstra’s Alg.

•  Negative effects are balanced by positive effects in other cost functions

33

Page 34: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Operator Cost Ratio and the PT 34

[Cohen & B. 2017] SoCS, in press, 2017.

What is the impact of the operator cost ratio on problem difficulty across relaxed/

restricted benchmark problems?

Page 35: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Grid Navigation 35

Page 36: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Grid Navigation 36

Page 37: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Pancake Problem 37

[Helmert 2010] SoCS, 109-110, 2010.

Action Fk: flip top k

•  Cost = zm

– z: size of the bottom pancake in flipped sub-pile

•  For the 8-Pancake problem the operator cost ratio is 8m

Page 38: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Pancake Problem 38

Page 39: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

TopSpin 39

[Wilt & Ruml 2014] for TopSpin, sometimes higher operator cost ratio is better

Page 40: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Operator Cost Ratio and the PT

•  Impact of higher operator cost ratio follows a low-high-low pattern, peaking in the PT

40

Page 41: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Outline

•  The Phase Transition – aka Flashback to the 1990s

•  The Phase Transition in Heuristic Search – An abstract model and benchmark problems

•  The Effect of Operator Cost Ratio •  Next Steps

– Heavy-Tails and Local Minima?

41

Page 42: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

The Pancake Problem 42

Page 43: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Pancake Problem (Median) 43

Page 44: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Pancake Problem 44

“Exceptionally hard problems (ehps)” [Gent & Walsh 1994]

Page 45: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Exceptionally Hard Problems

•  Very hard problems in underconstrained regions of the PT

•  Not inherently hard problems – Combination of problem structure and

algorithm details •  Heavy-tailed distributions

– Performance of randomized heuristic follows a heavy-tailed distribution

45

[Smith & Grant 1997] CP, 182-195, 1997. [Gomes et al. 2005] Constraints, 10, 317-337, 2005.

Page 46: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Heavy-Tailed Runtime Distributions

46

log frequency

of a solution

log of a search effort

[Gomes et al. 1998] AAAI, 431–437, 1998.

Page 47: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Failed Sub-trees and Local Minima •  Failed sub-tree (CSP)

– A sub-tree with no solutions –  If entered (e.g. by depth-first search) needs to

be exhaustively searched •  Local Minima (heuristic search)

–  [Wilt & Ruml 2014] – A region that does not contain the goal but

that the search will have to exhaust if it enters – Connected with difficulty due to higher

operator cost ratio

47

Heavy-tails occurs when depths of failed sub-trees are exponentially distributed

[Gomes et al. 2005]

Page 48: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Problem Difficulty for GBFS

•  Operator cost ratio – higher ratio ≈ more effort

•  (but see Fan et al. ICAPS2017)

•  Uninformative Heuristic Regions (UHRs) – plateaux and local minima ≈ more effort

•  Correlation between heuristic and distance –  lower correlation ≈ more effort

48

Associated with size/extent of local minima [Wilt & Ruml 2014]

Impacted by phase transition

Connection with exceptionally hard problems and heavy tails?

Connection between local minima and PT?

Page 49: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

So What Have We Done?

•  Showed that the phase transition phenomenon from combinatorial search can be observed in heuristic search

•  Showed an (empirical) relation between PT and problem hardness – Both unit-cost problems and

when varying operator cost ratio •  Showed the existence of ehps for GBFS

49

Page 50: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

Conjectures

•  The size and extend of local minima is effected by the phase transition

•  The analysis of problem difficulty based on heavy-tailed distributions (in CSPs) can be imported into heuristic search

50

Page 51: The Phase Transition in Heuristic Search - ICAPSicaps17.icaps-conference.org/workshops/PlanSOpt/slides/phase...The Phase Transition in Heuristic Search J. Christopher Beck Department

University of Toronto Mechanical & Industrial Engineering

51

Science requires a society because even people who are trying to be good thinkers love their own thoughts and theories – much

of the debugging has to be done by others.