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

Last change on this file since 1353 was 445, checked in by wouter, 22 months ago

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

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