Here some examples of randomized conditions and the ideas behind those can be found. For simplicity, I left out USFMapFactors
in all of them, which are however obviously required, just imagine all of the phases run on the same map.
I also provide StudySetup.json
declarations (which are by default collapsed for better readability) and can be used for testing, e.g., in the Study Framework Demo project.
Random
Fully If you have two factors and want to fully randomize the order of presentation of their combinations for different participants.
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: Random
) - Number: {1, 2} (
Mixing Order: Random
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | ||||||
---|---|---|---|---|---|---|
0 |
|
|
|
|
|
|
1 |
|
|
|
|
|
|
2 |
|
|
|
|
|
|
3 |
|
|
|
|
|
|
4 |
|
|
|
|
|
|
5 |
|
|
|
|
|
|
6 |
|
|
|
|
|
|
... |
Notice that after 6 runs orders will be repeated, so having a multiple of 6 participants would be recommended here. Also note that you can nicely see the Balanced Latin Square
structure here, having in each column and row each condition exactly once and having each condition being followed by every other condition exactly once!
EnBlock
Using If you want to have, e.g., always the same colored repetition next to each other, you can you EnBlock
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: EnBlock
) - Number: {1, 2} (
Mixing Order: Random
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "EnBlock",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | ||||||
---|---|---|---|---|---|---|
0 |
|
|
|
|
|
|
1 |
|
|
|
|
|
|
2 |
|
|
|
|
|
|
3 |
|
|
|
|
|
|
4 |
|
|
|
|
|
|
5 |
|
|
|
|
|
|
... |
InOrder
(potentially for multiple factors)
Using InOrder
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: InOrder
) - Number: {1, 2} (
Mixing Order: InOrder
) - Letter: {a, b, c} (
Mixing Order: Random
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "InOrder",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "InOrder",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Letter",
"Levels": [
"a",
"b",
"c"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
... |
Notice that the first inOrder
factor Color
is kept in order for all participants. Number
, however, while being kept in order for each level of Color
, jumps back and forth over the entire run.
EnBlock
, InOrder
and Random
Combining If you want to have, e.g., always the same colored repetition next to each other, you can you EnBlock
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: EnBlock
) - Number: {1, 2} (
Mixing Order: InOrder
) - Letter: {a, b} (
Mixing Order: Random
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "EnBlock",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "letter",
"Levels": [
"a",
"b"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "InOrder",
"Type": "Within",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
... |
NonCombined
: Adding randomness without creating aditional conditions
If the letter in the above example should simply add some randomness ut not increase the combinatorical blowup, NonCombined
can be used. This means that all combination of Color
and Number
are produced, but not all combinations Letter
with those.
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: EnBlock
) - Number: {1, 2} (
Mixing Order: InOrder
) - Letter: {a, b} (
Mixing Order: Random
,NonCombined: true
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "EnBlock",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "letter",
"Levels": [
"a",
"b"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": true
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "InOrder",
"Type": "Within",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | ||||||
---|---|---|---|---|---|---|
0 |
|
|
|
|
|
|
1 |
|
|
|
|
|
|
2 |
|
|
|
|
|
|
3 |
|
|
|
|
|
|
4 |
|
|
|
|
|
|
5 |
|
|
|
|
|
|
6 |
|
|
|
|
|
|
... |
Note that we only have 6 conditions here per run, instead of the 12 we had in the example above where NonCombied
was not used.
Between
-subject factors
So far all examples only used Within
-subject factors, where each participant should see all levels. However, Type
can also be set to Between
such that every participant only sees exactly one level of this factor.
- Color: {
🟠 ,🔵 ,🟢 } (Mixing Order: RandomOrder
,Type: Within
) - Number: {1, 2} (
Mixing Order: RandomOrder
,Type: Between
)
StudySetup.json
{
"Phases": [
{
"Name": "Study",
"Factors": [
{
"FactorName": "Map",
"Levels": [
"/Game/Maps/StudyMap1"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false,
"MapFactor": true
},
{
"FactorName": "TextColor",
"Levels": [
"Orange",
"Blue",
"Green"
],
"MixingOrder": "RandomOrder",
"Type": "Within",
"NonCombined": false
},
{
"FactorName": "Number",
"Levels": [
"1",
"2"
],
"MixingOrder": "RandomOrder",
"Type": "Between",
"NonCombined": false
}
],
"Dependent Variables": [
{
"Name": "Visibility",
"Required": true
},
{
"Name": "OtherData",
"Required": false
}
],
"Number Of Repetitions": 1,
"TypeOfRepetition": "SameOrder"
}
],
"PhasesToOrderRandomize": [],
"FadeConfig":
{
"StartFadedOut": true,
"FadeDuration": 2,
"FadeOutDuration": 1,
"FadeColor": "(R=0.000000,G=0.000000,B=0.000000,A=1.000000)"
},
"ExperimenterViewConfig":
{
"ShowHUD": true,
"ShowConditionsPanelByDefault": false,
"ShowExperimenterViewInSecondWindow": false,
"SecondWindowSizeX": 1920,
"SecondWindowSizeY": 1080,
"SecondWindowPosX": 1920,
"SecondWindowPosY": 0
},
"UseGazeTracker": "NotTracking"
}
participant # | |||
---|---|---|---|
0 |
|
|
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
... |
Notice that every participants either only sees 1
s or 2
s.
Here is the python script used to automatically generate those tables. In case new examples should be added:
WikiTableGenerator.py
orange = "🟠" #not shown correctly here but show correctly in gitlab Wiki
green = "🟢"
blue = "🔵"
def WriteHeader(numberCells):
outputlines = []
output = "| participant # |"
for i in range(numberCells):
output += " |"
outputlines.append(output)
output = "|"
for i in range(numberCells+1):
output += " --- |"
outputlines.append(output)
return outputlines
with open('GeneratedDebugRuns.txt') as f:
lines = f.readlines()
outputlines = []
for line in lines:
entries = line.split("\t")
if len(outputlines) == 0:
outputlines = WriteHeader(len(entries)-1)
outLine = "| "+str(entries[0])+" |"
for i in range(1, len(entries)):
condition = entries[i]
#color
if "Green" in condition:
outLine += " " + green
elif "Orange" in condition:
outLine += " " + orange
elif "Blue" in condition:
outLine += " " + blue
#number
if "_1" in condition:
outLine += " 1"
elif "_2" in condition:
outLine += " 2"
#letter
if "_a" in condition:
outLine += " a"
elif "_b" in condition:
outLine += " b"
elif "_c" in condition:
outLine += " c"
outLine += " |"
outputlines.append(outLine)
print(outputlines)
outFile = open('table.txt', 'w', encoding="utf-8")
for outline in outputlines:
outFile.write(outline+"\n")
outFile.close()