[solved] Flexible trial order -- adaptive designs
I'm looking into Opensesame's abilities regarding adaptive designs. What I want is, to use Opensesame to construct all my trial sequences, use its logging and other facilities, but I also to be able to dynamically decide what trial will run next, with what exact parameter setting, and how many trials there will be in total.
I thought I can simply use an inline script in a loop that will figure out what to do next, i.e. determine the next parameter combination, set the corresponding variables and potentially adjust the number of trials in a loop. The latter seems to be possible:
However, doing a self.experiment.set() in an inline script doesn't seem to be enough to communicate a a parameter to a predefined trial sequence. Without any variable definition in the loop Opensesame complains about an unknown variable. If I add a dummy definition
of this variable to the loop it doesn't complain anymore, but the set() has no effect on the remaining items in the trial sequence (inline script is first item in the sequence). I assume this is because the whole trial is somehow pre-crafted before it (and therefore the script) runs.
What is the best strategy to be able to use predefined trial sequences, but control trial order and trial parameters dynamically during the experiment?
Thanks in advance,