Abstraction Heuristics Extended with Counting

Abstraction Heuristics Extended
with Counting Abstractions
Blai Bonet
Universidad Simón Bolı́var, Caracas, Venezuela
ICAPS 2011 – Freiburg, June 2011
Introduction
Abstractions is one of four main classes of heuristics
Abstractions are not dominated by the delete-free h+
Merge-and-shrink (MAS) heuristics are powerful abstractions
Underlying model of MAS is quite general
Contribution
Define counting abstractions (CA) within the model of MAS
A CA tracks the number of atoms true at states in admissible
manner; e.g. number of unachieved goals
CAs can be defined with respect to any set of atoms; not
bound to SAS+ variables
CAs can be composed with standard MAS heuristics
Abstraction Heuristics
(Very) General Framework
abstractions −→ (labeled) transition systems
compositions −→ synchronized products
Transition Systems
Abstract state space with transitions
Tuple T = hS, L, A, s0 , ST i where:
S is finite set of states
L finite set of labels (actions)
labeled transitions A ⊆ S × L × S
initial state s0 ∈ S
goals ST ⊆ S
Minimum distances to goals denoted by hT
Abstractions
Abstraction of T = hS, L, A, s0 , ST i is
transition system T 0 = hS 0 , L, A0 , s00 , ST0 i over same labels
homomorphism α : S → S 0 ; i.e.,
– (s, `, t) ∈ A =⇒ (α(s), `, α(t)) ∈ A0
– s00 = α(s0 )
– α(ST ) ⊆ ST
0
If (T 0 , α) is abstraction of T , hT (α(s)) ≤ hT (s)
0
Thus, hT is admissible heuristic for searching T
Synchronized Products
Abstractions (T 0 , α0 ) and (T 00 , α00 ) combined into abstraction
T 0 ⊗ T 00 = hS, L, A, s0 , sT i where:
S = S 0 × S 00
((s0 , s00 ), `, (t0 , t00 )) ∈ A iff (s0 , `, t0 ) ∈ A0 and (s00 , `, t00 ) ∈ A00
s0 = (s00 , s000 )
ST = ST0 × ST00
Homomorphism is α(s) = (α0 (s), α00 (s))
0
00
Thm: max{hT , hT } ≤ hT
0 ⊗T 00
Merge-and-Shrink Heuristics
Start with abstractions corresponding to single SAS+ variables
Combine them (in some order) using synchronized products
Control size of products by shrinking the abstractions
Example: Gripper with 1 Arm and 2 Balls
Atomic transition systems:
ball1
inA
HF
0B
1B
1G
pick0A
drop1A
drop0A
0A
pick1A
0G
HT
moveA
pick1B
pick0B
pick??
moveB
inB
drop1B
ball0
drop0B
holding
drop??
position
1A
Example: Gripper with 1 Arm and 2 Balls
Composition: position + holding
moveB
inB,HF
pick?B
drop?B
moveA
pick?A
drop?A
inA,HF
moveB
inA,HT
moveA
inB,HT
Example: Gripper with 1 Arm and 2 Balls
Composition: position + holding + ball0
pick1A
moveB
inA,HT,0B
inA,HF,0G
pick1B
inB,HT,0G
moveB
inA,HT,0G
pick0A
inB,HT,0A
pick1B
pick1A
drop0A
moveA
moveA
drop1B
inA,HT,0A
drop1A
drop1B
inB,HF,0G
moveB
inB,HT,0B
pick0B
drop0B
inB,HF,0B
moveA
moveB
moveA
drop1A
moveB
moveA
inA,HF,0B
moveB
inA,HF,0A
moveA
inB,HF,0A
Counting
Goal: to define abstractions that count atoms
Atoms: of the form ‘X = x’ for SAS+ variable X and x ∈ DX
Fix set C of atoms. For state s, C(s) = |{p ∈ C : s |= p}|
Abstraction (TC = hS 0 , A0 , s00 , ST0 i, α) that counts C is
S 0 = {0, 1, . . . , |C|}
(C(s), `, C(t)) ∈ A0 iff (s, `, t) ∈ A
s00 = C(s0 )
ST0 = {C(s) : s ∈ ST }
α(s) = C(s)
Thm: TC gives admissible estimates
but cannot be computed without considering all states in T
Goal: to define abstractions that count atoms
Atoms: of the form ‘X = x’ for SAS+ variable X and x ∈ DX
Fix set C of atoms. For state s, C(s) = |{p ∈ C : s |= p}|
Abstraction (TC = hS 0 , A0 , s00 , ST0 i, α) that counts C is
S 0 = {0, 1, . . . , |C|}
(C(s), `, C(t)) ∈ A0 iff (s, `, t) ∈ A
s00 = C(s0 )
ST0 = {C(s) : s ∈ ST }
α(s) = C(s)
Thm: TC gives admissible estimates
but cannot be computed without considering all states in T
Goal: to define abstractions that count atoms
Atoms: of the form ‘X = x’ for SAS+ variable X and x ∈ DX
Fix set C of atoms. For state s, C(s) = |{p ∈ C : s |= p}|
Abstraction (TC = hS 0 , A0 , s00 , ST0 i, α) that counts C is
S 0 = {0, 1, . . . , |C|}
(C(s), `, C(t)) ∈ A0 iff (s, `, t) ∈ A
s00 = C(s0 )
ST0 = {C(s) : s ∈ ST }
α(s) = C(s)
Thm: TC gives admissible estimates
but cannot be computed without considering all states in T
Goal: to define abstractions that count atoms
Atoms: of the form ‘X = x’ for SAS+ variable X and x ∈ DX
Fix set C of atoms. For state s, C(s) = |{p ∈ C : s |= p}|
Abstraction (TC = hS 0 , A0 , s00 , ST0 i, α) that counts C is
S 0 = {0, 1, . . . , |C|}
(C(s), `, C(t)) ∈ A0 iff (s, `, t) ∈ A
s00 = C(s0 )
ST0 = {C(s) : s ∈ ST }
α(s) = C(s)
Thm: TC gives admissible estimates
but cannot be computed without considering all states in T
Effective Construction
Idea: compute abstraction at representation level (SAS+ level)
How: count for each operator how many atoms in C are deleted
and how many are added; i.e., net difference
But:
if p is true and ‘added’, the count should not increase
if p is false and ‘deleted’, the count should not decrease
Solution: approximate the count in an admissible manner
Effective Construction
Idea: compute abstraction at representation level (SAS+ level)
How: count for each operator how many atoms in C are deleted
and how many are added; i.e., net difference
But:
if p is true and ‘added’, the count should not increase
if p is false and ‘deleted’, the count should not decrease
Solution: approximate the count in an admissible manner
Effective Construction
Idea: compute abstraction at representation level (SAS+ level)
How: count for each operator how many atoms in C are deleted
and how many are added; i.e., net difference
But:
if p is true and ‘added’, the count should not increase
if p is false and ‘deleted’, the count should not decrease
Solution: approximate the count in an admissible manner
Effective Construction
Idea: compute abstraction at representation level (SAS+ level)
How: count for each operator how many atoms in C are deleted
and how many are added; i.e., net difference
But:
if p is true and ‘added’, the count should not increase
if p is false and ‘deleted’, the count should not decrease
Solution: approximate the count in an admissible manner
Consider the sets (computed from SAS+ representation):
baseo = C ∩ pre[o]
δo+ = {X : X = X(pre[o]) ∈
/ C ∧ X = X(post[o]) ∈ C}
δo− = {X : X = X(pre[o]) ∈ C ∧ X = X(post[o]) ∈
/ C}
αo = {X : X(pre[o]) = ⊥ ∧ X = X(post[o]) ∈ C}
βo = VarsC ∩ {X : X(pre[o]) = ⊥ ∧ X = X(post[o]) ∈
/ C}
Thm: Let o be applicable at s, and s0 = result(s, o). Then,
C(s) ≥ |baseo |
C(s0 ) = C(s) + |δo+ | − |δo− | + k
where −|βo | ≤ k ≤ |αo |
Consider the sets (computed from SAS+ representation):
baseo = C ∩ pre[o]
δo+ = {X : X = X(pre[o]) ∈
/ C ∧ X = X(post[o]) ∈ C}
δo− = {X : X = X(pre[o]) ∈ C ∧ X = X(post[o]) ∈
/ C}
αo = {X : X(pre[o]) = ⊥ ∧ X = X(post[o]) ∈ C}
βo = VarsC ∩ {X : X(pre[o]) = ⊥ ∧ X = X(post[o]) ∈
/ C}
Thm: Let o be applicable at s, and s0 = result(s, o). Then,
C(s) ≥ |baseo |
C(s0 ) = C(s) + |δo+ | − |δo− | + k
where −|βo | ≤ k ≤ |αo |
Approximation
Abstraction AC = (hS, L, A, s0 , ST i, α) where
S = {0, 1, . . . , |C|}
L is set of SAS+ operators
s0 = C(sinit )
ST = {v ∈ S : C(sgoal ) ≤ v}
hv, o, v 0 i ∈ A iff
v ≥ |baseo |
v 0 = v + |δo+ | − |δo− | + k
for some −|βo | ≤ k ≤ |αo | with 0 ≤ v 0 ≤ |C|
Thm: AC is polytime computable and admissible
Example: Gripper with 1 Arm and 2 Balls
inA
HF
0
drop?A
1
HT
drop?A
pick?A
moveA
inB
pick?A
#ballsA
pick??
holding
moveB
position
drop??
Atomic transition systems:
2
Example: Gripper with 1 Arm and 2 Balls
Composition: position + holding + #ballsA
pick?B
inA,HF,0
moveA
inB,HF,0
drop?B
moveA
inB,HT,0
moveB
inA,HT,0
pick?A
drop?B
moveB
moveA
inB,HT,1
pick?B
moveA
inB,HF,1
moveB
inA,HF,1
pick?A
drop?A
inA,HT,1
drop?A
moveB
pick?B
moveB
inA,HF,2
moveA
inB,HF,2
drop?B
moveA
inB,HT,2
moveB
inA,HT,2
Experimental Results: Gripper with 2 Arms (IPC)
Strategies: static (default) and LIFO
Counting: Cinit , Cgoal , and 3 random each with 2 atoms
Size: N = 50, 000 nodes in abstraction
static strategy
inst.
03
04
05
06
07
LIFO strategy
h∗ (s◦ )
M&S
M&S-#
M&S
M&S-#
23
29
35
41
47
9,318
68,186
376,494
1,982,014
10,091,966
10,298
65,681
371,720
1,974,279
10,080,246
0
32,514
332,629
1,934,383
10,047,485
0
0
0
0
0
Lessons Learned
General abstractions:
Function that maps states into domain generates abstraction
Abstraction may not be effective
Approximate abstraction with an effective abstraction
Counting abstractions:
powerful abstractions
can be combined with other abstractions
how to select good sets C of atoms is open issue
. . . see the paper for more interesting stuff . . .
Thanks!