[open] Simultaneously storing two Pseudo-probabilities
Hello all, first of all thank you Sebastiaan & Co. for this wonderful nifty program and the community that comes with it >- . I have recently began to build experiments with probabilities and am stumped on how to keep two pseudo-probabilities at the same time. I will try to be as clear as possible, using a cat example.
There are two buttons, when clicking on the left button a picture of either a Male or Female cat will appear, the same for the right button.
-However, the left button has a .75 probability of displaying the same gender of cat on subsequent trials as the previous trial (if male -> .75 it is male once left button is selected again and .25 it is female, if next trial is female(.25) then -> .75 female, .25 male for next trial etc. repeating throughout depending on which gender cat is [pseudo]randomly selected)
-Simultaneously, the right button has a .25 probability of displaying the same gender of cat on subsequent trials as the previous trial (if male -> .25 it is male once right button selected again and .75 it is female. following the same pattern as the other button but with inverted probabilities)
The trouble I am having: Having the male or female cats being selected from the picture pool with the (2)probabilities changing. I assume I have to create a list and store the previous probability and then retrieve that specific probability (either 1 or 2) corresponding to the buttons.
Let me know if I am not being clear, or if I am going about the methods all wrong. I appreciate feedback, thank you for reading.
-Felix
Comments
Hi Felix,
That's an interesting problem, with many possible solutions. Here's one:
First, at the start of the experiment, you assign a starting probability of a male cat. You can do this with a simple
inline_script
like this (in the prepare phase):Next, at the start of each trial, you choose a male or a female, based on this probability. If you have chosen a male, you set
p_male
to 1 (i.e. a male for sure), otherwise to 0 (i.e. certainly no male). You also set the experimental variablegender
, which you can use to select the appropriate pictures from the file pool (e.g.cat_[gender]_1.png
in OpenSesame script). This should be in the prepare phase of aninline_script
at the start of a trial.Finally, after you have collected a response, you re-determine
p_male
, based on whether a switch is likely or not. This should be in the run phase of aninline_script
at the end of a trial.Does that make sense? If think (something like) this should work.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Yes! that does indeed make sense, I will implement it asap.
Thank you for the help