Welcome! Log In Create A New Profile

Advanced

How to change ITI dynamically during a task/session? (as opposed to a set ITI value)

Posted by apersello34 
I'm wondering if there's a way to make the Inter-Trial Interval change for each trail in a given task/session? I'm hoping to make it as a (mathematical) function of the Trial number. E.G., ITI after Trial 1 is 2 seconds, ITI after Trial 2 is 4 seconds, and so on (for ITI = 2*Trial#)

I'm working on designing a basic initial task for my monkey (this will be the first task he'll ever see). I'm basing it mainly off the 'joy_training1' task, with some modifications.

During a trial, a large green square would be visible, and the monkey can move the joystick to get a reward. Once the reward is given, the trial ends. The initial ITI would be very short, but after many subsequent successful trials, the ITI would grow (so that the monkey can't get too much reward, and so he can start to learn that he only gets the reward when the green square is present).

Ideally, the ITI would be a logistic function of Trial number (for a number of reasons). I know what the (mathematical) logistic function would be (it would just require calling the Trial Number somehow), but I'm not sure how/where to implement it.

The specific logistic equation I'm hoping to use is:
ITI = Max ITI / (1 + e^(-k(Trial # - midpoint of max Trial #)))

(a new ITI is calculated for each trial)

Most of the variables in this equation are arbitrary and I could directly specify them. However, the "Trial #" variable would change throughout the session, so it would need to be called automatically.


Is there a way to do this, or can the ITI only be set as a single number?
Thanks that worked!

This is the code I ended up using:

% Logistic Function for ITI

maxITI = 10000; % Longest ITI you want in milliseconds (only approached at the final trials)
NumofTrials = 75; % How many total trials you want
k = log(maxITI)/(NumofTrials/2); % Steepness of Curve (Can be changed via addition of an arbitrary coefficient)
editable('maxITI','NumofTrials');


iti = maxITI/(1 + exp(-k*(TrialRecord.CurrentTrialNumber - (NumofTrials/2))));
set_iti(iti);



I put it at the end of the timing script after run_scene() of joy_training1.m

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.