Title: CS498EA Reasoning in AI Lecture
1CS498-EAReasoning in AILecture 3
- Professor Eyal Amir
- Fall Semester 2008
2Today
- What can we say about propositional reasoning
methods? - Correctness (Soundness, Completenes)
- Time efficiency theory, practice
- Partitioned reasoning
- Graphs of partitions, tree structures
3Propositional Resolution
- Resolution algorithm (saturation)
- While there are unresolved C1,C2
- Select C1, C2 in KB
- If C1, C2 are resolvable, resolve them into a new
clause C3 - Add C3 to KB
- If C3 (empty clause),
- we got a contradiction.
- STOP
C1 p1 ? C1 C2 ?p1 ? C2 --------------------
C3 C1 ? C2
4Properties of Resolution
- Theorem Resolution is sound
- Resolving clauses in KB generates valid
consequences of KB - Theorem Resolution is refutation complete
- Resolution of KB with ?Q yields the empty clause
iff KB Q
-
5Properties of Resolution
- Resolution does not always generate Q
- KB a,b, ?a,b, b,c
- Q b ? ?c b,?c
- Theorem Resolution always generates a clause
that subsumes Q iff KB Q - Example Resolving KB generates b
-
6Simple Enhancements
- Remove subsumed clauses
- p subsumes p , q
- p , q subsumes p , q, r
- ?p does not subsume p , q
- Contract same literals
- p , p , q becomes p , q
- Unit resolution resolve unit clauses first
7What can we say about Resolution?
8Related to Prop. Resolution
- Clause selection for resolution
- Consequence finding
- Prime implicates/implicants
9Partitioning
- We can partition reasoning while not hurting
soundness and completeness - How to partition a KB with the best computational
benefit - Still maintaining soundness completeness
- Applications du jour Planning
10Reasoning with partitions using MP
- Start with a tree-decomposition partition graph
- Direct edges toward goal
- (fixing outbound link language Li for each
partition)
- Concurrently, in each partition
- Generate consequences in Li
- Pass messages in Li toward goal
11High-Level Structure inLogic
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
12High-Level Structure inLogic
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
broom
13Structured Reasoning
- Craigs interpolation theorem (First-Order
Logic) - If A B, then there is a formula C including
only symbols from L(A) ? L(B) such that A C
and C B
Ù
clean
14Structured Reasoning
- Craigs interpolation theorem (First-Order
Logic) - If A B, then there is a formula C including
only symbols from L(A) ? L(B) such that A C
and C B
clean
15High-Level Structure Logic
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
broom
16Structured First-Order Reasoning
- Craigs interpolation theorem (First-Order
Logic) - If A B, then there is a formula C including
only symbols from L(A) ? L(B) such that A C
and C B
clean
broom
17High-Level Structure Logic
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
broom
18Reasoning with partitions using MP
- Start with a tree-decomposition partition graph
- Direct edges toward goal
- (fixing outbound link language Li for each
partition)
- Concurrently, in each partition
- Generate consequences in Li
- Pass messages in Li toward goal
19Benefits of Message-Passing
- Search space is restricted
- Allows parallel processing
- Sound and complete
- Can use different reasoners for each partition
- Small links imply short proofs
- Small partitions imply short proofs
20Contents
- We can partition reasoning while not hurting
soundness and completeness - How to partition a KB with the best computational
benefit - Still maintaining soundness completeness
- Applications Planning
21Automatic Decomposition of a Theory
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
22Automatic Decomposition of a Theory
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
23Automatic Decomposition of a Theory
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
24Automatic Decomposition of a Theory
key
locked
can_open
open
cleaned
can_clean
opened
fetch
dry
time
broom
let_dry
drier
25Automatic Decomposition of a Theory
key
locked
can_open
open
cleaned
can_clean
opened
fetch
dry
time
broom
let_dry
drier
26Automatic Decomposition of a Theory
broom
key
locked
can_open
open
cleaned
can_clean
opened
fetch
dry
time
broom
let_dry
drier
27Automatic Decomposition of a Theory
broom
key
locked
can_open
open
cleaned
can_clean
broom
opened
fetch
dry
time
broom
let_dry
drier
28Automatic Decomposition of a Theory
key ? ?locked ? can_open can_open Ù open
? opened opened Ù fetch ?
broom key ? opened open ? opened ? broom ? fetch
broom Ù dry ? can_clean can_clean ?
cleaned broom Ù let_dry ? dry time ?
let_dry drier ? let_dry time ? drier
broom
29Automatic Partitioning
- Begin with a KB in PL or FOL
- Construct symbol graph
- Edges join symbols which appear together in an
axiom - Find a tree decomposition of low width
- Roughly, generalizes balanced vertex cut
- Partition axioms correspondingly
- Each partition has its own vocabulary
- Edge labels defined by shared vocabulary
30Automatic Partitioning
- Find a tree decomposition of minimum width
- A tree in which each node corresponds to a set of
vertices from the original graph - The tree satisfies the running intersection
property if v appears in two nodes in the tree,
then v appears in all the nodes on the path
connecting them - The width of the tree is the size of its largest
node
31Why Tree Decomposition?
32Automatic Partitioning
- Treewidth Robertson Seymour 86,
- Approximation Algorithms
- General theories A. McIlraith 00
- O(Log(OPT))-approximation for general graphs A.
01 - Constant factor approximation for planar graphs
- Seymour Thomas 94, A., Krauthgamer
Rao 03
33Automatic Partitioning Heuristics
- Heuristic min-degree
- Given a graph G List L - empty
- Add to L a node v with minimum number of
neighbors - Make a clique from vs neighbors
- Remove v from G
- If G is empty, return L
- Go to 2
34Automatic Partitioning Heuristics
- Heuristic min-fill
- Given a graph G List L - empty
- Add to L a node v with minimum number of edges
missing between neighbors - Make a clique from vs neighbors
- Remove v from G
- If G is empty, return L
- Go to 2
35Summary Characteristics of MP
- Reasoning is performed locally in each partition
- Specialized reasoning procedures in every
partition - Globally sound complete provided each local
reasoner is sound complete for Li-consequence
finding - Performance is worst-caseexponential within
partitions, but linear in tree structure
Minimizesbetween-partitiondeduction
Focuseswithin-partitiondeduction
Supports parallel processing
Different reasoners in different partitions
36Contents
- We can partition reasoning while not hurting
soundness and completeness - How to partition a KB with the best computational
benefit - Still maintaining soundness completeness
- Applications Planning
37Application Planning
- General-purpose planning problem
- Given
- Domain features (fluents)
- Action descriptions effects, preconditions
- Initial state
- Goal condition
- Find
- Sequence of actions that is guaranteed to achieve
the goal starting from the initial state
38Application Planning with partitions
- PartPlan Algorithm
- Start with a tree-structured partition graph
- Identify goal partition
- Direct edges toward goal
- In each partition
- Generate all plans possible with depth d and
width k - Pass messages toward goal
39Planning with partitions
- PartPlan Algorithm
- Start with a tree-structured partition graph
- Identify goal partition
- Direct edges toward goal
- In each partition
- Generate all plans possible with depth d and
width k - if you give me a block, I can return it to you
painted, - if you give me a block, let me do a few things,
and then give me another block, then I can return
the two painted and glued together. - Pass messages toward goal
- All preconditions/effects for which there are
feasible action sequences
40Factored Planning Analysis
- Planner is sound and complete
- Running time for finding plans of width w with m
partitions of treewidth k is O(mw22w2k) - Factoring can be done in polynomial time
- Goal can be distributed over partitions by adding
at most 2 features per partition
41Next Time
- Probabilistic Graphical Models
- Directed models Bayesian Networks
- Undirected models Markov Fields
- Requires prior knowledge of
- Treewidth and graph algorithms
- Probability theory