Integrating a practice block that contains randomized blocks with task containing randomized blocks


Integrating a practice block that contains randomized blocks with task...
Author
Message
jahughes81
jahughes81
Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hello,


I am trying to figure out how to create a practice block that contains a randomized set of 4 blocks that precedes the actual experiment that is exactly the same except that it contains more trials per block. The only examples I can find online only randomize trials, but I need the blocks to be randomized for this Go/No-Go task. So, I am having problems with defining the exp blocks object.


I also need a specific screen to appear after the practice to tell the participant that the practice is over with and that the real experiment will begin once they press the space bar.


I cannot figure out how to do this. Any help would be most appreciated. My code is posted below:





**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cued Go / No-Go Task (Fillmore et al., 2006)


******************************************************************************************************************


********************************************************************************************************************************************


*******************************************************************************************************************************************************************


   Configurable values for


   - responsetimeout and


   - ITI (Inter-Trial-Interval)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<values userparams>


/ responsetimeout = 250


/ iti = 200


/ feedback_time = 400


</values>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   The below values should not be changed.


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<values taskparams>


/ soa = 0


/ cuetype = 0


/ targettype = 0


/ nogo_targettype = 0


/ go_correctresp = 0


/ nogo_correctresp = 0


/ trialcount = 0


/ total = 0


/ rwd = 10


</values>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Task Instructions


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<instruct>


/ windowsize = (80%,80%)


/ inputdevice = keyboard


/ prevkey = (25)


/ nextkey = (57)


/ prevlabel = "Press P to go back"


/ nextlabel = "Press the spacebar"


/ finishlabel = "Press the spacebar"


</instruct>



<page intro>


^^Welcome to the Go / No-Go Task!


^^Put the index finger of your preferred hand on the spacebar. On each trial, a rectangle will appear on the screen.


^The rectangle will either be green or blue.


^^Press the spacebar as quickly as possible whenever you see the green rectangle.


^^If the rectangle is blue, do not respond at all.


^Try to respond as quickly as possible while making as few errors as possible.


^^There will be several practice blocks in the beginning. The task will take about 60 minutes to complete.


^^Press the spacebar to begin.


</page>




<page gainBlockInstr>


^^ WIN BLOCK!


</page>



<page lossBlockInstr>


^^ LOSE BLOCK!


</page>




<page begin>


^^This concludes the Practice for the Go / No-Go Task.


^^Get ready for the actual experiment and press the spacebar when you are ready to begin.


</page>




<page end>


^^This concludes the Go / No-Go Task.


^^Thank you for participating!


</page>


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Custom Data Output


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<data>


/ columns = [date,time,subject,blocknum,blockcode,values.trialcount,trialcode,response,latency,correct,error,


   picture.cue.currentitem,values.total,picture.target.currentitem,values.cuetype,values.targettype,values.nogo_targettype,values.soa]


/ separatefiles = true


</data>


***********************


Feedback


***********************


<text wrong>


/ items = wrong


/ color = (255, 0, 0)


/ fontstyle = ("Garamond", 36pt, true, false, false, false, 5, 0)


/ position =(50,70)


</text>



<item wrong>


/1 ="-10 Points"                 


</item>



<text right>


/ items = right


/ color = (0, 255, 64)


/ fontstyle = ("Garamond", 36pt, true, false, false, false, 5, 0)


/ position =(50,70)


</text>



<item right>


/1 = "+ 10 Points"


</item>


<text total>  


/ items = total


/ position = (50, 70)


/ txcolor = (0, 0, 0)


</text>



<item total>


/1 = "Total = 200"


</item>



**************************************************************************************************************************************************************************


Block randomization


**************************************************************************************************************************************************************************



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Experiment Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<expt>


/ preinstructions = (intro)


/ postinstructions = (end)


/ blocks = [(1,2,3,4=noreplace(practice_gainBlock, practice_nogo_gainBlock, practice_lossBlock, practice_nogo_lossBlock));


         ;(4,5,6,7=noreplace(gainBlock, nogo_gainBlock, lossBlock, nogo_lossBlock))]


</expt>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Block Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************



<block practice_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-24=sequence(cue,gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


</block>



<block practice_nogo_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-24=sequence(cue,nogo_gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


</block>



<block practice_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-24=sequence(cue,loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


</block>



<block practice_nogo_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-24=sequence(cue,nogo_loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


</block>




<block gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-144=sequence(cue,gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


</block>



<block nogo_gainBlock>


/ preinstructions = (gainBlockInstr)


/ bgstim = (total)


/ trials = [1-144=sequence(cue,nogo_gain_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1="+ 10 Points"; text.wrong.item.1=" 0 Points" ]


</block>



<block lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-144=sequence(cue,loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


</block>



<block nogo_lossBlock>


/ preinstructions = (lossBlockInstr)


/ trials = [1-144=sequence(cue,nogo_loss_target, iti)]


/ onblockbegin=[values.total=0]


/ onblockbegin=[text.right.item.1=" 0 Points"; text.wrong.item.1="- 10 Points" ]


</block>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Counters  ##Changes were made to the factorial design)


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Note: Factorial design with


   3 x SOA (300,400,500)


   2 x Cue (1=green,2=blue)


   2 x Trial Type (Go, No-Go)


   2 x Block (Gain, Loss)


   


   Blue cue go / no-go ratio is 4:1 (80% go trials, 20% no-go trials)


   Green cue go / no-go ratio is 1:4 (20% go trials, 80% no-go trials)



   Minimum number of trials required to fulfill the above conditions is 50.


   Task runs 250 trials, i.e., each factor combination is repeated 5 times. ####This has to be changed


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   SOAs in ms  ##Changes made were to reduce SOA from 5 to 3 different ones and I reduced the lines 


   from 25 to 24 so they would be counterbalanced.###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list soa>


/ items = (


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400,


   300,300,300,300,300,


   500,500,500,500,500,


   400,400,400,400,400)


</list>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cues (1=vertical cue, 2=horizontal cue)   ###Changed lines from 25 to 24 for counterbalancing##


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list cuetype>


/ items = (


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2,


   2,2,2,2,2)


/ selectionmode = list.soa.currentindex


</list>



*************************************************************************************************************************************************************************




**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Targets (1=horizontal go, 2=horizontal no-go)  ## Changes made were to reduce lines from 25 to 24 for consistentcy###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list targettype>


/ items = (


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2,


   1,1,1,1,2)


/ selectionmode = list.soa.currentindex


</list>


<list nogo_targettype>


/ items = (


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1,


   2,2,2,2,1)


/ selectionmode = list.soa.currentindex


</list>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Correct Responses (57=spacebar on go trials, 0=no response on no-go trials)



   ####Changes were made by reducing lines from 25 to 24###


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<list go_correctresp>


/ items = (


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0,


   57,57,57,57,0)


/ selectionmode = list.soa.currentindex


</list>



<list nogo_correctresp>


/ items = (


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57,


   0,0,0,0,57)


/ selectionmode = list.soa.currentindex


</list>




**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Trial Elements


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<trial cue>


/ ontrialbegin = [values.soa=list.soa.nextvalue; values.cuetype=list.cuetype.nextvalue;


   values.targettype=list.targettype.nextvalue; values.nogo_targettype=list.nogo_targettype.nextvalue; values.go_correctresp=list.go_correctresp.nextvalue; values.nogo_correctresp=list.nogo_correctresp.nextvalue;


   values.trialcount+=1]


/ stimulustimes = [0=blankscreen; 100=blankscreen]


/ validresponse = (noresponse)


/ trialduration = 100 + values.soa


/ recorddata = false


</trial>



<trial practice_gain_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.gain_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_nogo_gain_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.nogo_gain_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_loss_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.loss_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial practice_nogo_loss_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.nogo_loss_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>




<trial gain_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.gain_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial nogo_gain_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.nogo_gain_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial loss_target>


/ stimulustimes = [0=target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.loss_target.response==values.go_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial nogo_loss_target>


/ stimulustimes = [0=nogo_target]


/ validresponse = (57, noresponse)


/ iscorrectresponse = [trial.nogo_loss_target.response==values.nogo_correctresp]


/ correctmessage = true(right,500)


/ errormessage = true(wrong,500)


/ timeout = 550


/ recorddata = true


</trial>



<trial iti>


/ stimulustimes = [0=blankscreen]


/ validresponse = (noresponse)


/ trialduration = values.iti


/ recorddata = false


</trial>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Cue Stims  


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<picture cue>


/ items = cues


/ select = values.cuetype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<item cues>


/ 2 = "HCUE.bmp"


/ 1 = "HGO.bmp"


</item>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Target Stims


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<picture target>


/ items = targets


/ select = values.targettype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<picture nogo_target>


/ items = targets


/ select = values.nogo_targettype


/ size = (75mm,75mm)


/ position = (50%,50%)


/ erase = false


</picture>



<item targets>



/ 1 = "HGO.bmp"


/ 2 = "HNOGO.bmp"


</item>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Fixation  


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<text fixation>


/ items = ("+")


/ fontstyle = ("Verdana", 10.00%, true)


/ erase = false


</text>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Blank Screen


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<shape blankscreen>


/ shape = rectangle


/ color = (white)


/ erase = false


/ size = (100%, 100%)


/ position = (50%, 50%)


</shape>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Debug Stuff


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<text debug>



/ txbgcolor = (white)


/ erase = false


/ size = (75%,5%)


/ position = (50%,5%)


</text>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   Default Settings


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


<defaults>


/ canvassize = (100%, 100%)


/ canvasaspectratio = (4,3)


/ minimumversion = "4.0.0.0"


/ fontstyle = ("Verdana", 2.50%, true)


/ screencolor = (white)


</defaults>



**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


   End Of File


**************************************************************************************************************************************************************************


**************************************************************************************************************************************************************************


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

The only examples I can find online only randomize trials, but I need the blocks to be randomized for this Go/No-Go task. So, I am having problems with defining the exp blocks object.


You randomize blocks just as you would randomize trials:


<expt>
/ blocks = [1-4=noreplace(a,b,c,d); 5=someotherblock; 6-...; ]
[...]
</expt>


You will find this covered in the documentation for the /blocks attribute and you can find many more examples via the forum's search facility.


I also need a specific screen to appear after the practice to tell the participant that the practice is over with and that the real experiment will begin once they press the space bar.


Set up a <trial> that displays the message, have it accept the spacebar as response. Set up a <block> to run said <trial>. Run that block at the appropriate spot in your <expt>.


jahughes81
jahughes81
Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)Partner Member (740 reputation)
Group: Forum Members
Posts: 7, Visits: 1

Hi Dave,


Thank you for the swift reply. I came up with the same ideas as you, but my syntax was slightly off. I made some small changes and it works now.


Thanks again!


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search