Key-press task


Key-press task

Author
Message
Jessica_FAU
Jessica_FAU
New Member
New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)New Member (4 reputation)

Group: Forum Members
Posts: 1, Visits: 5
Dear Inquisit Team,

I am a new Inquisit user and would like to program the so-called key-press task ("wanting" task). I could not readily find answers to my questions in this forum which is why I decided to start a new topic.

First, some general information about the task: Subjects are presented with a stimulus that if not inferred with, changes after 4 seconds. However, if subjects would like to make the stimulus disappear faster (i.e., change to next stimulus), they can press one of the two arrow keys presented on the right side of the stimulus. Similarly, if they would like to make the stimulus stay longer, they can press the other arrow key. The variable of interest is the amount of work in units of key press that subjects exert in response to the stimuli. Importantly, a "slider" (similar to an egg timer) is shown at the left side of the stimuli that shows total viewing time at any moment, and changes with every keypress (e.g., goes up when pressing key to see stimulus longer vs. goes down when pressing key to make stimulus disappear faster). One way to go would be to increase or decrease the viewing time of the stimulus by 1 second as a result of 1 key press. In total, the task lasts for 4 minutes independent of actions taken by the subjects.

From my colleagues I learned that every time a subject presses a key to make the stimulus stay longer, a new trial begins and consequently the screen would flicker. This seems particularly problematic if subjects press the key repeatedly to see the stimulus longer. Therefore my first question: Is there a way to show the stimuli continuously without the flickering when subjects press a response key? Similarly, is there a way to decrease the default viewing time of 4 seconds dependent on the key press of the subject (e.g., 2 key press would decrease viewing time by 2 seconds)? Lastly, I have not seen a "slider" or egg timer that displays viewing time and changes with every key press before in Inquisit. Do you have any ideas about how something like this could be programmed?

I am aware that these are quite some questions but would appreciate any help or hints on how to overcome these difficulties.

Thank you very much in advance,
Jessica
Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Jessica_FAU - Friday, October 12, 2018
Dear Inquisit Team,

I am a new Inquisit user and would like to program the so-called key-press task ("wanting" task). I could not readily find answers to my questions in this forum which is why I decided to start a new topic.

First, some general information about the task: Subjects are presented with a stimulus that if not inferred with, changes after 4 seconds. However, if subjects would like to make the stimulus disappear faster (i.e., change to next stimulus), they can press one of the two arrow keys presented on the right side of the stimulus. Similarly, if they would like to make the stimulus stay longer, they can press the other arrow key. The variable of interest is the amount of work in units of key press that subjects exert in response to the stimuli. Importantly, a "slider" (similar to an egg timer) is shown at the left side of the stimuli that shows total viewing time at any moment, and changes with every keypress (e.g., goes up when pressing key to see stimulus longer vs. goes down when pressing key to make stimulus disappear faster). One way to go would be to increase or decrease the viewing time of the stimulus by 1 second as a result of 1 key press. In total, the task lasts for 4 minutes independent of actions taken by the subjects.

From my colleagues I learned that every time a subject presses a key to make the stimulus stay longer, a new trial begins and consequently the screen would flicker. This seems particularly problematic if subjects press the key repeatedly to see the stimulus longer. Therefore my first question: Is there a way to show the stimuli continuously without the flickering when subjects press a response key? Similarly, is there a way to decrease the default viewing time of 4 seconds dependent on the key press of the subject (e.g., 2 key press would decrease viewing time by 2 seconds)? Lastly, I have not seen a "slider" or egg timer that displays viewing time and changes with every key press before in Inquisit. Do you have any ideas about how something like this could be programmed?

I am aware that these are quite some questions but would appreciate any help or hints on how to overcome these difficulties.

Thank you very much in advance,
Jessica

> From my colleagues I learned that every time a subject presses a key to make the stimulus stay longer, a new trial begins and consequently the screen would flicker.

This is not correct. To avoid any kind of flicker, all you need to do is set any stimulus elements displayed by the trial to /erase = false.

> Similarly, is there a way to decrease the default viewing time of 4 seconds dependent on the key press of the subject (e.g., 2 key press would decrease viewing time by 2 seconds)?

Possibly. If you give each trial a fixed duration of 1 second, then you can just run fewer 1-second trials in response to a decrease of the viewing time. I.e. if running 4 trials (4 x 1 second) is your default, decrease that number to 3 if the subject indicates a decrease in the 1st trial, and so forth.

> Lastly, I have not seen a "slider" or egg timer that displays viewing time and changes with every key press before in Inquisit. Do you have any ideas about how something like this could be programmed?

You can display a rectangular <shape> or several <shape>s overlayed in your <trial>s and have the shape change its size according to the participant's responses, i.e. make it larger in case of an indicated increase, reduce its size in case of an indicated decrease.


Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
Dave - Friday, October 12, 2018
Jessica_FAU - Friday, October 12, 2018
Dear Inquisit Team,

