Hi Josh,
when using TrialManager, how can I integrate an anti-bias algorithm into my protocol?
When using RunStateMachine it's possible to use something similar to the TotalRewardDisplay:
if ~isnan(BpodSystem.Data.RawEvents.Trial{currentTrial}.States.LeftReward(1))
TotalLeftRewards = TotalLeftRewards +1;
But with TrialManager I can't use this, because the RawEvents only get transmitted at the end of the trial so it doesn't already load the changed "TotalLeftRewards" for the next trial (but only for the one after that).
How can I use currentTrialEvents = getCurrentEvents(TriggerStates) to update a variable to make an anti-bias algorithm with TrialManager in which the amount of times a state happened are counted and change the following trial?