{ "specification": { "phases": { "START": { "stimulation": { "Textual": { "question": "Please enter a random number between 0 and 10." } }, "answer": { "NumberAnswer": { "parameter": "random1", "min": 0, "max": 10, "stepsize": 0.0001 } }, "evaluation": [ { "Set": [ "phase", [ { "txt": "NUM2" } ] ] } ] }, "NUM2": { "stimulation": { "Textual": { "question": "And please enter another random number between 0 and 10." } }, "answer": { "NumberAnswer": { "parameter": "random2", "min": 0, "max": 10, "stepsize": 0.0001 } }, "evaluation": [ { "Set": [ "phase", [ { "txt": "askSum" } ] ] } ] }, "askSum": { "stimulation": { "Textual": { "question": "Ok, what is their sum, so what is [random1] + [random2] ?" } }, "answer": { "NumberAnswer": { "parameter": "sum", "min": 0, "max": 20, "stepsize": 0.0001 } }, "evaluation": [ { "MySumFunction": [ "random1", "random2", "sum", "correctAnswer" ] }, { "SetBestMatch": [ "phase", [ { "value": [ { "txt": "GOOD" } ], "condition": { "Equal": [ "correctAnswer", { "bool": true }, 0.5 ] } }, { "value": [ { "txt": "WRONG" } ], "condition": { "Equal": [ "correctAnswer", { "bool": false }, 0.5 ] } } ] ] } ] }, "GOOD": { "stimulation": { "Textual": { "question": "Yes, [random1] + [random2] = [sum]! Try again?" } }, "answer": { "TextAnswer": { "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 ] } } ] ] } ] }, "WRONG": { "stimulation": { "Textual": { "question": "No, [random1] + [random2] is not [sum]... Try again?" } }, "answer": { "TextAnswer": { "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" } } } }