I need some ideas. I have exhausted all avenues and can’t find a topic or YouTube tutorial that will help. (If you have any words that might clarify my search, I am all ears!)
I am currently developing an experiment in PsychoPy that involves multiple complex elements, and while some parts are functioning well, I need guidance and resources for the more challenging sections. Specifically, I need help with the following components:
Tracking and Storing Participant Choices:
Set up: Using an inner loop to randomize 75 decisions for high effort/high reward conditions (so vary effort 2-6 and reward 2-6 separately).
Need to track participant choices and tie them together effectively (reward+effort) without overwriting previous data (e.g., Participant chose 4 reward levels and 6 effort levels, and then the next trail).
In addition, I need to pick one of these choices and 70-80% of the time, I want that to be an easier/higher-reward option.
Based on this choice, I want to display the correct passage (effort level) and the number of coins based on the reward Level.
Other minor issues.
Randomizing Routine Appearance:
-Want to show reading passage routine randomly for 8 out of 75 trials (or skip whatever is easier).
-Examples of random routine presentation in PsychoPy and how to implement conditional logic for routine appearance.
Alternating Presentation Locations:
-I need to alternate the presentation of the locations of my choices (left or right). The choices are shown through 2 png; since I have two choices, then four pngs I need to move.
-Tutorials or examples on positioning multiple stimuli dynamically in PsychoPy.
OS: Win11 PsychoPy version: v2023.2.3 Standard Standalone? (y/n): yes
Your initial post contains too much to addess. Let’s start from the top.
Do you want independent randomisation of effort and reward conditions or equal numbers of all 25 possibilities? If the former then you should look at independent randomisation. If the latter then you could have a spreadsheet with 25 rows and two columns effort and reward and loop through it 3 times.
Hi. I have this set up. With an inner loop set to random with an Excel sheet with 75 decisions (so RewardLevel = 1,2,3… so on, EffortLevel = 1,2…so on with all possible combinations). I think this will work. Do you think so?
I am concerned that it will cause:
the two loops interfering with each other (my outer loop is set to random with an Excel sheet with the passages in; it includes 1 similar column called effl setting effort image, which is the same as the inner loop).
How do I get it to store the information of which effort/reward level chosen? And wil that work across both loops since I will need it to store choices made form the inner loop excel sheet and use the outer one to get the passage (if they have to read).
Hopefully this makes sense. Thank you so much for your help.
If you have 75 passages which you want to randomly allocate the to the 25 combinations of effort and reward then we are back to independent randomisation.
See Independent Randomisation but you might like to also look at Trial Switching or PsychoPy Code Component Snippets - Google Docs for the code to preload the sentences without using a loop.
Yes, but the probelm is I only have 65 passages and I don’t want them to read all of those passages. Only 8 of them. But there is a possible 65 passages that they may read (depending also on thier decisions. If that makes sense.
I will have a look at the Google doc (I think I’ve used it before) and independent randomisation
Hmmm. That could work. I want to read 8 (of the 65 passages) in 8 of the 75 decisions (which could be done by 3x25 effort/reward combinations). Would that work similar?
Why 8 of 75 and not 8 of 25? Surely you don’t want to risk getting repetitions of the same effort/reward combinations? Personally I’m surprised that you aren’t using 9 passages and displaying 3 levels of reward x 3 levels of effort to give a complete factorial design.
Hi. Yes, I need repetitions. 75 decisions are the norm in this effort discounting paradigm, so I am working with that (since the more decision data I get, the better). The execution of the passages isn’t as important as we are just teaching the kids that their decisions matter (which is why I want it to happen randomly, presenting a text between some decisions). I could use nine passages; all that matters is the child randomly encounters associated passages for 5-10% of the choices. We want to display the decisions that are the highest in the reward but the lowest in effort. We are also using computational modelling for this.
Okay. I have solved the alternating presentation location:
In my inner lope, I had two columns with baseLoc (the baseline option) and altLoc (the alternative option). In those columns, I alternate left and right.
Then, in the routine before, I added a code snippet. Tip: make sure this routine is inside the loop with your excel sheet.