FindingFive Discussion Forum
randomize stimuli - Printable Version

+- FindingFive Discussion Forum (http://discuss.findingfive.com)
+-- Forum: Researchers (http://discuss.findingfive.com/forumdisplay.php?fid=3)
+--- Forum: Study Grammar & Management (http://discuss.findingfive.com/forumdisplay.php?fid=5)
+--- Thread: randomize stimuli (/showthread.php?tid=58)



randomize stimuli - czeidan - 02-10-2021

Hello,
I need to randomize the order of all of my stimuli.
I have 6 conditions. There are two response options, "ACCEPTABLE" and "UNACCEPTABLE".
I have randomized the order of the 6 conditions/blocks and randomized the stimuli within each block. 
However, I would like the participants to see a random order of the stimuli, from all 6 blocks. 
Im hoping that explanation makes sense! I've copied some of my code below.

In Templates:
"TestTrialsQC":{
    "type": "basic",
    "visible": "true",
    "stimuli": ["1063QC", "1064QC", "1065QC", "1066QC", "1067QC", "1068QC", "1069QC", "1070QC", "1071QC"],
    "stimulus_pattern": {"order": "random"},
    "responses": ["ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE", "ACCEPTABLE"]

},
  "TestTrialsQI":{
    "type": "basic",
    "visible": "true",
    "stimuli": ["1072QI", "1073QI", "1074QI", "1075QI", "1076QI", "1077QI", "1078QI", "1079QI", "1080QI", "1081QI"],
    "stimulus_pattern": {"order": "random"},
    "responses": ["UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE", "UNACCEPTABLE"] 

In Procedure:
"TestTrialsQC": {
      "trial_templates": ["TestTrialsQC"],
      "stimulus_pattern": {"order": "random"}

"block_sequence": [{"$randomize": ["PracticeBlock", "TestTrialsCC","TestTrialsCI", "TestTrialsNC", "TestTrialsNI", "TestTrialsQC","TestTrialsQC"]}]


RE: randomize stimuli - Ting - 02-10-2021

Hi! Currently there are no way to randomize trials between blocks directly. But you can probably achieve what you want to do by putting everything in the same trial template. You can simplify your trial templates quite a bit - there's no need to list the same response repeatedly. Instead, take a look at the "response_pairing" feature under the "basic" trial template type: https://help.findingfive.com/api/trial-templates.html#basic. With the response pairing feature, you can list all the stimuli in the same template and randomize them like you do now.


RE: randomize stimuli - czeidan - 02-11-2021

Thank you very much!
I cleaned up the code quite a bit, however, I am getting an error about the 'definition of a block must be a dictionary'. I thought that I had all the necessary components for each block. Would you mind taking a look at it?
Im also not sure if I used the response_pairing correctly.

{
  "T1":{
    "type": "instruction",
    "stimuli": ["Instruction"],
    "duration": 5
},
  "T2":{
    "type": "instruction",
    "stimuli": ["EndInstruction"],
    "duration": 5
},
  "PracticeTrials":{
    "type": "basic",
    "visible": "true",
    "stimuli": ["1019P", "1020P"],
    "stimulus_pattern": {"order": "fixed"},
    "responses": ["ACCEPTABLE", "UNACCEPTABLE"]
},
  "TestTrials":{
    "type": "basic",
    "visible": "true",
    "stimuli": ["1021CC", "1022CC", "1023CC", "1024CC", "1025CC", "1026CC", "1028CC", "1029CC", "1030CC", "1031CC", "1042NC", "1043NC","1044NC", "1045NC", "1046NC", "1047NC", "1048NC", "1049NC", "1050NC", "1051NC", "1063QC", "1064QC", "1065QC", "1066QC", "1067QC", "1068QC", "1069QC", "1070QC", "1071QC", "1052NI", "1053NI", "1054NI", "1055NI", "1056NI", "1057NI", "1058NI", "1060NI", "1061NI","1072QI", "1073QI", "1074QI", "1075QI", "1076QI", "1077QI", "1078QI", "1079QI", "1080QI", "1081QI", "1032CI", "1033CI", "1034CI", "1035CI", "1036CI", "1037CI", "1038CI", "1039CI", "1040CI", "1041CI"],
    "stimulus_pattern": {"order": "random"},
    "response_pairing" : {"order": "partitioned"},
    "responses": ["ACCEPTABLE","UNACCEPTABLE"]
 
// 1027, 1059 does not exist ; skip
}
}

This is my Procedure:

{
  "type": "blocking",
  "blocks": {
    "PracticeBlock": {
      "trial_templates": ["PracticeTrials"],
      "pattern": {"order": "fixed"},
      "cover_trials": ["T1"],
      "end_trials": ["T2"]
},
  "TestTrials": {
      "trial_templates": ["TestTrials"],
      "stimulus_pattern": {"order": "random"}
   
},
 
    "block_sequence": ["PracticeBlock", "TestTrials"]

}
}


RE: randomize stimuli - Ting - 02-11-2021

You put "block_sequence" inside "blocks". It should be outside. See an example here: https://help.findingfive.com/api/procedures.html#basic-form


RE: randomize stimuli - czeidan - 02-22-2021

(02-11-2021, 12:25 PM)Ting Wrote: You put "block_sequence" inside "blocks". It should be outside. See an example here: https://help.findingfive.com/api/procedures.html#basic-form

Thank you very much! The task works now.