I am a new Inquisit user and would like to program the so-called key-press task ("wanting" task). I could not readily find answers to my questions in this forum which is why I decided to start a new topic.

First, some general information about the task: Subjects are presented with a stimulus that if not inferred with, changes after 4 seconds. However, if subjects would like to make the stimulus disappear faster (i.e., change to next stimulus), they can press one of the two arrow keys presented on the right side of the stimulus. Similarly, if they would like to make the stimulus stay longer, they can press the other arrow key. The variable of interest is the amount of work in units of key press that subjects exert in response to the stimuli. Importantly, a "slider" (similar to an egg timer) is shown at the left side of the stimuli that shows total viewing time at any moment, and changes with every keypress (e.g., goes up when pressing key to see stimulus longer vs. goes down when pressing key to make stimulus disappear faster). One way to go would be to increase or decrease the viewing time of the stimulus by 1 second as a result of 1 key press. In total, the task lasts for 4 minutes independent of actions taken by the subjects.

From my colleagues I learned that every time a subject presses a key to make the stimulus stay longer, a new trial begins and consequently the screen would flicker. This seems particularly problematic if subjects press the key repeatedly to see the stimulus longer. Therefore my first question: Is there a way to show the stimuli continuously without the flickering when subjects press a response key? Similarly, is there a way to decrease the default viewing time of 4 seconds dependent on the key press of the subject (e.g., 2 key press would decrease viewing time by 2 seconds)? Lastly, I have not seen a "slider" or egg timer that displays viewing time and changes with every key press before in Inquisit. Do you have any ideas about how something like this could be programmed?

I am aware that these are quite some questions but would appreciate any help or hints on how to overcome these difficulties.

Thank you very much in advance,
Jessica

> From my colleagues I learned that every time a subject presses a key to make the stimulus stay longer, a new trial begins and consequently the screen would flicker.

This is not correct. To avoid any kind of flicker, all you need to do is set any stimulus elements displayed by the trial to /erase = false.

> Similarly, is there a way to decrease the default viewing time of 4 seconds dependent on the key press of the subject (e.g., 2 key press would decrease viewing time by 2 seconds)?

Possibly. If you give each trial a fixed duration of 1 second, then you can just run fewer 1-second trials in response to a decrease of the viewing time. I.e. if running 4 trials (4 x 1 second) is your default, decrease that number to 3 if the subject indicates a decrease in the 1st trial, and so forth.

> Lastly, I have not seen a "slider" or egg timer that displays viewing time and changes with every key press before in Inquisit. Do you have any ideas about how something like this could be programmed?

You can display a rectangular <shape> or several <shape>s overlayed in your <trial>s and have the shape change its size according to the participant's responses, i.e. make it larger in case of an indicated increase, reduce its size in case of an indicated decrease.


Come to think of it, I think there is a better way than using fixed durations and running the corresponding amount of trials. Something like this, in essence:

<values>
/ viewtime = 4000
/ adjustmentvalue = 1000
/ stimnumber = 1
</values>

<expressions>
/ viewtime = values.viewtime
</expressions>

<expt>
/ blocks = [1=start; 2-4 = viewingtime;]
</expt>

<block start>
/ preinstructions = (startinstr)
</block>

<page startinstr>
^press the spacebar when you're ready
</page>

<instruct>
/ nextkey = (57)
</instruct>

<block viewingtime>
/ onblockbegin = [
values.viewtime = 4000;
shape.indicator.height = 8%;
values.stimnumber = list.stimnumbers.nextindex;
]
/ stop = [
block.viewingtime.elapsedtime >= expressions.viewtime;
]
/ trials = [1=viewtrial]
/ branch = [
block.start;
]
</block>

//on the keyboard
//press the UP arrow to increase view time
/ press DOWN arrow to decrease view time
<trial viewtrial>
/ ontrialend = [
if (trial.viewtrial.response == 200) {
values.viewtime += values.adjustmentvalue;
shape.indicator.height += 2%;
};
if (trial.viewtrial.response == 208){
values.viewtime -= values.adjustmentvalue;
shape.indicator.height -= 2%;
};
]
/ stimulusframes = [1=clearscreen, stim, up, down, indicator]
/ validresponse = (200, 208)
/ branch = [
trial.viewtrial;
]
/ timeout = 1000
</trial>

//3 items in this example
<list stimnumbers>
/ poolsize = 3
</list>

<text stim>
/ items = ("A", "B", "C")
/ select = values.stimnumber
/ erase = false
</text>

<text up>
/ items = ("↑")
/ erase = false
/ position = (30%, 50%)
</text>

<text down>
/ items = ("↓")
/ erase = false
/ position = (70%, 50%)
</text>

<shape indicator>
/ shape = rectangle
/ color = blue
/ position = (10%, 90%)
/ size = (5%, 8%)
/ erase = false
/ halign = center
/ valign = bottom
</shape>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency values.viewtime block.viewingtime.elapsedtime)
/ separatefiles = true
</data>


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search