| Reference | Downloads | Github

Include two experiment types in one

I’m creating one experiment with two threads (some participants get one type of experiment and some get another). They two share the same trials at the beginning but later on the setting will be different. Can I include these two in one? If so, how can I do it? Thanks

@CatK, if you have two separate loops for the different types of task, you can use outerloops to control whether or not those inner loops are presented, and this can be conditional based on your entries in the dialog box at the beginning of the task:

  • add a field to the dialog box in Experiment Settings e.g., condition, and add a list of possible conditions as a response e.g., ['a', 'b']. This will create a drop down menu for you to choose your condition.
  • Wrap your two differing loops in separate outerloops, each with names related to their condition e.g., loopA and loopB.
  • The presentation of the loop is controlled using the nReps field in each loop dialog box. Open each outer loop and set nReps to $presentConditionA for loopA, and $presentConditionB for loopB
  • Add a code component, and in the “Begin Experiment” tab, add:
if expInfo['condition'] == "a":
    presentConditionA = 1 
    presentConditionB = 0
elif expInfo['condition'] == "b": 
    presentConditionA = 0 
    presentConditionB = 1

Thank you! I’m really appreciative of all your help!