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