Millisecond Forums

Pseudo-random Trial Presentation

https://forums.millisecond.com/Topic34176.aspx

By ivy.c - 4/11/2022

Hello, 

I’m currently trying to create a pseudo-random order of the trials I present in a block (pasted below). Specifically, I would like the trials to be presented where there are no more than 5 consecutive “AX_Short_No” trials or two consecutive trials of another type (“AY_Short_No”, “BX_Short_No”, “BY_Short_No”).

<block shortnoreward_final>
/ preinstructions = (intro2)
/ trials = [1-100 = noreplace(AX_Short_No,AX_Short_No,AX_Short_No,AX_Short_No,BX_Short_No,AY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No)]
/ onblockend = [list.corrRT_baseline_short.sort(false,false);    
values.index = 3;
values.cutoff_RT = list.corrRT_baseline_short.item(values.index);
]
</block>

Any help regarding this would be much appreciated! Thank you!
By Dave - 4/11/2022

ivy.c - 4/11/2022
Hello, 

I’m currently trying to create a pseudo-random order of the trials I present in a block (pasted below). Specifically, I would like the trials to be presented where there are no more than 5 consecutive “AX_Short_No” trials or two consecutive trials of another type (“AY_Short_No”, “BX_Short_No”, “BY_Short_No”).

<block shortnoreward_final>
/ preinstructions = (intro2)
/ trials = [1-100 = noreplace(AX_Short_No,AX_Short_No,AX_Short_No,AX_Short_No,BX_Short_No,AY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No)]
/ onblockend = [list.corrRT_baseline_short.sort(false,false);    
values.index = 3;
values.cutoff_RT = list.corrRT_baseline_short.item(values.index);
]
</block>

Any help regarding this would be much appreciated! Thank you!

If you can come up with an algorithm that generates sequences adhering to these constraints, I can show you how to implement it. Other than that, there are no bullt-in means to achieve what you want.
By ivy.c - 4/11/2022

Dave - 4/11/2022
ivy.c - 4/11/2022
Hello, 

I’m currently trying to create a pseudo-random order of the trials I present in a block (pasted below). Specifically, I would like the trials to be presented where there are no more than 5 consecutive “AX_Short_No” trials or two consecutive trials of another type (“AY_Short_No”, “BX_Short_No”, “BY_Short_No”).

<block shortnoreward_final>
/ preinstructions = (intro2)
/ trials = [1-100 = noreplace(AX_Short_No,AX_Short_No,AX_Short_No,AX_Short_No,BX_Short_No,AY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No)]
/ onblockend = [list.corrRT_baseline_short.sort(false,false);    
values.index = 3;
values.cutoff_RT = list.corrRT_baseline_short.item(values.index);
]
</block>

Any help regarding this would be much appreciated! Thank you!

If you can come up with an algorithm that generates sequences adhering to these constraints, I can show you how to implement it. Other than that, there are no bullt-in means to achieve what you want.

Hi Dave,

Thanks for the response. Could you clarify what you mean by an algorithm on my end? My coding knowledge is rather limited!

Thank you!
By Dave - 4/11/2022

ivy.c - 4/11/2022
Dave - 4/11/2022
ivy.c - 4/11/2022
Hello, 

I’m currently trying to create a pseudo-random order of the trials I present in a block (pasted below). Specifically, I would like the trials to be presented where there are no more than 5 consecutive “AX_Short_No” trials or two consecutive trials of another type (“AY_Short_No”, “BX_Short_No”, “BY_Short_No”).

<block shortnoreward_final>
/ preinstructions = (intro2)
/ trials = [1-100 = noreplace(AX_Short_No,AX_Short_No,AX_Short_No,AX_Short_No,BX_Short_No,AY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No,BY_Short_No)]
/ onblockend = [list.corrRT_baseline_short.sort(false,false);    
values.index = 3;
values.cutoff_RT = list.corrRT_baseline_short.item(values.index);
]
</block>

Any help regarding this would be much appreciated! Thank you!

If you can come up with an algorithm that generates sequences adhering to these constraints, I can show you how to implement it. Other than that, there are no bullt-in means to achieve what you want.

Hi Dave,

Thanks for the response. Could you clarify what you mean by an algorithm on my end? My coding knowledge is rather limited!

Thank you!

An algorithm is a process or set of rules to be followed in calculations or other problem-solving operations: It generates a solution for a specific problem. If you can spell out a process, step-by-step, that generates a sequence "where there are no more than 5 consecutive “AX_Short_No” trials or two consecutive trials of another type (“AY_Short_No”, “BX_Short_No”, “BY_Short_No”)" then I can show you how to express that process in Inquisit syntax.