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

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

#136 fixing dialogdemo. Almost working

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