Nao 6 QiChat: Check user Input for specific word and answer accordingly

48 Views Asked by At

The Plan: I want Nao to ask a quiz-question to the user. If the answer of the user contains a specifix word (in this case SME), i want him to say 'Correct'. If the answer doesn't contain SME, he should say 'Wrong'.

My Question: How can i check the user-answer for a specific word and answer accordingly.

topic: ~EnglishQuiz()
language: enu

u:([Question Quiz Quizquestion]) ^gotoRandom(quiz)

proposal:  %quiz What's the acronym of small-medium-sized enterprise?
u1:(SME) Correct, S M E stands for Small-Medium-Sized-Enterprise
u2:(#Here i need to check that the user said something else than SME) Wrong, it is S M E.

I tried different solutions from the documentation and cheat-sheet, but none worked for me. http://www.bx.psu.edu/~thanh/naoqi/naoqi/audio/dialog/aldialog_syntax_cheat_sheet.html http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/dialog-syntax_full.html#conditions

1

There are 1 best solutions below

0
On

I found the solution: It's just a single * but the order matters, so it has to be under the preferred answer.

topic: ~EnglishQuiz()
language: enu

u:([Question Quiz Quizquestion]) ^gotoRandom(quiz)

proposal:  %quiz What's the acronym of small-medium-sized enterprise?
u1:(SME) Correct, S M E stands for Small-Medium-Sized-Enterprise
u2:(*) Wrong, it is S M E.