Mworks selection variable

Hi Chris,
I’m having a weird issue with selection variables in mworks. I’ve defined a trial id selection variable which takes one of 560 values, and am extracting trial variables (stimulus location and category) from it. I’m doing this so that I have blocks of 560 trials in which I can control/balance the number of trials per stimulus condition. For instance, when the monkey aborts a trial, the last selection is rejected, while when the monkey completes a trial, it is accepted. What is happening instead is that the trial id is getting read out of the selection variable correctly for a while (several hundred trials), and suddenly, for every trial, the selection variable value is the same. However, the number of possible values has not yet been reached (i.e. trial number is < 560). Do you have any idea why it would get stuck in this way?
Thanks,
Rishi

Hi Rishi,

Do you have any idea why it would get stuck in this way?

Nothing comes to mind, but it certainly could be a bug. Can you send me a copy of your experiment so I can figure out what’s going on?

Thanks,
Chris

Hi Chris,
See attached mworks file. I’ve also pasted an example list of selected IDs
(inferred from the stimulus selections), so you can tell that it gets stuck
at some point.
Thanks,
Rishi

EX: 15060, 12050, 4030, 12010, 4060, 15040, 4000, 6050, 6000, 15060, 6030,
2060, 16010, 14030, 16020, 12000, 13070, 4050, 5000, 16030, 6070, 4050,
4000, 14020, 12060, 12060, 6010, 12060, 6000, 4060, 12060, 15010, 40,
15000, 16020, 6020, 16010, 12070, 16020, 40, 2010, 4070, 5000, 14060,
11030, 2030, 4030, 4020, 4020, 6040, 2040, 4030, 4010, 16020, 14000, 10060,
11060, 11060, 6050, 16010, 4050, 16070, 1060, 4000, 14000, 1040, 1020,
6010, 4030, 6030, 14070, 15070, 6000, 2040, 6050, 2070, 4000, 60, 14070,
16030, 4070, 5010, 6070, 4070, 6010, 13010, 10050, 50, 4010, 12050, 6000,
2030, 17030, 10050, 14000, 12000, 16040, 14020, 2000, 6030, 16000, 14030,
7010, 11060, 2070, 6040, 6050, 6010, 12000, 2050, 2010, 7050, 6020, 2050,
15000, 1020, 16040, 7020, 2060, 12070, 2030, 6030, 6010, 1060, 4000, 6070,
3060, 10060, 12010, 4050, 16030, 2030, 10, 15020, 7010, 6050, 12070, 1020,
10030, 14020, 2030, 50, 14010, 12060, 30, 2010, 4010, 7000, 11020, 4010,
2000, 10, 11070, 17040, 2050, 12040, 2010, 10040, 6000, 16050, 12040, 7020,
7040, 13060, 10030, 7030, 10060, 16070, 7050, 10020, 14050, 17020, 11070,
16050, 16010, 6040, 10020, 1000, 17000, 16000, 14050, 1050, 12000, 17040,
4010, 17060, 11040, 4020, 16030, 10060, 10040, 30, 12030, 12030, 14010,
1000, 7050, 10, 16030, 16010, 10020, 7040, 6020, 5070, 11030, 5060, 3040,
15060, 15040, 5040, 5070, 11020, 10010, 5020, 13000, 14070, 14070, 14070,
4030, 13060, 16050, 3020, 5040, 5020, 1030, 15030, 5040, 15020, 12030,
10010, 16050, 4050, 16070, 12070, 12050, 2040, 70, 10070, 11020, 11050,
15030, 4060, 12040, 14020, 7040, 7010, 13040, 1020, 10070, 11060, 3010,
17000, 11040, 5030, 14010, 15070, 5000, 15010, 17000, 10030, 13040, 1050,
2040, 14000, 14000, 30, 10040, 4070, 15030, 13020, 7010, 3020, 17020,
15000, 5070, 5040, 11020, 5070, 7000, 7000, 15040, 17030, 1030, 7040,
17050, 60, 7030, 50, 6020, 17030, 6020, 11030, 3020, 12010, 3060, 1070,
3040, 1070, 13000, 11070, 7030, 14030, 13050, 11050, 13060, 20, 13060,
7000, 7050, 6040, 1040, 11050, 11050, 11050, 11050, 11050, 11050, 11050,
11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050,
11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050,
11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050,
11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050,
11050, 11050, 11050, 11050, 11050, 11050, 11050, 11050

Hi Rishi,

As we discussed offline, I believe the issue here is a difference in behavior between accept_selections and reject_selections. Specifically, reject_selections implicitly calls next_selection, while accept_selections does not. Therefore, instead of unconditionally calling next_selection at the start of each trial, you should instead call next_selection only after accept_selections.

Has making this change resolved the issue for you?

Thanks,
Chris

Hi Chris,
Yes, this resolved the issue. Thanks again!
Best
Rishi