Millisecond Forums

branch to trial works only the first time it is run

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

By eleonora_parr - 7/17/2021

Dear Inquisiters,
 There is something weird happening in my script. The sequence of the experiment is supposed to be 1) consent form 2)demographics 3) instructions 4) 2 practice trials 5) end of practice, wherein participants can click on "start experiment" OR on "reinstruct", and so they are supposed to come back to the instructions (3), then practice trials again (4) and end of practice (5). To do this, I simpy added on the trial end of practice this branch:
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
The problem is that this sequence works only for the first time. I 've tried to press TWICE on "reinstruct", and, while the first time everything works, the second time inquisit goes directly to the experiment, so, for example, if I want to do the practice three times, I can't. 
I attached the folder with 1) the script 2) all the files needed to run it 3) the last log file at this link:https://we.tl/t-diYlo5IyiT
 Anyone knows what's happening here?
Thank you so much!
By Dave - 7/19/2021

eleonora_parr - 7/17/2021
Dear Inquisiters,
 There is something weird happening in my script. The sequence of the experiment is supposed to be 1) consent form 2)demographics 3) instructions 4) 2 practice trials 5) end of practice, wherein participants can click on "start experiment" OR on "reinstruct", and so they are supposed to come back to the instructions (3), then practice trials again (4) and end of practice (5). To do this, I simpy added on the trial end of practice this branch:
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
The problem is that this sequence works only for the first time. I 've tried to press TWICE on "reinstruct", and, while the first time everything works, the second time inquisit goes directly to the experiment, so, for example, if I want to do the practice three times, I can't. 
I attached the folder with 1) the script 2) all the files needed to run it 3) the last log file at this link:https://we.tl/t-diYlo5IyiT
 Anyone knows what's happening here?
Thank you so much!

There is nothing weird here. On the first go-around, you land here per your <expt>'s /blocks:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

In  the endpractice block, you then /branch from  trial endPractice to trial instructions.

<trial endPractice>
/ pretrialpause = 500
/ stimulusframes = [1=endPractice, reinstruct, startexpt]
/ inputdevice = mouse
/ showmousecursor = true
/ validresponse = (startexpt, reinstruct)
/ monkeyresponse = ("startexpt")
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
</trial>

That is: You run an instance of trial instructions in <block endPractice>.

You are still here

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

and there is absolutely nothing in the script that would make you go back here:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

That's just not how this works. As scheduled, then, after block endPractice, the script advances to block pre per your <expt>'s /blocks.

To fix this, you ought to invoke the instructions->two practice blocks -> endinstructions sequence per /branch'ing at the block-level to begin with.
By eleonora_parr - 7/19/2021

Dave - 7/19/2021
eleonora_parr - 7/17/2021
Dear Inquisiters,
 There is something weird happening in my script. The sequence of the experiment is supposed to be 1) consent form 2)demographics 3) instructions 4) 2 practice trials 5) end of practice, wherein participants can click on "start experiment" OR on "reinstruct", and so they are supposed to come back to the instructions (3), then practice trials again (4) and end of practice (5). To do this, I simpy added on the trial end of practice this branch:
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
The problem is that this sequence works only for the first time. I 've tried to press TWICE on "reinstruct", and, while the first time everything works, the second time inquisit goes directly to the experiment, so, for example, if I want to do the practice three times, I can't. 
I attached the folder with 1) the script 2) all the files needed to run it 3) the last log file at this link:https://we.tl/t-diYlo5IyiT
 Anyone knows what's happening here?
Thank you so much!

There is nothing weird here. On the first go-around, you land here per your <expt>'s /blocks:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

In  the endpractice block, you then /branch from  trial endPractice to trial instructions.

<trial endPractice>
/ pretrialpause = 500
/ stimulusframes = [1=endPractice, reinstruct, startexpt]
/ inputdevice = mouse
/ showmousecursor = true
/ validresponse = (startexpt, reinstruct)
/ monkeyresponse = ("startexpt")
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
</trial>

That is: You run an instance of trial instructions in <block endPractice>.

You are still here

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

and there is absolutely nothing in the script that would make you go back here:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

That's just not how this works. As scheduled, then, after block endPractice, the script advances to block pre per your <expt>'s /blocks.

