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

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

#138 Allow multiple values in Set and SetBestMatch.

File size: 3.6 KB
Line 
1{
2 "specification": {
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": [
19 {
20 "Set": [
21 "phase",
22 [
23 {
24 "txt": "NUM2"
25 }
26 ]
27 ]
28 }
29 ]
30 },
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": [
46 {
47 "Set": [
48 "phase",
49 [
50 {
51 "txt": "askSum"
52 }
53 ]
54 ]
55 }
56 ]
57 },
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": [
73 {
74 "MySumFunction": [
75 "random1",
76 "random2",
77 "sum",
78 "correctAnswer"
79 ]
80 },
81 {
82 "SetBestMatch": [
83 "phase",
84 [
85 {
86 "value": [
87 {
88 "txt": "GOOD"
89 }
90 ],
91 "condition": {
92 "Equal": [
93 "correctAnswer",
94 {
95 "bool": true
96 },
97 0.5
98 ]
99 }
100 },
101 {
102 "value": [
103 {
104 "txt": "WRONG"
105 }
106 ],
107 "condition": {
108 "Equal": [
109 "correctAnswer",
110 {
111 "bool": false
112 },
113 0.5
114 ]
115 }
116 }
117 ]
118 ]
119 }
120 ]
121 },
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": [
134 {
135 "SetBestMatch": [
136 "phase",
137 [
138 {
139 "value": [
140 {
141 "txt": "END"
142 }
143 ],
144 "condition": {
145 "Equal": [
146 "retry",
147 {
148 "bool": false
149 },
150 0.5
151 ]
152 }
153 },
154 {
155 "value": [
156 {
157 "txt": "START"
158 }
159 ],
160 "condition": {
161 "Equal": [
162 "retry",
163 {
164 "bool": true
165 },
166 0.5
167 ]
168 }
169 }
170 ]
171 ]
172 }
173 ]
174 },
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": [
187 {
188 "SetBestMatch": [
189 "phase",
190 [
191 {
192 "value": [
193 {
194 "txt": "END"
195 }
196 ],
197 "condition": {
198 "Equal": [
199 "retry",
200 {
201 "bool": false
202 },
203 0.5
204 ]
205 }
206 },
207 {
208 "value": [
209 {
210 "txt": "START"
211 }
212 ],
213 "condition": {
214 "Equal": [
215 "retry",
216 {
217 "bool": true
218 },
219 0.5
220 ]
221 }
222 }
223 ]
224 ]
225 }
226 ]
227 }
228 }
229 },
230 "parameters": {
231 "values": {
232 "phase": {
233 "txt": "START"
234 }
235 }
236 }
237}
Note: See TracBrowser for help on using the repository browser.