{ "specification": { "phases": { "START": { "preparation": [ { "SetBestMatch": [ "question", [ { "value": { "txt": "Please enter a random number between 0 and 9." }, "condition": { "values": { } } }, { "value": { "txt": "Can you give a random number, at least 0 and at most 9." }, "condition": { "values": { } } } ] ] } ], "stimulation": { "Textual": { "question": "[question]" } }, "answer": { "NumberAnswer": { "parameter": "random", "min": -1000, "max": 1000, "stepsize": 1 } }, "evaluation": [ { "SetBestMatch": [ "phase", [ { "value": { "txt": "goodnum" }, "condition": { "values": { "random": { "num": 4.5 } } } }, { "value": { "txt": "badnum" }, "condition": { "values": { "random": { "num": -4.5 } } } }, { "value": { "txt": "badnum" }, "condition": { "values": { "random": { "num": 13.5 } } } } ] ] } ] }, "goodnum": { "preparation": [ { "SetBestMatch": [ "question", [ { "value": { "txt": "Yes, [random] is between 0 and 9. Do you want to retry" }, "condition": { "values": { } } }, { "value": { "txt": "[random] is correct. Try again" }, "condition": { "values": { } } } ] ] } ], "stimulation": { "Textual": { "question": "[question]?" } }, "answer": { "BoolAnswer": { "parameter": "retry" } }, "evaluation": [ { "SetBestMatch": [ "phase", [ { "value": { "txt": "END" }, "condition": { "values": { "retry": { "bool": false } } } }, { "value": { "txt": "START" }, "condition": { "values": { "retry": { "bool": true } } } } ] ] } ] }, "badnum": { "preparation": [ { "SetBestMatch": [ "question", [ { "value": { "txt": "Nah, [random] is outside 0 to 9. Do you want to retry" }, "condition": { "values": { } } }, { "value": { "txt": "That was not a correct answer. Try again" }, "condition": { "values": { } } } ] ] } ], "stimulation": { "Textual": { "question": "[question]?" } }, "answer": { "BoolAnswer": { "parameter": "retry" } }, "evaluation": [ { "SetBestMatch": [ "phase", [ { "value": { "txt": "END" }, "condition": { "values": { "retry": { "bool": false } } } }, { "value": { "txt": "START" }, "condition": { "values": { "retry": { "bool": true } } } } ] ] } ] } } }, "parameters": { "values": { "phase": { "txt": "START" } } } }