Skip to content

Instantly share code, notes, and snippets.

@jeromyanglim
Created May 11, 2012 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromyanglim/2657811 to your computer and use it in GitHub Desktop.
Save jeromyanglim/2657811 to your computer and use it in GitHub Desktop.
Simple, 2-choice, and 4-choice reaction time experiment using Inquisit
<expt ability>
/preinstructions = (initial.instructions)
/blocks=[1=pm.simple; 2=pm.4choice; 3=ac.test.type]
</expt>
<data>
/columns=[date, time, build, subject, trialcode, blockcode, blocknum, trialnum, latency, response, pretrialpause,
posttrialpause, trialtimeout, blocktimeout, correct, stimulusitem, stimulusnumber,
display.height, display.width,
computer.cpuspeed, computer.os,
script.starttime, script.elapsedtime]
/format=tab
</data>
<instruct>
/ fontstyle = ("Arial", 14pt, true)
/windowsize = (80%, 80%)
</instruct>
************************************************************************
blocks
***********************************************************************
<block ac.test.type>
/preinstructions = (ac.test.type.p1)
/trials=[2,4,6=ac.test.type.trial; 1,3,5=ac.test.type.nexttrial]
</block>
<block pm.simple>
/preinstructions = (pm.simple)
/trials=[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79=blank.simple; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80=pm.simple]
</block>
<block pm.4choice>
/ preinstructions = (pm.4choice)
/trials=[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79=blank.4choice; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80=random(pm.4choice.1, pm.4choice.2, pm.4choice.9, pm.4choice.0)]</block>
************************************************************************
general stimuli
***********************************************************************
<text cross>
/position=(50%, 50%)
/items=("+")
/fontstyle = ("Arial", 60pt, false)
</text>
<text error.toosoon>
/position=(50%, 50%)
/items=("PRESSED TOO SOON")
/fontstyle = ("Arial", 30pt, false)
/txcolor =(255,0,0)
</text>
<text error.wrongkey>
/position=(50%, 50%)
/items=("WRONG KEY")
/fontstyle = ("Arial", 30pt, false)
/txcolor =(255,0,0)
</text>
************************************************************************
initial.instructions
************************************************************************
<page initial.instructions>
OVERVIEW:
~nThis session includes:
~n-Two reaction tests
~n-A typing test
~n-Brief set of questions
~n~nThe aim is to expose you to psychomotor ability tests that we will analyse as part of the Data Analysis task.
The final questions ask whether you wish to receive feedback on the ability tests.
The final questions also gather information to assist us in assessing the validity of your results.
</page>
************************************************************************
pm.simple
***********************************************************************
<page pm.simple>
SIMPLE REACTION TIME TASK:
~n~nPlace your middle finger of your writing hand on the middle of the SPACE BAR.
~n~nYour task is to press the space bar as quickly as possible after a RED SQUARE is flashed on the screen.
~n~nAt the start of each trial focus your eyes on the cross that appears in the middle of the screen.
~n~nIt is an error if you press the SPACE BAR before the RED SQUARE APPEARS. Try to respond as quickly as possible
and aim for 95% accuracy.
~n~nThe task ends once you have done 40 accurate trials.
</page>
<trial blank.simple>
/ stimulustimes=[0=cross]
/ trialduration = noreplace(1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500)
/ responsetrial = (" ", blank.simple)
/ correctresponse = (noresponse)
/ errormessage = (error.toosoon, 1000)
/ validresponse=(noresponse, " ")
</trial>
<trial pm.simple>
/ stimulustimes = [0=pm.simple.start]
/ validresponse = (" ")
</trial>
<shape pm.simple.start>
/shape=rectangle
/size= (150,150)
/ color= (255,0,0)
</shape>
<text pm.simple.bgstim>
/position=(50%, 10%)
/items=("Focus on Cross & Press Space when Red Square appears")
/fontstyle = ("Arial", 16pt, true)
</text>
************************************************************************
pm.4choice
***********************************************************************
<page pm.4choice>
4 CHOICE REACTION TIME TASK: (Read Instructions Carefully)
~nOn the next screen you will see 4 black boxes in a row. After a short delay one of the four black boxes will turn red. Your task is to press the corresponding key as quickly as possible. It is IMPORTANT that you place your fingers over the correct keys.
~n~nPlace your left middle finger over the 1 key (Above the Q key)
~n- PRESS WHEN BOX ON FAR LEFT TURNS RED
~n~nPlace your left index finger over the 2 key (Above the W key)
~n- PRESS WHEN SECOND FROM LEFT BOX TURNS RED
~n~nPlace your right index finger on the 9 key (Above the O key)
~n- PRESS WHEN SECOND FROM RIGHT BOX TURNS RED
~n~nPlace your right middle finger on the 0 key (Above the P key)
~n- PRESS WHEN BOX ON FAR RIGHT TURNS RED
~n~n
~nAt the start of each trial focus your eyes on the cross that appears in the middle of the screen.
~nIt is an error to press a key before a box turns red. It is an error to press the wrong key. Try to respond as quickly as possible
and aim for 95% accuracy.
~nThe task ends once you have done 40 accurate trials.
</page>
<trial blank.4choice>
/ stimulustimes=[0=cross, pm.4choice.1, pm.4choice.2, pm.4choice.9, pm.4choice.0]
/ trialduration = noreplace(1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500)
/ responsetrial = ("1", blank.4choice)
/ responsetrial = ("2", blank.4choice)
/ responsetrial = ("9", blank.4choice)
/ responsetrial = ("0", blank.4choice)
/ correctresponse = (noresponse)
/ errormessage = (error.toosoon, 1000)
/ validresponse=(noresponse, "1", "2", "9", "0")
</trial>
<trial pm.4choice.1>/ stimulustimes = [0=pm.4choice.red.1, pm.4choice.2, pm.4choice.9, pm.4choice.0] /validresponse = ("1", "2", "9", "0") /correctresponse = ("1") / errormessage=(error.wrongkey, 1000) </trial>
<shape pm.4choice.1>/shape=rectangle/position=(30,50)/size= (90,90)/ color= (0,0,0)</shape>
<shape pm.4choice.red.1>/shape=rectangle/position=(30,50)/size= (90,90)/ color= (255,0,0)</shape>
<trial pm.4choice.2>/ stimulustimes = [0=pm.4choice.1, pm.4choice.red.2, pm.4choice.9, pm.4choice.0]/ /validresponse = ("1", "2", "9", "0") /correctresponse = ("2") / errormessage=(error.wrongkey, 1000) </trial>
<shape pm.4choice.2>/shape=rectangle/position=(40,50)/size= (90,90)/ color= (0,0,0)</shape>
<shape pm.4choice.red.2>/shape=rectangle/position=(40,50)/size= (90,90)/ color= (255,0,0)</shape>
<trial pm.4choice.9>/ stimulustimes = [0=pm.4choice.1, pm.4choice.2, pm.4choice.red.9, pm.4choice.0]/ /validresponse = ("1", "2", "9", "0") /correctresponse = ("9") / errormessage=(error.wrongkey, 1000) </trial>
<shape pm.4choice.9>/shape=rectangle/position=(60,50)/size= (90,90)/ color= (0,0,0)</shape>
<shape pm.4choice.red.9>/shape=rectangle/position=(60,50)/size= (90,90)/ color= (255,0,0)</shape>
<trial pm.4choice.0>/ stimulustimes = [0=pm.4choice.1, pm.4choice.2, pm.4choice.9, pm.4choice.red.0]/ /validresponse = ("1", "2", "9", "0") /correctresponse = ("0") / errormessage=(error.wrongkey, 1000) </trial>
<shape pm.4choice.0>/shape=rectangle/position=(70,50)/size= (90,90)/ color= (0,0,0)</shape>
<shape pm.4choice.red.0>/shape=rectangle/position=(70,50)/size= (90,90)/ color= (255,0,0)</shape>
***********************************************************************
ac.test.type
***********************************************************************
<page ac.test.type.p1>TYPING TEST: The following task assesses your typing speed. The task involves three trials. Each trial involves typing as much of a paragraph of text as you can in one minute. At the end of one minute the task will end. Your performance will be the number of words that you accurately type in the paragraph minus the number of words that you inaccurately type. Try to type as quickly and accurately as you can.</page>
<openended ac.test.type.trial>
/stimulustimes=[0=ac.test.type.trial, ac.test.type.instruction]
/charlimit=2000
/linelength = 80
/timeout=60000
/position = (50%, 95%)
/size = (70%, 40%)
/multiline=true
</openended>
<text ac.test.type.instruction>
/items=("YOU HAVE 60 SECONDS TO TYPE THE TEXT IN GREEN IN THE BOX BELOW:")
/position=(50%,8%)
</text>
<text ac.test.type.trial>
/items=ac.test.type.trial
/fontstyle = ("Arial", 14pt, true)
/position=(50%,20%)
/txcolor = (0, 200, 0)
/select=sequence
/size=(70%,10%)
</text>
<item ac.test.type.trial>
/1="Psychology describes and attempts to explain consciousness, behaviour, and social interaction. Empirical psychology is primarily devoted to describing human experience and behaviour as it actually occurs. Various schools of thought have argued for a particular model to be used as a guiding theory by which all, or the majority, of human behaviour can be explained. The popularity of these has waxed and waned over time. Some psychologists may think of themselves as adherents to a particular school of thought and reject the others, although most consider each as an approach to understanding the mind, and not necessarily as mutually exclusive theories. Psychology encompasses a vast domain, and includes many different approaches to the study of mental processes and behaviour."
/2="The concept of space has been of interest for philosophers and scientists for much of human history. The term is used somewhat differently in different fields of study. Hence, it is difficult to provide an uncontroversial and clear definition outside of specific defined contexts. Disagreement also exists on whether space itself can be measured or is part of the measuring system. Science considers space to be a fundamental quantity. Thus an operational definition is used in which the procedure of measurement of space intervals and the units of measurement are defined. The way in which space is perceived is an area which psychologists first began to study in the middle of the 19th century, and it is now thought by those concerned with such studies to be a distinct branch within psychology."
/3="Peru is a representative democratic republic divided into 25 regions. Its geography varies from the arid plains of the Pacific coast to the peaks of the Andes mountains and the tropical forests of the Amazon Basin. Its main economic activities include agriculture, fishing, mining, and manufacturing of products such as textiles. The main spoken language is Spanish, although a significant number of Peruvians speak native languages. This mixture of cultural traditions has resulted in a wide diversity of expressions in fields such as art, cuisine, literature, and music. Peruvian economic policy has varied widely over the past decades. Recent economic growth has been fuelled by macroeconomic stability, improved terms of trade, and rising investment and consumption. Peru's main exports are copper, gold, zinc, textiles, and fish meal."
</item>
<trial ac.test.type.nexttrial>
/stimulustimes=[0=ac.test.type.nexttrial]
/validresponse=(28)
</trial>
<text ac.test.type.nexttrial>
/items= ("Press [ENTER] when you are ready for the next trial")
/fontstyle = ("Arial", 16pt, true)
/position=(50%,40%)
</text>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment