Script for same/different task


Author
Message
John Clapper
John Clapper
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 2, Visits: 4
I would like to run a simple same-different task, where participants see a stimulus (selected from a collection of image files) on the left side of the screen, followed 1000 msec later by a second stimulus (again selected from a collection of image files) on the right side of the screen. The participant decides if they are the same or different by pressing either S or D, respectively. The program records their response and the latency in msec on each trial. Is there an existing script that does something like this?

Thanks!
Dave
Dave
Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)Supreme Being (937K reputation)
Group: Administrators
Posts: 11K, Visits: 70K
John Clapper - 6/8/2021
I would like to run a simple same-different task, where participants see a stimulus (selected from a collection of image files) on the left side of the screen, followed 1000 msec later by a second stimulus (again selected from a collection of image files) on the right side of the screen. The participant decides if they are the same or different by pressing either S or D, respectively. The program records their response and the latency in msec on each trial. Is there an existing script that does something like this?

Thanks!

There is not, but you should be able to set this up from scratch easily. The gist goes like this:

<block example>
/ trials = [1-20 = noreplace(same, different)]
</block>

<values>
/ leftitem = 1
/ rightitem = 1
/ not = 0
</values>

<trial same>
/ ontrialbegin = [
    values.not = 0;
    values.leftitem = list.itemnumbers.nextvalue;
    values.rightitem = values.leftitem;
]
/ stimulustimes = [0=leftpic; 1000=rightpic]
/ validresponse = ("S", "D")
/ correctresponse = ("S")
</trial>

<trial different>
/ ontrialbegin = [
    values.not = 0;
    values.leftitem = list.itemnumbers.nextvalue;
    values.not = values.leftitem;
    values.rightitem = list.itemnumbers.nextvalue;
]
/ stimulustimes = [0=leftpic; 1000=rightpic]
/ validresponse = ("S", "D")
/ correctresponse = ("D")
</trial>

// 10 images in this example, sampled without replacement
<list itemnumbers>
/ items = (1,2,3,4,5,6,7,8,9,10)
/ selectionrate = always
/ replace = false
/ not = (values.not)
</list>

<pictureleftpic>
/ items = picitems
/ select = values.leftitem
/ position = (20%, 50%)
/ size = (35%, 50%)
</picture>

<picture rightpic>
/ items = picitems
/ select = values.rightitem
/ position = (80%, 50%)
/ size = (35%, 50%)
</picture>

<item picitems>
/ 1 = "image01.jpg"
/ 2 = "image02.jpg"
/ 3 = "image03.jpg"
/ 4 = "image04.jpg"
/ 5 = "image05.jpg"
/ 6 = "image06.jpg"
/ 7 = "image07.jpg"
/ 8 = "image08.jpg"
/ 9 = "image09.jpg"
/ 10 = "image10.jpg"
</item>

Edited 3 days ago @ 12:34 PM by Dave
John Clapper
John Clapper
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 2, Visits: 4
Dave - 6/8/2021
John Clapper - 6/8/2021
I would like to run a simple same-different task, where participants see a stimulus (selected from a collection of image files) on the left side of the screen, followed 1000 msec later by a second stimulus (again selected from a collection of image files) on the right side of the screen. The participant decides if they are the same or different by pressing either S or D, respectively. The program records their response and the latency in msec on each trial. Is there an existing script that does something like this?

Thanks!

There is not, but you should be able to set this up from scratch easily. The gist goes like this:

<block example>
/ trials = [1-20 = noreplace(same, different)]
</block>

<values>
/ leftitem = 1
/ rightitem = 1
/ not = 0
</values>

<trial same>
/ ontrialbegin = [
    values.not = 0;
    values.leftitem = list.itemnumbers.nextvalue;
    values.rightitem = values.leftitem;
]
/ stimulustimes = [0=leftpic; 1000=rightpic]
/ validresponse = ("S", "D")
/ correctresponse = ("S")
</trial>

<trial different>
/ ontrialbegin = [
    values.not = 0;
    values.leftitem = list.itemnumbers.nextvalue;
    values.not = values.leftitem;
    values.rightitem = list.itemnumbers.nextvalue;
]
/ stimulustimes = [0=leftpic; 1000=rightpic]
/ validresponse = ("S", "D")
/ correctresponse = ("D")
</trial>

// 10 images in this example, sampled without replacement
<list itemnumbers>
/ items = (1,2,3,4,5,6,7,8,9,10)
/ selectionrate = always
/ replace = false
/ not = (values.not)
</list>

<pictureleftpic>
/ items = picitems
/ select = values.leftitem
/ position = (20%, 50%)
/ size = (35%, 50%)
</picture>

<picture rightpic>
/ items = picitems
/ select = values.rightitem
/ position = (80%, 50%)
/ size = (35%, 50%)
</picture>

<item picitems>
/ 1 = "image01.jpg"
/ 2 = "image02.jpg"
/ 3 = "image03.jpg"
/ 4 = "image04.jpg"
/ 5 = "image05.jpg"
/ 6 = "image06.jpg"
/ 7 = "image07.jpg"
/ 8 = "image08.jpg"
/ 9 = "image09.jpg"
/ 10 = "image10.jpg"
</item>

Thanks, I'll give it a try
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search