No randomisation when using method='random' in code based data.TrialHandler

You mean this one? :wink:

I’d suggest using a TrialHandler but only to get some of its features for free (like recording and saving the data for you). For an adaptive rather than fixed design like this, the TrialHandler won’t really help with selecting conditions though. Just set it up to run 32 trials, without supplying a trial list (not sure of the code for that, but just see what Builder generates if you specify an nReps of 32 and no conditions file).

But otherwise just manage the conditions to be selected on each iteration using your own code. You can see what I suggested in that post above (completely untested), or you might have a much more effective way of doing it.

The TrialHandler can easily be used for regular n-back tasks, as it provides a .getEarlierTrial(n=n) method that allows you to compare the current trial attributes with those n trials earlier.

1 Like