Adaptive Patience Task

Since you already have a point/feedback system that works correctly, I would work off that rather than using a conditions file esp. since the change is a consistent percentage.

First initialize waitTime as 3 & timeChange as .05 in the Begin Experiment tab in the code component of your feedback system. Then in the tab where you decide that they have waited long enough and will increase the waitTime, just add an additional line that says something like waitTime = waitTime + (waitTime x timeChange), and similarly waitTime = waitTime - (waitTime x timeChange) as a line in your incorrect feedback section of code (you’ll also likely want to set a minimum waitTime to 3sec and if waitTime <= minTime & incorrect response, then waitTime == waitTime). This should then be up to date at the start of the next trial.
Then I’d assume you could put $waitTime in the “Start time” section of your keyboard stimulus.

Alternatively, you may be able to do it using conditions by doing something like waitTime = waitTime[-1] where you go back an index in waitTime sourced from your conditions file if they didn’t wait long enough for instance, but I’m not sure the mechanics of indexing from a conditions file, maybe someone else knows?

You could also try manipulating the staircase handler eg. here where you’d change the looptype to ‘staircase’ and may need additional code component to make sure it both decreases and increases as you need, but I haven’t experimented with that yet.

1 Like