1 tms and atms philippe dague and yuhong yan nrc-iit [email protected]...
TRANSCRIPT
2
TMS and ATMS TMS: Truth Maintain System ATMS: Assumption Truth Maintain System Why needs TMS:
Improve efficiency of reasoning system Conventional TMS:
Justification-based Logic-based
3
ATMS and diagnosis engine
From Johan de Kleer, “An Assumption-based TMS”, Artificial Intelligence 28(1986) p141
ProblemSolver TMS
Justifications
Beliefs
P(a)
x P(x)->Q(x)
Q(a)
P(s), x ,P(x)->Q(x) =>Q(a)
4
Why TMS Holding trace of the information
beginning from which Dependencies to get the conclusions
Management of the reasoning contexts. hypothetical reasoning (assumptions) search between (alternative) contexts
Caching inferences to avoid to repeat more times some steps than reasoning remember which roads they have carried to successes
or failures in the reasoning process. manager search space like gragh and not like tree
5
Chronological Backtracking
X=0
Y=0 Y=1
Z=0 Z=1 Z=0 Z=1
X=1
Y=0 Y=1
Z=0 Z=1 Z=0 Z=1
(1)X{0,1}, (2) a = e1(X)
(3)Y{0,1}, (4) b = e2(Y)
(5)Z{0,1}, (6) c = e3(Z)
(7) b c, (8) a b
* *
Rediscovering contradictions (!)
Rediscovering inferences (?)
Incorrect ordering
!!
??
6
Limitation of TMS Single state
TMS keeps consistent under single context
7
Ideas of ATMS
ProblemSolver TMS
Justifications
BeliefsP(a)
x P(x)->Q(x)
Q(a)
P(s), x ,P(x)->Q(x) =>Q(a)
It executes the reasoning steps and it passes to the TMS its assumptions and the justification of its conclusions (incrementally)
It can interrogate the TMS
Holds trace of the dependencies between assumptions and conclusions and of the inconsistence
8
Terminology for TMS/ATMS Nodes:objects on which the problem solver
works, e.g. data, rules, assumption Justification: describes how a node is
derivable from other nodes Consequent: the node being justified Antecedents: a list of nodes which imply the
consequent E.g. x1,x2,…=>n, logically it is implication:
X1,x2,…->n
9
Terminology for ATMS Environment: a set of assumptions A node n is said to hold in environment E if n can
be derived from E and a set of justification J:E,J |- n
An environment is inconsistent if false () is derivable:
E,J |- No-good: inconsistent environment (the
assumption set which causes the contradiction) (stored separately)
Context: the environment and all nodes derivable from the environment
10
Label Label: a set L of environments E
associated with a node n Four properties
Consistency: each environment E is consistent Soundness:
E, J |- n, or J|- E->n Completeness: E’ (J|- E’->n)->(E, EE’) Minimality: E1, E2, ¬(E1E2)
11
Data Structure in ATMS Structure of a node:
datum: <datum, label, justifications> A premise holds universally:
<p,{{}},{()}> An assumption is a node whose label
contains only itself:<A,{{A}},{(A)}>
12
Data Structure in ATMS Assumptions can be justified
<A, {{A},{B,C}},{(A),(d)}> An assumed node: holds under an
assumption and a justification of this assumption
<b,{{A}},{(A)}> A derived node
<n,{{A1,A2,…},{B1,B2,…}…},{(z1,z2,…),(y1,y2,…)…}>
13
Logic meaningA node:<n,{{A1,A2,…},{B1,B2,…}…},{(z1,z2,…),(y1,y2,…)
…}>Means:
(A1A2…)(B1B2…)… ->nAnd:
(z1z2 …) (y1 y2 …) …->n
A node::<,{},{…}>
14
Basic Operation in ATMSTo keep the label of each node is consistent,
sound, complete and minimal Union of all possible combinations of
picking one environment from each antecedent node label
Remove subsumed environments Remove inconsistent environments
15
Examplex+y=1:<x+y=1,{{A,B},{B,C,D}},{…}>
x=1:<x=1,{{A,C},{D,E}},{…}>
y=0:<y=0,{},{}>
Nogood {A,B,E}Add justification:
x+y=1, x=1:=> y=0
Union: {{A,B,C},{A,B,D,E},{A,B,C,D},{B,C,D,E}} Result:y=0 :<y=0, {{A,B,C},{B,C,D,E}},{(x+y=1, x=1)}>
16
Process:When one new justification arrives Union, remove inconsistent and subsumed
environment If the new label is as the old one, stop If the node is :, each environment of the label
is added to a nogood database, and all inconsistent environments (itself and the supersets) are removed from every node label
If the node is not , update any other influenced node (nodes whose justifications contain label changed node)
17
Example of using ATMS on Diagnosis
M1
M2
M3
A2
A1 F
G
Before output observation
<A=3,{{}},{()}>
<B=2,{{}},{()}>
<C=2,{{}},{()}>
<D=3,{{}},{()}>
<E=3,{{}},{()}>
<x=6,{{M1}},{(A=3, B=2)}>
X
Y
Z
<Y=6,{{M2}},{..}>
<Z=6,{{M3}},{..}>
<F=12,{{M1,M2,A1}},..>
<G=12,{{M2,M3,A2}},..>
18
Example of using ATMS on Diagnosis
M1
M2
M3
A2
A1 F
G
After F=10 observation
<A=3,{{}}>
<B=2,{{}}>
<C=2,{{}}>
<D=3,{{}}>
<E=3,{{}}>
<X=6,{{M1}}><X=4,{{A1, M2}}>
X
Y
Z
<Y=6,{{M2}}><Y=4,{{A1,M1}}>
<Z=6,{{M3}}>
<F=12,{{M1,M2,A1}}>
<G=12,{{M2,M3,A2}}><G=10,{{A1,A2,M1,M3}}>
<F=10,{{}}>
19
Example of using ATMS on Diagnosis
M1
M2
M3
A2
A1 F
G
After G=12 observation
<A=3,{{}}>
<B=2,{{}}>
<C=2,{{}}>
<D=3,{{}}>
<E=3,{{}}>
<X=6,{{M1}}><X=4,{{A1, M2}, {A1,A2,M3}}>
X
Y
Z
<Y=6,{{M2},{A2,M3}}><Y=4,{{A1,M1}}>
<Z=6,{{M3}},{A2,M2}}>
<Z=8,{{A1,M1,A2}}
<G=12,{{M2,M3,A2}}><G=10,{{A1,A2,M1,M3}}>
<F=10,{{}}>
<G=12,{{}}>
20
Summary ATMS remove the single-state limitation ATMS is an important technique for MBD Completeness and efficiency are issues for
implementation
21
Assignment 2Full adder in Reiter’s paper (figure 1), use the ATMS
principle to get the conflict sets (writing down all the justifications and labels for each step) and the minimal hitting set principle to get the minimal diagnoses under the observations:
Step1:Obs1: {in1(X1)=1; in2(X1)=0;in(A2)=1}Step2:Obs2: Obs1{out(x2)=1}Step3:Obs3: Obs2 {out(O1)=0}