{ "specification": { "phases": { "START": { "preparation": [ { "SetBestMatch": [ "question", [ { "value": [ { "txt": "Please enter a random number between 0 and 9." } ], "condition": { "Maybe": 1.0 } }, { "value": [ { "txt": "Can you give a random number, at least 0 and at most 9." } ], "condition": { "Maybe": 1.0 } } ] ] } ], "stimulation": { "Textual": { "question": "[question]" } }, "answer": { "NumberAnswer": { "parameter": "random", "min": -1000, "max": 1000, "stepsize": 1 } }, "evaluation": [ { "SetBestMatch": [ "phase", [ { "value": [ { "txt": "goodnum" } ], "condition": { "Equal": [ "random", { "num": 5.0 }, 5.0 ] } }, { "value": [ { "txt": "badnum" } ], "condition": { "Equal": [ "random", { "num": -5.0 }, 5.0 ] } }, { "value": [ { "txt": "badnum" } ], "condition": { "Equal": [ "random", { "num": 15.0 }, 5.0 ] } } ] ] } ] }, "goodnum": { "preparation": [ { "SetBestMatch": [ "question", [ { "value": [ { "txt": "Yes, [random] is between 0 and 9. Do you want to retry" } ], "condition": { "Maybe": 1.0 } }, { "value": [ { "txt": "[random] is correct. Try again" } ], "condition": { "Maybe": 1.0 } } ] ] } ], "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": { "Maybe": 1.0 } }, { "value": [ { "txt": "That was not a correct answer. Try again" } ], "condition": { "Maybe": 1.0 } } ] ] } ], "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" } } } }