Simple digit recognition task


Author
Message
pawelstrojny
pawelstrojny
Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)
Group: Forum Members
Posts: 43, Visits: 76

Hi,


Could you help me find or write task like below:


1. Subject gets random number from 1 to 6


2.


If subject pressed 1-6 the answer is recorded (as correct or not) and program moves to another random number.


If subject pressed 7 or another key, the same stimulus is displayed again. The repetition takes place until subject press key 1-6.


I need only correctness, number of displayes of single stimulus and time to be recorded.


I tried but can't find any solution on my own.


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: 13K, Visits: 108K

I tried but can't find any solution on my own.


So what exactly are you having trouble with? Note that what you outline does not seem overly complicated. You should be able to get a basic version going after completing the tutorials and working through a few more elaborate scripts available in the Task Library.


pawelstrojny
pawelstrojny
Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)
Group: Forum Members
Posts: 43, Visits: 76

I tried to modify Dot Estimation Task and reached some effects but I think I overcomplicated the whole script.


I used script, I managed to change stimuli, than used "branch" but for now I have few problems:


1. I used three trials (presentation, question "do you need to repeat?" and estimate) but I would be happy if I have only two displays in each trial - presentation => estimation (if answer is not 1-6 => repeat of presentation)


2. I cant manage to define "branch" that the stimulus would be repeated until subjet press 1-6 key, after one repetition script moves one to next presentation.


3. For now if subject presses "repeat", script presents another (next) digit rather than presented before.


I'm not sure if I should paste modified script here - it is long.


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: 13K, Visits: 108K

1. I used three trials (presentation, question "do you need to repeat?" and estimate) but I would be happy if I have only two displays in each trial - presentation => estimation (if answer is not 1-6 => repeat of presentation)


That can be handled via /branch or simply set the /response attribute to 'correct' (details in the documentation).


2. I cant manage to define "branch" that the stimulus would be repeated until subjet press 1-6 key, after one repetition script moves one to next presentation.


See above.


3. For now if subject presses "repeat", script presents another (next) digit rather than presented before.


You need to prevent stimulus selection in case of a 'repeat' response. This can be done via conditional logic in /ontrialbegin attributes. However, all you should need is /response=correct.


pawelstrojny
pawelstrojny
Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)
Group: Forum Members
Posts: 43, Visits: 76

Thank you for response Dave but I'm not sure if /response=correct is enough. It's because if subject was presented with e.g. "5", the correct answer is "5", other (1,2,3,4,6) are incorrect but allow subject to proceed and every other keys are also incorrect but provide to repeatition of previous digit. Am I correct?


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: 13K, Visits: 108K

Am I correct?


Yes, you are. I missed that. Then using /branch along with preventing stimulus selection it is.


pawelstrojny
pawelstrojny
Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)
Group: Forum Members
Posts: 43, Visits: 76

Ok, I'll try form scratch.


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: 13K, Visits: 108K

Here's a bit of code which might give you some ideas to build from:


<values>
/ currentdigit = 0
/ allowablekeys = "2,3,4,5,6,7"
/ lastresponse = 0
</values>

<text mydigit>
/ items = ("<%values.currentdigit%>")
</text>

<counter randomdigit>
/ select = replacenorepeat(1-6)
</counter>

<trial maintrial>
/ ontrialbegin = [values.currentdigit=counter.randomdigit.selectedvalue]
/ ontrialend = [values.lastresponse=trial.maintrial.response]
/ stimulusframes = [1=mydigit]
/ validresponse = (2,3,4,5,6,7,8,9,10)
/ iscorrectresponse = [trial.maintrial.response==values.currentdigit+1]
/ branch = [if (contains(values.allowablekeys, values.lastresponse)==false) trial.repeattrial]
</trial>

<trial repeattrial>
/ ontrialend = [values.lastresponse=trial.repeattrial.response]
/ stimulusframes = [1=mydigit]
/ validresponse = (2,3,4,5,6,7,8,9,10)
/ iscorrectresponse = [trial.repeattrial.response==values.currentdigit+1]
/ branch = [if (contains(values.allowablekeys, values.lastresponse)==false) trial.repeattrial]
</trial>

<block myblock>
/ trials = [1-12=maintrial]
</block>


pawelstrojny
pawelstrojny
Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)Guru (6.5K reputation)
Group: Forum Members
Posts: 43, Visits: 76

Thank you.



Your
code was extremely helpful. On a basis of it I managed to prepare whole
script for my experiment. I have some details and instructions to
prepare but engine is ready. Thank you 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