Millisecond Forums

Probabilistic reversal learning task in batch aborts prematurely even though script.abort(false)

https://forums.millisecond.com/Topic28816.aspx

By SabRV - 4/21/2020

Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina
By Dave - 4/21/2020

SabRV - 4/21/2020
Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>
By SabRV - 4/22/2020

Dave - 4/21/2020
SabRV - 4/21/2020
Hi Dave, I built this one in to abort the script after a participant spend a certain time on the task. I did not mean to abort the whole batch after this time. Is that still the reason why the batch aborts? Shouldn't the command than not be batch.abort() though?
Thanks in advance!

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>
By SabRV - 4/22/2020

Dave - 4/21/2020
SabRV - 4/21/2020
Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>

Hi Dave,
I used this command to abort the script of the PRL after the participant spent a certain time on the task, not to abort the whole batch. Wouldnt that then be / ontrialend = [ if (script.elapsedtime >= 1500000) batch.abort();] ? 

Thanks in advance,
Sabrina
By Dave - 4/22/2020

SabRV - 4/22/2020
Dave - 4/21/2020
SabRV - 4/21/2020
Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>

Hi Dave,
I used this command to abort the script of the PRL after the participant spent a certain time on the task, not to abort the whole batch. Wouldnt that then be / ontrialend = [ if (script.elapsedtime >= 1500000) batch.abort();] ? 

Thanks in advance,
Sabrina

script.abort() will terminate the whole batch.

If you want it to only terminate the currently running script, it ought to be script.abort(false).
By SabRV - 4/22/2020

Dave - 4/22/2020
SabRV - 4/22/2020
Dave - 4/21/2020
SabRV - 4/21/2020
Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>

Hi Dave,
I used this command to abort the script of the PRL after the participant spent a certain time on the task, not to abort the whole batch. Wouldnt that then be / ontrialend = [ if (script.elapsedtime >= 1500000) batch.abort();] ? 

Thanks in advance,
Sabrina

script.abort() will terminate the whole batch.

If you want it to only terminate the currently running script, it ought to be script.abort(false).

Oh! And it will still work that after the participant spent 1500000 ms on the PRL, the script will abort and the next task of the batch begins?
By Dave - 4/22/2020

SabRV - 4/22/2020
Dave - 4/22/2020
SabRV - 4/22/2020
Dave - 4/21/2020
SabRV - 4/21/2020
Hi all,
I have a batch including 6 files that are presented in a specific order. On 4th place the probabilistic reversal learning task (PRL) is situated, followed by 2 questionnaires. Now when testing the whole batch using monkey, the batch worked fine and ended with the 6th questionnaire. Also checking by means of CRTL+Q showed no problems. 
When going through the whole script by myself now, after finishing the PRL, the whole batch aborted, not presenting the 5th and 5th questionnaire. I made sure to disable the script.abort command in the PRL, but have no idea now what's going on. 
Could someone help?
Thanks so much in advance!

Best,
Sabrina

I think you missed this one:

<trial choice>
...
/ branch = [
    trial.feedback;
]
/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]
</trial>

Hi Dave,
I used this command to abort the script of the PRL after the participant spent a certain time on the task, not to abort the whole batch. Wouldnt that then be / ontrialend = [ if (script.elapsedtime >= 1500000) batch.abort();] ? 

Thanks in advance,
Sabrina

script.abort() will terminate the whole batch.

If you want it to only terminate the currently running script, it ought to be script.abort(false).

Oh! And it will still work that after the participant spent 1500000 ms on the PRL, the script will abort and the next task of the batch begins?

Yes, with script.abort(false), the PRL will terminate, and then the next script will start.