Repeat Trial

2,593 views
Skip to first unread message

Cherise R. Chin Fatt

unread,
Mar 30, 2011, 5:41:00 PM3/30/11
to e-p...@googlegroups.com
Hello:

Can someone please help me out with a part of my task? I need to repeat a trial until a correct response is given. I haven't been able to figure this out. I think it should be an inline, but I am not sure how to program this. Can someone help with this if possible?

Thank you,
Cherise. 

ben robinson

unread,
Mar 30, 2011, 7:48:37 PM3/30/11
to e-p...@googlegroups.com
you could even do this without an inline.
in the object collecting responses enable two separate Input Masks (they could both be the keyboard, or both the mouse, or whatever).  one instance of your Input Mask should have as its allowable response *only* the correct response, and its End Action should be set to Terminate.  the other Input Mask should have as its Allowable Response all other possible non-correct responses, and its End Action should be set to Jump.  fill in the Jump Label section with your Label's name, then place the Label right before your object which collects responses.  this should result in the program jumping back to the label immediately prior to your stimulus every time an incorrect response is received.

ben

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

Paul Groot

unread,
Mar 31, 2011, 2:17:07 AM3/31/11
to e-p...@googlegroups.com
Using more than one input mask is really an elegant solution that is
easy to implement. If you also would like to register the incorrect
responses in the output file, then this probably won't work without
some additional scripting. As an alternative you can also to the
following (copied from my post some days ago):

Another way to implement trial loops is to add an additional
‘level’ to your experiment by using an extra list object for the
repeating trials (i.e. place a new list object on the trial
procedure). This list will loop ‘forever’ by setting the ‘exit list’
parameter to high value. Then move all trial objects to the procedure
of this new list. Finally add a small inline script at the end of the
subtrial that will terminate the sublist when a specific condition is
met (i.e. if stim.ACC=1 then sublist.Terminate end if)

This sounds complicated, but is in fact very straightforward to do,
and also supports more complex constructs (like giving additional
instructions after one or more errors.)

Best
Paul


2011/3/31 ben robinson <baltim...@gmail.com>:

liwenna

unread,
Mar 31, 2011, 6:26:41 AM3/31/11
to E-Prime
Oi... I justed wanted to expres that I agree with Paul that the two
input masks solution is really elegant! I'd have never thought of
that, and always script in the jump to the label (then again I also
think that whenever I use this I also use the string hittest and
therefore could not use the inputmasks).



On 31 mrt, 02:17, Paul Groot <pfc.gr...@gmail.com> wrote:
> Using more than one input mask is really an elegant solution that is
> easy to implement. If you also would like to register the incorrect
> responses in the output file, then this probably won't work without
> some additional scripting. As an alternative you can also to the
> following (copied from my post some days ago):
>
> Another way to implement trial loops is to add an additional
> ‘level’ to your experiment by using an extra list object for the
> repeating trials (i.e. place a new list object on the trial
> procedure). This list will loop ‘forever’ by setting the ‘exit list’
> parameter to high value. Then move all trial objects to the procedure
> of this new list. Finally add a small inline script at the end of the
> subtrial that will terminate the sublist when a specific condition is
> met (i.e. if stim.ACC=1 then sublist.Terminate end if)
>
> This sounds complicated, but is in fact very straightforward to do,
> and also supports more complex constructs (like giving additional
> instructions after one or more errors.)
>
> Best
> Paul
>
> 2011/3/31 ben robinson <baltimore....@gmail.com>:

Cherise Chin Fatt

unread,
Mar 31, 2011, 1:41:33 PM3/31/11
to E-Prime
Thank you for all your help. I have one problem left- when an
incorrect response occurs, the trial isnt repeat... it goes to the top
of additional list (as you explained below). I cannot figure out how
to fix this problem. Maybe I didn't understand you fully- I added a
sublist which has all the trials. This list has a SubProc which has a
display and an inline.

I am sorry for the confusion. I am new to eprime, so I am now getting
accustom to the structure.

On Mar 31, 12:17 am, Paul Groot <pfc.gr...@gmail.com> wrote:
> Using more than one input mask is really an elegant solution that is
> easy to implement. If you also would like to register the incorrect
> responses in the output file, then this probably won't work without
> some additional scripting. As an alternative you can also to the
> following (copied from my post some days ago):
>
> Another way to implement trial loops is to add an additional
> ‘level’ to your experiment by using an extra list object for the
> repeating trials (i.e. place a new list object on the trial
> procedure). This list will loop ‘forever’ by setting the ‘exit list’
> parameter to high value. Then move all trial objects to the procedure
> of this new list. Finally add a small inline script at the end of the
> subtrial that will terminate the sublist when a specific condition is
> met (i.e. if stim.ACC=1 then sublist.Terminate end if)
>
> This sounds complicated, but is in fact very straightforward to do,
> and also supports more complex constructs (like giving additional
> instructions after one or more errors.)
>
> Best
> Paul
>
> 2011/3/31 ben robinson <baltimore....@gmail.com>:
> >http://groups.google.com/group/e-prime?hl=en.- Hide quoted text -
>
> - Show quoted text -

ben robinson

unread,
Mar 31, 2011, 2:35:11 PM3/31/11
to e-p...@googlegroups.com
try implementing my suggestion, cherise :)

have two Input Masks on the same object collecting responses:
InputMask1
    Allowable Responses set to *only* the correct response
    End Action set to Terminate.
InputMask2
    Allowable Responses set to all other possible responses
    End Action set to Jump
    Jump Label = Label1

then put Label1 immediately prior to the object collecting responses.  just try it.

ben

Cherise Chin Fatt

unread,
Mar 31, 2011, 2:38:10 PM3/31/11
to E-Prime
Hi Paul: thank you for your help as well. Would I be able to keep a
track of the incorrect responses using your method?

