Skip to content

consider reset state runNumber when max run number is reached #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yfcc opened this issue May 14, 2020 · 2 comments
Open

consider reset state runNumber when max run number is reached #13

yfcc opened this issue May 14, 2020 · 2 comments

Comments

@yfcc
Copy link
Contributor

yfcc commented May 14, 2020

ARCADE/arcade/Core/State.m

Lines 113 to 114 in b609bdf

if obj.runNumber >= obj.maxRepetitions
nextState = obj.nextStateAfterMaxRepetitions;

Currently runNumber will no be reset in any case. A reset method would be helpful if the next state after max run number is some state before the current state. In this case the counter should be reset to zero.

Certainly a bit dangerous because it could results in infinite loop

@joschaschmiedt
Copy link
Collaborator

The obj.runNumber counter is reset for every trial, but indeed not within trial. Do you have a working example where that would be necessary, risking that you run into an infinite loop?

Implementing such a feature is not so difficult, but as a safeguard I'd want to provide an interactive cancel functionality with it.

@yfcc
Copy link
Contributor Author

yfcc commented May 19, 2020

The obj.runNumber counter is reset for every trial, but indeed not within trial. Do you have a working example where that would be necessary, risking that you run into an infinite loop?

The senerio i wanted to do this: at the start of a given trial show Klecks a image to relax and then after the freee viewing for 10 seconds do drift correction, and after that in the same trial to acquire fixation three times so taht i can validate the corrected gaze position. The flow would look like this:

pictureOn -> acqFix -> holdFix -> reward -> acqFix -> holdFix -> reward -> acqFix -> holdFix ->reward->ITI

In practice, because acqFix may fail and i usually give the monkeys 3 chances. So it may look like this:

acqFix -> tempStateWhenAcqFixFailed -> acqFix -> holdFix

In this case after the first reward i need to reset the counter for the acqFix state.

(i have implemented it in a different way so it is not particular important for this case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants