psychopy.org | Reference | Downloads | Github

Conditional Branching for Remote Association Test

#1

Win10, Standard Standalone

What are you trying to achieve?:

I am trying to achieve a conditional branching dependent on if the participant answer correct or incorrect. The experiment shows the Remote Association Test. This is where participants are shown three words and their task is to type a root word that linked all three words. An example is ‘cottage / swiss / cake’ is presented on the screen. Then they will type the correct word linked, which is the word ‘cheese’. l have already built this is PsychoPy on builder view with an xlxs file.

My aim is the run the experiment where if the participant types the correct answer, they are only show the correct message routine. Also, if the participant answer incorrectly, they are only shown the incorrect routine.

What did you try to make it work?

I have created 4 main routines which is circled by one loop. Experiment Trial 1 (where participants are shown the three associated words and input their text answer), Correct Answer message, Incorrect Answer Message and Pause block

In the Correct answer Message routine, I have added the code component. In the Begin Routine tab it says…

# only run this routine if the answer was correct:
if Typed_Answer1.keys != corrAns1:
    continueRoutine = False

In the Incorrect answer Message routine, I have added the code component. In the Begin Routine tab it says…

# only run this routine if the answer was wrong:
if Typed_Answer1.keys == corrAns1:
    continue_routine = False

I also have a textInputTest.xlsx file which has two columns named Word ( for the question) and corrAns (for the correct solution) which is attached to the loop around all routines.

What specifically went wrong when you tried that?:

The experiment only shows the incorrect routine. I am assuming the code component is not right. Any advice on how I can update anything of psychopy to get it up and running.

Thanks in advance!!!

0 Likes