Thank you.

On Mar 31, 12:35 pm, ben robinson <baltimore....@gmail.com> wrote:
> try implementing my suggestion, cherise :)
>
> have two Input Masks on the same object collecting responses:
> InputMask1
>     Allowable Responses set to *only* the correct response
>     End Action set to Terminate.
> InputMask2
>     Allowable Responses set to all other possible responses
>     End Action set to Jump
>     Jump Label = Label1
>
> then put Label1 immediately prior to the object collecting responses.  just
> try it.
>
> ben
>
> > > >http://groups.google.com/group/e-prime?hl=en.-Hide quoted text -

David McFarlane

unread,
Mar 31, 2011, 2:55:25 PM3/31/11
to E-Prime
Nice discussion. And I agree that for this simple case these methods
are more elegant than the usual inline-code method (as shown in the
"Criterion Based Exit" example downloadable from the Samples area of
the PST web site).

As I understand it, Paul's method (using an inner trial List) should
automatically log each response, whether incorrect or correct, as
another row in your .edat file. Ben's method (just using a Jump
label), as it stands, should log only the final response, but with
judicious placement of inline code containing a c.Log command (see
the Context topic in the online E-Basic Help) you might get it to
record all responses. Each execution of c.Log generates a new line
in the .edat file, with the current values of all attributes.

-- David McFarlane, Professional Faultfinder

Paul Groot

unread,
Apr 3, 2011, 5:34:26 PM4/3/11
to e-p...@googlegroups.com
Here is a minimalistic example that uses an additional list to
implement repeating trials: (see attachment)
It was created with eprime 1.2, but it should also work when imported
in eprime 2.0

Paul.

RepeatUntilOK.es

Erin Spurgeon

unread,
Dec 20, 2013, 3:54:24 PM12/20/13
to e-p...@googlegroups.com
Hi Paul-

I realize this is an old thread, but I am struggling with a similar problem as Cherise.

I have two nested lists within a lexical decision experiment:  Practice (4 trials) and actual task (25 trials).  Both practice and task trials use the same procedure, just different stimuli.

The participants are young children, so I would like the participant to be able to repeat the practice trial list two more times, if necessary.  

I attempted to replicate the same strategy that you used in the file (RepeatUntilOk.es), but cannot seem to repeat the cycle of practice trials.  The practice list has 4 trials using lexical decision procedure, then I added fifth trial, 'CompCheck' that is a text slide logging either a '1' or '2' key response to repeat the trail list ('2'), or continue to the task trials ('1'). Following the text slide in this procedure is a inline code essentially identical to that in your example (sans the name of the Slide and List).  

I have set the 'Exit list' properties of the practice list to exit after 3 cycles.  I am not sure what the problem is, but I am not able to repeat the practice trial list.  I am not sure if this problem is due to two separate procedures embedded in the same parent list (Lexical Decision and CompCheck)?  I have tried to use the JumpLabel approach using two separate input masks, but it gets tricky given we are using a Tobii Eye tracking extension that requires a 'start tracking' and 'end tracking' package calls within the procedure line (that, is I cannot simply jump back to the slide that displays the two lexical items). 

I am sure this is a relatively simple question, but I am new to E-prime and would appreciate any suggestions you (or any other group members could offer).

Thanks,
Erin

Paul Groot

unread,
Dec 21, 2013, 6:02:12 PM12/21/13
to e-p...@googlegroups.com
Hi Erin,

I think your design is slightly different than the RepeatUntilOk.es example, but there are similarities. Adding the CompCheck procedure should not be a problem. Just to make sure that all properties are set correctly, you could try to set the weight of the CompCheck trial to zero. This will essentially skip the continue-test, and if all is OK, the practice list should repeat 3 cycles. Then you set the weight back to 1 and double check the inline script that terminates the practice list if button "1"is pressed in the CheckComp procedure. The inline should look like this:

If AskContinue.ACC=1 Then
PracticeList.Terminate
End If

The next thing to do is to set the 'correct' response property of the Text object (AskContinue in this example) to "1". Doing so will automatically set the response accuracy (ACC) to "1" if button 1 is pressed. A slightly different approach is to check the response itself:

If AskContinue.Resp=1 Then
PracticeList.Terminate
End If

That would give exactly the same behavior and there is no need to set the 'Correct' response property.

Best
Paul











--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.

To post to this group, send email to e-p...@googlegroups.com.

Jon

unread,
Sep 10, 2014, 2:07:22 PM9/10/14
to e-p...@googlegroups.com
The 2 input masks solution is great, but is there a way to do it so that the trial is repeated only if there is no response? In my experiment, it doesn't matter whether a trial is correct/incorrect, but there needs to be a response for each trial within a fixed time constraint after the stimulus.

swa...@sheffield.ac.uk

unread,
Jun 27, 2016, 7:16:04 AM6/27/16
to E-Prime
The two input masks has been really helpful for my own experimental design. However, I also need the stimulus to be presented in increasing intervals of 17ms until the participant correctly identifies this. Has anyone got any ideas how to achieve this please? Any help would be hugely appreciated.

Tina Xu

unread,
Nov 23, 2016, 3:55:26 PM11/23/16
to E-Prime
Thanks to everyone who provided a solution! 

I need some help with my experiment which has a similar but slightly different problem. For instance, there are 30 samples in the 1st List representing 30 trials, the participant would do the first 10 trials and get an accuracy to proceed to the 2nd List. (When the 2nd list is finished, the participant should do the next 10 trials in the 1st List and so on.) When the accuracy doesn't pass, I would like to have the participant do all of the 10 trials he just completed. In this case, how can I make it work? Thanks a lot in advance!

Best,
Tina
Reply all
Reply to author
Forward
0 new messages