-
Notifications
You must be signed in to change notification settings - Fork 2
/
CVTestFileKBFold2.txt
219 lines (183 loc) · 13.5 KB
/
CVTestFileKBFold2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
% Logic for desired semantics: Zadeh or Lukasiewicz
(define-fuzzy-logic zadeh)
% Concepts and Relations
(define-primitive-concept User *top* )
(define-primitive-concept Object *top* ) %disjunctive?
(define-primitive-concept Activity *top*)
(define-primitive-concept SubActivity *top*) %%%%%%%
% Properties
(range performsActivity Activity)
(domain performsActivity User)
(range performsSubActivity SubActivity)
(domain performsSubActivity User)
(range usesObject Object)
(domain usesObject SubActivity)
% Abstract roles (data properties):
(functional hasStartFrame)
(functional hasEndFrame)
(range hasStartFrame *integer* 0 100000)
(range hasEndFrame *integer* 0 100000 )
(range hasPosX *real* 0 100000)
(range hasPosY *real* 0 100000 )
(range hasPosZ *real* 0 100000)
% SubActivities: reaching, moving, pouring, eating, drinking, opening, placing, closing, scrubbing, null
(define-primitive-concept reaching SubActivity)
(define-primitive-concept moving SubActivity)
(define-primitive-concept pouring SubActivity)
(define-primitive-concept eating SubActivity)
(define-primitive-concept drinking SubActivity)
(define-primitive-concept opening SubActivity)
(define-primitive-concept placing SubActivity)
(define-primitive-concept closing SubActivity)
(define-primitive-concept cleaning SubActivity) %scrubbing in the paper
(define-primitive-concept null SubActivity)
% Activities
(define-primitive-concept cereal Activity)
(define-primitive-concept medicine Activity)
(define-primitive-concept stacking Activity)
(define-primitive-concept unstacking Activity)
(define-primitive-concept microwave Activity)
(define-primitive-concept bending Activity)
(define-primitive-concept cleaningObjects Activity) %cleaning in the dataset file
(define-primitive-concept takeout Activity)
(define-primitive-concept arrangingObjects Activity) % placing in the dataset file
(define-primitive-concept eatingMeal Activity) % eating in the dataset file
(define-primitive-concept nullA Activity)
%%% Object categories
(define-primitive-concept stackable Object)
(define-primitive-concept drinkingKitchenware Object)
(define-primitive-concept pickable Object)
(define-primitive-concept containerKitchenware Object) % can be fixed with kitchenware and (not cutlery). Add pickable?
(define-primitive-concept arrangeable Object) %
% Objects
(define-concept book (and arrangeable pickable))
(define-concept bowl (and pickable stackable drinkingKitchenware containerKitchenware))
(define-concept box (and stackable pickable arrangeable containerKitchenware))
(define-concept cloth Object)
(define-concept cup (and drinkingKitchenware containerKitchenware))
(define-concept medicineBox Object)
(define-concept microwave Object)
(define-concept milk Object)
(define-concept plate (and stackable containerKitchenware))
(define-concept remote pickable)
(define-concept nullObject Object)
% IN CRISP CASE ALL INSTANTIATIONS HAVE DEGREE OF TRUTH 1
(instance Natalia User 1.0 )
(instance Micke User 1.0 )
% RULES %%%%%%%%%%% We assume each rule has associated a specific time-window where the activities need to be detected.
% Correct way of defining compound concepts:
(define-concept reach (g-and User (some performsSubActivity reaching)))
(define-concept move (g-and User (some performsSubActivity moving)))
(define-concept eat (g-and User (some performsSubActivity eating)))
(define-concept drink (g-and User (some performsSubActivity drinking)))
(define-concept place (g-and User (some performsSubActivity placing)))
(define-concept pour (g-and User (some performsSubActivity pouring)))
(define-concept open (g-and User (some performsSubActivity opening)))
(define-concept close (g-and User (some performsSubActivity closing)))
(define-concept clean (g-and User (some performsSubActivity cleaning))) % scrubbing in the paper
(define-concept nullSA (g-and User (some performsSubActivity null)))
%%%% RULES DEFINITION
(define-concept reachMilk (g-and User (some performsSubActivity (g-and reaching (some usesObject milk )))))
(define-concept reachBowl (g-and User (some performsSubActivity (g-and reaching (some usesObject bowl )))))
(define-concept reachBox (g-and User (some performsSubActivity (g-and reaching (some usesObject box ))))) % one extra reach, which?
(define-concept moveBowl (g-and User (some performsSubActivity (g-and moving (some usesObject bowl )))))
(define-concept moveMilk (g-and User (some performsSubActivity (g-and moving (some usesObject milk )))))
(define-concept moveBox (g-and User (some performsSubActivity (g-and moving (some usesObject box )))))
(define-concept placeBowl (g-and User (some performsSubActivity (g-and placing (some usesObject bowl )))))
(define-concept placeBox (g-and User (some performsSubActivity (g-and placing (some usesObject box )))))
(define-concept placeMilk (g-and User (some performsSubActivity (g-and placing (some usesObject milk )))))
(define-concept openMilkOrBox (g-and User (some performsSubActivity (g-and opening (some usesObject (or milk box))))))
(define-concept pourMilkInBowl (g-and User (some performsSubActivity (g-and pouring (some usesObject (or milk bowl))))))
(define-concept reachMilkOrBowlOrBox (g-and User (some performsSubActivity (g-and reaching (some usesObject (or milk bowl box))))))
(define-concept moveMilkOrBowlOrBox (g-and User (some performsSubActivity (g-and moving (some usesObject (or box milk bowl))))))
(define-concept placeMilkOrBowlOrBox (g-and User (some performsSubActivity (g-and placing (some usesObject (or box milk bowl))))))
(define-concept pourMilkOrBox (g-and User (some performsSubActivity (g-and pouring (some usesObject (or milk box)))))) % and?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachCup (g-and User (some performsSubActivity (g-and reaching (some usesObject cup )))))
(define-concept reachMedicineBox (g-and User (some performsSubActivity (g-and reaching (some usesObject medicineBox )))))
(define-concept openMedicineBox (g-and User (some performsSubActivity (g-and opening (some usesObject medicineBox )))))
(define-concept moveMedicineBox (g-and User (some performsSubActivity (g-and moving (some usesObject medicineBox )))))
(define-concept moveCup (g-and User (some performsSubActivity (g-and moving (some usesObject cup )))))
(define-concept eatMedicineBox (g-and User (some performsSubActivity (g-and eating (some usesObject medicineBox )))))
(define-concept placeCupOrMedicineBox (g-and User (some performsSubActivity (g-and placing (some usesObject (or cup medicineBox ))))))
(define-concept drinkCup (g-and User (some performsSubActivity (g-and drinking (some usesObject cup ))))) % drink while having pill ?
(define-concept reachCupOrMedicineBox (g-and User (some performsSubActivity (g-and reaching (some usesObject (or cup medicineBox ))))))
(define-concept moveCupOrMedicineBox (g-and User (some performsSubActivity (g-and moving (some usesObject (or cup medicineBox ))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachStackable (g-and User (some performsSubActivity (g-and reaching (some usesObject stackable)))))
(define-concept moveStackable (g-and User (some performsSubActivity (g-and moving (some usesObject stackable)))))
(define-concept placeStackable (g-and User (some performsSubActivity (g-and placing (some usesObject stackable)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachMicro (g-and User (some performsSubActivity (g-and reaching (some usesObject microwave )))))
(define-concept moveDrinkingKitchenwareOrBox (g-and User (some performsSubActivity (g-and moving (some usesObject (or drinkingKitchenware box) )))))
(define-concept placeDrinkingKitchenwareOrBox (g-and User (some performsSubActivity (g-and placing (some usesObject (or drinkingKitchenware box ))))))
(define-concept openMicro (g-and User (some performsSubActivity (g-and opening (some usesObject microwave )))))
(define-concept closeMicro (g-and User (some performsSubActivity (g-and closing (some usesObject microwave )))))
(define-concept reachMicroOrDrinkingKitchenwareOrBox (g-and User (some performsSubActivity (g-and reaching (some usesObject (or microwave drinkingKitchenware box ))))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachPickable (g-and User (some performsSubActivity (g-and reaching (some usesObject pickable )))))
(define-concept movePickable (g-and User (some performsSubActivity (g-and moving (some usesObject pickable )))))
% how to specify same object for two different axioms? (and binary or ternary operator?) % add object to nullSA?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachMicroOrCloth (g-and User (some performsSubActivity (g-and reaching (some usesObject (or microwave cloth )))))) %% ADD OR/2 ENTRIES?
(define-concept moveCloth (g-and User (some performsSubActivity (g-and moving (some usesObject cloth ))))) % move other objects?
(define-concept placeCloth (g-and User (some performsSubActivity (g-and placing (some usesObject cloth )))))
(define-concept cleanMicroOrCloth (g-and User (some performsSubActivity (g-and closing (some usesObject (or microwave cloth ))))))
(define-concept cleanMicro (g-and User (some performsSubActivity (g-and cleaning (some usesObject microwave ))))) % y cloth?
(define-concept cleanCloth (g-and User (some performsSubActivity (g-and cleaning (some usesObject cloth )))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%(define-concept reachContainerKitchenware (g-and User (some performsSubActivity (g-and reaching (some usesObject containerKitchenware )))))
(define-concept reachContainerKitchenwareOrMicro (g-and User (some performsSubActivity (g-and reaching (some usesObject (or microwave containerKitchenware ))))))
(define-concept moveContainerKitchenware (g-and User (some performsSubActivity (g-and moving (some usesObject containerKitchenware )))))
(define-concept placeContainerKitchenware (g-and User (some performsSubActivity (g-and placing (some usesObject containerKitchenware ))))) % mejor con openContainerAndMicro?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(define-concept reachArrangeable (g-and User (some performsSubActivity (g-and reaching (some usesObject arrangeable)))))
(define-concept moveArrangeable (g-and User (some performsSubActivity (g-and moving (some usesObject arrangeable)))))
(define-concept placeArrangeable (g-and User (some performsSubActivity (g-and placing (some usesObject arrangeable)))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % in practice, kitchenware including cutlery, but plates is only used once (unstacking object)
(define-concept placeCup (g-and User (some performsSubActivity (g-and placing (some usesObject cup )))))
(define-concept eatCup (g-and User (some performsSubActivity (g-and eating (some usesObject cup )))))
(define-concept antecedent1 (w-sum (0.16 reachMilkOrBowlOrBox)(0.41 moveMilkOrBowlOrBox)(0.24 placeMilkOrBowlOrBox)(0.16 pourMilkOrBox)))
(define-concept consequent1 (g-and User (some performsActivity cereal)))
(define-concept antecedent2 (w-sum (0.33 reachCupOrMedicineBox)(0.27 moveCupOrMedicineBox)(0.09 placeCupOrMedicineBox)(0.12 openMedicineBox)(0.09 eatMedicineBox)(0.09 drinkCup)))
(define-concept consequent2 (g-and User (some performsActivity medicine)))
(define-concept antecedent3 (w-sum (0.25 reachStackable)(0.28 moveStackable)(0.28 placeStackable)(0.19 nullSA)))
(define-concept consequent3 (g-and User (some performsActivity stacking)))
(define-concept antecedent4 (w-sum (0.26 reachStackable)(0.32 moveStackable)(0.26 placeStackable)(0.16 nullSA)))
(define-concept consequent4 (g-and User (some performsActivity unstacking)))
(define-concept antecedent5 (w-sum (0.33 reachMicroOrDrinkingKitchenwareOrBox)(0.11 moveDrinkingKitchenwareOrBox)(0.11 placeDrinkingKitchenwareOrBox)(0.11 openMicro)(0.11 closeMicro)(0.22 nullSA)))
(define-concept consequent5 (g-and User (some performsActivity microwaving)))
(define-concept antecedent6 (w-sum (0.25 reachPickable)(0.25 movePickable)(0.5 nullSA)))
(define-concept consequent6 (g-and User (some performsActivity bending)))
(define-concept antecedent7 (w-sum (0.31 reachMicroOrCloth)(0.22 moveCloth)(0.09 placeCloth)(0.09 openMicro)(0.09 closeMicro)(0.09 cleanMicroOrCloth)(0.09 nullSA)))
(define-concept consequent7 (g-and User (some performsActivity cleaningObjects)))
(define-concept antecedent8 (w-sum (0.38 reachContainerKitchenwareOrMicro)(0.12 moveContainerKitchenware)(0.12 placeContainerKitchenware)(0.12 openMicro)(0.12 closeMicro)(0.12 nullSA)))
(define-concept consequent8 (g-and User (some performsActivity takeout)))
(define-concept antecedent9 (w-sum (0.25 reachArrangeable)(0.25 moveArrangeable)(0.25 placeArrangeable)(0.25 nullSA)))
(define-concept consequent9 (g-and User (some performsActivity arrangingObjects)))
(define-concept antecedent10 (w-sum (0.48 moveCup)(0.17 eatCup)(0.06 drinkCup)(0.29 nullSA)))
(define-concept consequent10 (g-and User (some performsActivity eatingMeal)))
(define-concept Rule1 (l-implies antecedent1 consequent1 ) )
(instance Natalia Rule1)
(define-concept Rule2 (l-implies antecedent2 consequent2 ) )
(instance Natalia Rule2)
(define-concept Rule3 (l-implies antecedent3 consequent3 ) )
(instance Natalia Rule3)
(define-concept Rule4 (l-implies antecedent4 consequent4 ) )
(instance Natalia Rule4)
(define-concept Rule5 (l-implies antecedent5 consequent5 ) )
(instance Natalia Rule5)
(define-concept Rule6 (l-implies antecedent6 consequent6 ) )
(instance Natalia Rule6)
(define-concept Rule7 (l-implies antecedent7 consequent7 ) )
(instance Natalia Rule7)
(define-concept Rule8 (l-implies antecedent8 consequent8 ) )
(instance Natalia Rule8)
(define-concept Rule9 (l-implies antecedent9 consequent9 ) )
(instance Natalia Rule9)
(define-concept Rule10 (l-implies antecedent10 consequent10 ) )
(instance Natalia Rule10)
(define-concept Rules (g-or Rule1 Rule2 Rule3 Rule4 Rule5 Rule6 Rule7 Rule8 Rule9 Rule10 ))
(instance Natalia Rules)
% Is the KB satisfiable?
(sat?)