Title: Consistency Methods for Temporal Reasoning
1Consistency Methods for Temporal Reasoning
- Lin XU
- Constraint Systems Laboratory
- Advisor Dr. B.Y. Choueiry
- April, 2003
Supported by a grant from NASA-Nebraska, CAREER
Award 0133568, and a gift from Honeywell
Laboratories.
2Outline
- Temporal Reasoning
- motivation background
- Simple Temporal Problem (STP) Temporal
Constraint Satisfaction Problem (TCSP) - what are they how to solve them
- Contribution
- 3 research questions
- their solutions
- empirical evidence
- Summary future directions for research
3Time, always time!
- Tom wants to serve tea
- Clear tea pot 3 min
- Clear tea cups 10 min
- Boil water 15 min
- With little reasoning, the task
- takes 18 min instead of 28 min
4Temporal Reasoning in AI
- Temporal Logic
- Temporal Networks
- Qualitative interval algebra, point algebra
- Before, after, during, etc.
- Quantitative temporal constraint networks
- Metric 10 min before, during 15 min, etc.
- Simple TP (STP) Temporal CSP (TCSP)
5Temporal Network example
Tom has class at 800 a.m. Today, he gets up
between 730 and 740 a.m. He prepares his
breakfast (10-15 min). After breakfast (5-10
min), he goes to school by car (20-30 min). Will
he be on time for class?
6Simple Temporal Network (STP)
- Variable Time point for an event
- Domain A set of real numbers
- Constraint distance between time points ( 5,
10 ? 5?Pb-Pa?10 ) - Solution A value for each variable such that all
temporal constraints are satisfied
7More complex example
Tom has class at 800 a.m. Today, he gets up
between 730 and 740 a.m. He either makes his
breakfast himself (10-15 min), or gets something
from a local store (less than 5 min). After
breakfast (5-10 min), he goes to school either by
car (20-30 min) or by bus (at least 45 min).
8Possible questions
- Can Tom arrive school in time for class?
- Is it possible for Tom to take the bus?
- If Tom wanted to save money by making breakfast
for himself and taking the bus, when should he
get up?
9Temporal CSP
- Constraint a disjunction of intervals 10, 15
? 0, 5 - Rest, same as STP
- Variable Time point for an event
- Domain A set of real numbers
- Solution Each variable has a value that
satisfies all temporal constraints
10Temporal Networks STP TCSP
- Simple temporal problem (STP)
- One interval per constraint
- Can be solved in polynomial time
- Floyd-Warshall F-W algorithm (all-pairs
shortest-paths) - Temporal Constraint Satisfaction Problem (TCSP)
- A disjunction of intervals per constraint
- is NP-hard
- Solved with Backtrack search (BT-TCSP)
Dechter
11Solving the TCSP
- Formulate TCSP as a meta-CSP
- Given
- Variables Edges in constraint network
- Domains of variables edge labels in constraint
network - A unique global constraint (? checking
consistency of an STP) - Find all solutions to the meta-CSP
12BT search for meta-CSP
ltnew treegt big
13Solving the TCSP
- Requires finding all solutions to the meta-CSP
- Every node in the search tree is an STP to be
solved - ? An exponential number of STPs to be solved ?
14Questions addressed
- Is there a better algorithm for STP than F-W?
- exploiting topology of the constraint graph
- exploiting semantic properties of the temporal
constraints - Is there a consistency filtering algorithm for
reducing the size of TCSP? - Can we improve performance of BT-TCSP
- By using a better STP solver?
- By avoiding to check STP consistency at every
node? - By exploiting the topology of the constraint
graph? ? again! - By finding a good variable ordering heuristic?
15Contributions
- Two new algorithms for solving STP
- Partial Path Consistency adapted
from Bliek Sam-Haroud - ?STP
Xu Choueiry, TIME 03 - A new algorithm for filtering TCSP
- ?AC
Xu Choueiry, submitted - Three heuristics to improve search
- Articulation points (AP)
classical, never tested - New cycle check (NewCyc) Xu
Choueiry, submitted - Edge ordering (EdgeOrd)
Xu Choueiry, submitted - ? Random generators 2 for STP 2 for TCSP
16Contributions
- Two new algorithms for solving STP
- Partial Path Consistency adapted
from Bliek Sam-Haroud - ?STP
Xu Choueiry, TIME 03 - A new algorithm for filtering TCSP
- ?AC
Xu Choueiry, submitted - Three heuristics to improve search
- Articulation points (AP)
classical, never tested - New cycle check (NewCyc) Xu
Choueiry, submitted - Edge ordering (EdgeOrd)
Xu Choueiry, submitted - ? Random generators 2 for STP 2 for TCSP
17Algorithms for solving the STP
?Our approach requires triangulation of the
constraint graph
18Partial Path Consistency (PPC)
- Known features of PPC Bliek
Sam-Haroud, 99 - Applicable to general CSPs
- Triangulates the constraint graph
- In general, resulting network is not minimal
- For convex constraints, guarantees minimality
(same as F-W, but much cheaper in practice) - Adaptation of PPC to STP this
thesis - Constraints in STP are bounded difference, thus
convex, PPC results in the minimal network
19?STP TIME 03
?STP considers the temporal graph as composed by
triangles instead of edges
?STP
PPC
Temporal graph
F-W
20Advantages of ?STP
- A finer version of PPC
- Cheaper than PPC and F-W
- Guarantees the minimal network
- Automatically decomposes the graph into its
bi-connected components - binds effort in size of largest component
- allows parallellization
- Best known algorithm for solving STP
- ? use it in BT-TCSP where it is applied an
- exponential number of times
21Finding the minimal STP
22Determining consistency of STP
23Contributions
- Two new algorithms for solving STP
- Partial Path Consistency adapted
from Bliek Sam-Haroud - ?STP
Xu Choueiry, TIME 03 - A new algorithm for filtering TCSP
- ?AC
Xu Choueiry, submitted - Three heuristics to improve search
- Articulation points (AP)
classical, never tested - New cycle check (NewCyc) Xu
Choueiry, submitted - Edge ordering (EdgeOrd)
Xu Choueiry, submitted - ? Random generators 2 for STP 2 for TCSP
24Filtering algorithm ?AC
Remove inconsistent intervals from the label of
edge before search.
Polynomial number of polynomial-size ternary
constraints
One global, exponential size constraint
25?AC reduces size of TCSP
26Advantages of ?AC
- It is powerful, especially under high density
- It uses special, poly-size data structures
- It is sound, effective, and cheap O (n E k3)
- We show how to make it optimal to be
proved - It uncovers a phase transition in TCSP
27Contributions
- Two new algorithms for solving STP
- Partial Path Consistency adapted
from Bliek Sam-Haroud - ?STP
Xu Choueiry, TIME 03 - A new algorithm for filtering TCSP
- ?AC
Xu Choueiry, submitted - Three heuristics to improve search
- Articulation points (AP)
classical, never tested - New cycle check (NewCyc) Xu
Choueiry, submitted - Edge ordering (EdgeOrd)
Xu Choueiry, submitted - ? Random generators 2 for STP 2 for TCSP
28Articulation points (AP)
- Decompose the graph into bi-connected components
- Solve each of them independently
- Binds the total cost by the size of largest
component - Classical solution, never implemented or tested
29New cycle check (NewCyc)
- Checks presence of new cycles O (E )
- Checks consistency only if a new cycle is added
30Advantages of NewCyc
- Restricts effort to new bi-connected component
- Reduces effort of consistency checking
- Does not affect of nodes visited in BT-TCSP
31Edge Ordering in BT-TCSP
32EdgeOrd Heuristic
Order the edges using triangle
adjacency Priority list is a by-product of
triangulation
33Advantages of EdgeOrd
- Localized backtracking
- Automatic decomposition of the constraint graph
- ? no need for AP
34Experimental evaluations
- With/without ?AC, AP, NewCyc, EdgeOrd
35Number of solutions
36Nodes visited (without ?AC)
37Nodes visited (after ?AC)
38CC for DPC-TCSP (without ?AC)
39CC for DPC-TCSP (after ?AC)
40CC for PPC-A-TCSP (without ?AC)
41CC for PPC-A-TCSP (after ?AC)
42CC for ?STP-TCSP BEST
43Random generators
- STP generators
- Implemented two new
- Tested three
- GenSTP-1 Xu
Choueiry, submitted - GenSTP-2 Courtesy of
Ioannis Tsamardinos - SPRAND (sub-class of SPLIB)
Public domain - TCSP generator
- Implemented two new
- Tested 1 GenTCSP-1 Xu Choueiry,
submitted
44Output from thesis
- 1 paper accepted in TIME-ICTL 2003
- 2 papers submitted to CP 2003
- 2 papers submitted to IJCAI 2003 workshop on
Spatial Temporal Reasoning
45Answers to Question I
- Is there a better algorithm for STP than F-W?
- Exploiting topology
- AP improves any STP solver
- Constraint semantic convexity
- ?STP is more efficient than F-W and PPC
46Answer to Question II
- Is there a consistency filtering algorithm for
reducing the size of TCSP? - ?AC reduces the size of meta-CSP by eliminating
intervals from the domain of edge - Effective, cheap, almost optimal
47Answers to Question III
- Can we improve the performance of BT-TCSP
- by using a better STP solver?
- Yes, ?STP is better than DPC to reduce cost of
BT - By avoiding to check STP consistency at every
node? - Yes, NewCyc avoids unnecessary checks
localizes updates - By exploiting the topology of the constraint
graph? - Yes, using articulation points
- By finding a good variable ordering heuristic
- We propose EdgeOrd, significantly reduces
cost of search
48Future work
- Improve ?AC, establish optimality
- Integrate ?AC
- with ULT (a closure algorithm)
- with search, as in forward-checking
- Exploit interchangeability in BT-TCSP, best
method for finding all solution
49The End
- Thank you for your attention
- Questions comments are welcome