source: dialogmanager/src/test/resources/dialogdemoWithAdd.json@ 1403

Last change on this file since 1403 was 442, checked in by wouter, 23 months ago

#138 Allow multiple values in Set and SetBestMatch.

File size: 3.6 KB
RevLine 
[45]1{
2 "specification": {
[436]3 "phases": {
4 "START": {
5 "stimulation": {
6 "Textual": {
7 "question": "Please enter a random number between 0 and 10."
8 }
9 },
10 "answer": {
11 "NumberAnswer": {
12 "parameter": "random1",
13 "min": 0,
14 "max": 10,
15 "stepsize": 0.0001
16 }
17 },
18 "evaluation": [
[45]19 {
[436]20 "Set": [
21 "phase",
[442]22 [
23 {
24 "txt": "NUM2"
25 }
26 ]
[436]27 ]
[45]28 }
[436]29 ]
[45]30 },
[436]31 "NUM2": {
32 "stimulation": {
33 "Textual": {
34 "question": "And please enter another random number between 0 and 10."
35 }
36 },
37 "answer": {
38 "NumberAnswer": {
39 "parameter": "random2",
40 "min": 0,
41 "max": 10,
42 "stepsize": 0.0001
43 }
44 },
45 "evaluation": [
[45]46 {
[436]47 "Set": [
48 "phase",
[442]49 [
50 {
51 "txt": "askSum"
52 }
53 ]
[436]54 ]
[45]55 }
[436]56 ]
[45]57 },
[436]58 "askSum": {
59 "stimulation": {
60 "Textual": {
61 "question": "Ok, what is their sum, so what is [random1] + [random2] ?"
62 }
63 },
64 "answer": {
65 "NumberAnswer": {
66 "parameter": "sum",
67 "min": 0,
68 "max": 20,
69 "stepsize": 0.0001
70 }
71 },
72 "evaluation": [
[45]73 {
[436]74 "MySumFunction": [
[442]75 "random1",
76 "random2",
77 "sum",
78 "correctAnswer"
79 ]
[436]80 },
81 {
82 "SetBestMatch": [
83 "phase",
84 [
85 {
[442]86 "value": [
87 {
88 "txt": "GOOD"
89 }
90 ],
[436]91 "condition": {
92 "Equal": [
[437]93 "correctAnswer",
[436]94 {
95 "bool": true
96 },
97 0.5
98 ]
[45]99 }
[436]100 },
101 {
[442]102 "value": [
103 {
104 "txt": "WRONG"
105 }
106 ],
[436]107 "condition": {
108 "Equal": [
[437]109 "correctAnswer",
[436]110 {
111 "bool": false
112 },
113 0.5
114 ]
[45]115 }
116 }
[436]117 ]
118 ]
119 }
120 ]
[45]121 },
[436]122 "GOOD": {
123 "stimulation": {
124 "Textual": {
125 "question": "Yes, [random1] + [random2] = [sum]! Try again?"
126 }
127 },
128 "answer": {
129 "TextAnswer": {
130 "parameter": "retry"
131 }
132 },
133 "evaluation": [
[45]134 {
[436]135 "SetBestMatch": [
136 "phase",
137 [
138 {
[442]139 "value": [
140 {
141 "txt": "END"
142 }
143 ],
[436]144 "condition": {
145 "Equal": [
146 "retry",
147 {
148 "bool": false
149 },
150 0.5
151 ]
[45]152 }
[436]153 },
154 {
[442]155 "value": [
156 {
157 "txt": "START"
158 }
159 ],
[436]160 "condition": {
161 "Equal": [
162 "retry",
163 {
164 "bool": true
165 },
166 0.5
167 ]
[45]168 }
169 }
[436]170 ]
171 ]
172 }
173 ]
[45]174 },
[436]175 "WRONG": {
176 "stimulation": {
177 "Textual": {
178 "question": "No, [random1] + [random2] is not [sum]... Try again?"
179 }
180 },
181 "answer": {
182 "TextAnswer": {
183 "parameter": "retry"
184 }
185 },
186 "evaluation": [
[45]187 {
[436]188 "SetBestMatch": [
189 "phase",
190 [
191 {
[442]192 "value": [
193 {
194 "txt": "END"
195 }
196 ],
[436]197 "condition": {
198 "Equal": [
199 "retry",
200 {
201 "bool": false
202 },
203 0.5
204 ]
[45]205 }
[436]206 },
207 {
[442]208 "value": [
209 {
210 "txt": "START"
211 }
212 ],
[436]213 "condition": {
214 "Equal": [
215 "retry",
216 {
217 "bool": true
218 },
219 0.5
220 ]
[45]221 }
222 }
[436]223 ]
224 ]
225 }
226 ]
[45]227 }
[436]228 }
[45]229 },
230 "parameters": {
231 "values": {
[436]232 "phase": {
[45]233 "txt": "START"
234 }
235 }
236 }
237}
Note: See TracBrowser for help on using the repository browser.