Hi Dave, and thanks for the explanation
What could be then a trick to make it loop as I planned? so that, everytime people would press reinstruct they can go back to instructions and practice trials all the times that they need so? 

Thank you
Eleonora
By Dave - 7/19/2021

eleonora_parr - 7/19/2021
Dave - 7/19/2021
eleonora_parr - 7/17/2021
Dear Inquisiters,
 There is something weird happening in my script. The sequence of the experiment is supposed to be 1) consent form 2)demographics 3) instructions 4) 2 practice trials 5) end of practice, wherein participants can click on "start experiment" OR on "reinstruct", and so they are supposed to come back to the instructions (3), then practice trials again (4) and end of practice (5). To do this, I simpy added on the trial end of practice this branch:
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
The problem is that this sequence works only for the first time. I 've tried to press TWICE on "reinstruct", and, while the first time everything works, the second time inquisit goes directly to the experiment, so, for example, if I want to do the practice three times, I can't. 
I attached the folder with 1) the script 2) all the files needed to run it 3) the last log file at this link:https://we.tl/t-diYlo5IyiT
 Anyone knows what's happening here?
Thank you so much!

There is nothing weird here. On the first go-around, you land here per your <expt>'s /blocks:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

In  the endpractice block, you then /branch from  trial endPractice to trial instructions.

<trial endPractice>
/ pretrialpause = 500
/ stimulusframes = [1=endPractice, reinstruct, startexpt]
/ inputdevice = mouse
/ showmousecursor = true
/ validresponse = (startexpt, reinstruct)
/ monkeyresponse = ("startexpt")
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
</trial>

That is: You run an instance of trial instructions in <block endPractice>.

You are still here

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

and there is absolutely nothing in the script that would make you go back here:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

That's just not how this works. As scheduled, then, after block endPractice, the script advances to block pre per your <expt>'s /blocks.

Hi Dave, and thanks for the explanation
What could be then a trick to make it loop as I planned? so that, everytime people would press reinstruct they can go back to instructions and practice trials all the times that they need so? 

Thank you
Eleonora

See the script attached to my previous reply.
By eleonora_parr - 7/19/2021

Dave - 7/19/2021
eleonora_parr - 7/19/2021
Dave - 7/19/2021
eleonora_parr - 7/17/2021
Dear Inquisiters,
 There is something weird happening in my script. The sequence of the experiment is supposed to be 1) consent form 2)demographics 3) instructions 4) 2 practice trials 5) end of practice, wherein participants can click on "start experiment" OR on "reinstruct", and so they are supposed to come back to the instructions (3), then practice trials again (4) and end of practice (5). To do this, I simpy added on the trial end of practice this branch:
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
The problem is that this sequence works only for the first time. I 've tried to press TWICE on "reinstruct", and, while the first time everything works, the second time inquisit goes directly to the experiment, so, for example, if I want to do the practice three times, I can't. 
I attached the folder with 1) the script 2) all the files needed to run it 3) the last log file at this link:https://we.tl/t-diYlo5IyiT
 Anyone knows what's happening here?
Thank you so much!

There is nothing weird here. On the first go-around, you land here per your <expt>'s /blocks:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

In  the endpractice block, you then /branch from  trial endPractice to trial instructions.

<trial endPractice>
/ pretrialpause = 500
/ stimulusframes = [1=endPractice, reinstruct, startexpt]
/ inputdevice = mouse
/ showmousecursor = true
/ validresponse = (startexpt, reinstruct)
/ monkeyresponse = ("startexpt")
/ branch = [if (trial.endPractice.response == "reinstruct") trial.instructions]
</trial>

That is: You run an instance of trial instructions in <block endPractice>.

You are still here

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

and there is absolutely nothing in the script that would make you go back here:

<expt >
/blocks=[1=Consent;2=demographics;3=instructions; 4-5=list.practice; 6=endpractice; 7=pre;8=acc;
]
</expt>

That's just not how this works. As scheduled, then, after block endPractice, the script advances to block pre per your <expt>'s /blocks.

Hi Dave, and thanks for the explanation
What could be then a trick to make it loop as I planned? so that, everytime people would press reinstruct they can go back to instructions and practice trials all the times that they need so? 

Thank you
Eleonora

See the script attached to my previous reply.

Sorry Dave, I completely missed it! It works now, Thanks!