source: dialogmanager/src/test/resources/dialogdemo.json@ 741

Last change on this file since 741 was 445, checked in by wouter, 21 months ago

#139 replaced True with Maybe() which gives also the possibility to use "default value" in SetBestMatch

File size: 4.3 KB
Line 
1{
2 "specification": {
3 "phases": {
4 "START": {
5 "preparation": [
6 {
7 "SetBestMatch": [
8 "question",
9 [
10 {
11 "value": [
12 {
13 "txt": "Please enter a random number between 0 and 9."
14 }
15 ],
16 "condition": {
17 "Maybe": 1.0
18 }
19 },
20 {
21 "value": [
22 {
23 "txt": "Can you give a random number, at least 0 and at most 9."
24 }
25 ],
26 "condition": {
27 "Maybe": 1.0
28 }
29 }
30 ]
31 ]
32 }
33 ],
34 "stimulation": {
35 "Textual": {
36 "question": "[question]"
37 }
38 },
39 "answer": {
40 "NumberAnswer": {
41 "parameter": "random",
42 "min": -1000,
43 "max": 1000,
44 "stepsize": 1
45 }
46 },
47 "evaluation": [
48 {
49 "SetBestMatch": [
50 "phase",
51 [
52 {
53 "value": [
54 {
55 "txt": "goodnum"
56 }
57 ],
58 "condition": {
59 "Equal": [
60 "random",
61 {
62 "num": 5.0
63 },
64 5.0
65 ]
66 }
67 },
68 {
69 "value": [
70 {
71 "txt": "badnum"
72 }
73 ],
74 "condition": {
75 "Equal": [
76 "random",
77 {
78 "num": -5.0
79 },
80 5.0
81 ]
82 }
83 },
84 {
85 "value": [
86 {
87 "txt": "badnum"
88 }
89 ],
90 "condition": {
91 "Equal": [
92 "random",
93 {
94 "num": 15.0
95 },
96 5.0
97 ]
98 }
99 }
100 ]
101 ]
102 }
103 ]
104 },
105 "goodnum": {
106 "preparation": [
107 {
108 "SetBestMatch": [
109 "question",
110 [
111 {
112 "value": [
113 {
114 "txt": "Yes, [random] is between 0 and 9. Do you want to retry"
115 }
116 ],
117 "condition": {
118 "Maybe": 1.0
119 }
120 },
121 {
122 "value": [
123 {
124 "txt": "[random] is correct. Try again"
125 }
126 ],
127 "condition": {
128 "Maybe": 1.0
129 }
130 }
131 ]
132 ]
133 }
134 ],
135 "stimulation": {
136 "Textual": {
137 "question": "[question]?"
138 }
139 },
140 "answer": {
141 "BoolAnswer": {
142 "parameter": "retry"
143 }
144 },
145 "evaluation": [
146 {
147 "SetBestMatch": [
148 "phase",
149 [
150 {
151 "value": [
152 {
153 "txt": "END"
154 }
155 ],
156 "condition": {
157 "Equal": [
158 "retry",
159 {
160 "bool": false
161 },
162 0.5
163 ]
164 }
165 },
166 {
167 "value": [
168 {
169 "txt": "START"
170 }
171 ],
172 "condition": {
173 "Equal": [
174 "retry",
175 {
176 "bool": true
177 },
178 0.5
179 ]
180 }
181 }
182 ]
183 ]
184 }
185 ]
186 },
187 "badnum": {
188 "preparation": [
189 {
190 "SetBestMatch": [
191 "question",
192 [
193 {
194 "value": [
195 {
196 "txt": "Nah, [random] is outside 0 to 9. Do you want to retry"
197 }
198 ],
199 "condition": {
200 "Maybe": 1.0
201 }
202 },
203 {
204 "value": [
205 {
206 "txt": "That was not a correct answer. Try again"
207 }
208 ],
209 "condition": {
210 "Maybe": 1.0
211 }
212 }
213 ]
214 ]
215 }
216 ],
217 "stimulation": {
218 "Textual": {
219 "question": "[question]?"
220 }
221 },
222 "answer": {
223 "BoolAnswer": {
224 "parameter": "retry"
225 }
226 },
227 "evaluation": [
228 {
229 "SetBestMatch": [
230 "phase",
231 [
232 {
233 "value": [
234 {
235 "txt": "END"
236 }
237 ],
238 "condition": {
239 "Equal": [
240 "retry",
241 {
242 "bool": false
243 },
244 0.5
245 ]
246 }
247 },
248 {
249 "value": [
250 {
251 "txt": "START"
252 }
253 ],
254 "condition": {
255 "Equal": [
256 "retry",
257 {
258 "bool": true
259 },
260 0.5
261 ]
262 }
263 }
264 ]
265 ]
266 }
267 ]
268 }
269 }
270 },
271 "parameters": {
272 "values": {
273 "phase": {
274 "txt": "START"
275 }
276 }
277 }
278}
Note: See TracBrowser for help on using the repository browser.