___________________________________________________________________________________________________________________
*SOLVING ANAGRAMS (uses textbox input)*
___________________________________________________________________________________________________________________
Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 02-07-2017
last updated: 03-13-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC
Script Copyright © 03-13-2020 Millisecond Software
___________________________________________________________________________________________________________________
BACKGROUND INFO
___________________________________________________________________________________________________________________
This script implements the an Anagram Solving Paradigm based in part on:
Novick, L., & Sherman, S. (2003). On the nature of insight solutions: Evidence from skill differences in anagram solution.
The Quarterly Journal of Experimental Psychology Section A, 56(2), 351-382.
Tresselt, M. E., & Mayzner, M. S. (1966). Normative solution times for a sample of 134 solution words and 378 associated anagrams.
Psychonomic Monograph Supplements, 1, 293-298.
___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________
By default, participants work on 30 5-letter anagrams in increasing difficulty*. They have 10s (default) to come
with a solution. Once they have a solution, they need to press and then type in the solution (limit of 10s).
Participants receive solution feedback.
*increasing difficulty: based on the median response times needed to solve the anagrams as
reported in Tresselt & Mayzner (1966)
___________________________________________________________________________________________________________________
DURATION
___________________________________________________________________________________________________________________
the default set-up of the script takes appr. 5 minutes to complete
___________________________________________________________________________________________________________________
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:
(1) Raw data file: 'solvinganagrams_textboxes_raw*.iqdat' (a separate file for each participant)*
build: The specific Inquisit version used (the 'build') that was run
computer.platform: the platform the script was run on (win/mac/ios/android)
date, time, date and time script was run
subject, group, with the current subject/groupnumber
script.sessionid: with the current session id
blockcode, blocknum: the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum: the name and number of the currently recorded trial (built-in Inquisit variable)
Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
that do not store data to the data file such as feedback trials. Thus, trialnum
may not reflect the number of main trials run per block.
values.form: A vs. B (different lists of anagrams that are matched in difficulty)
values.phase: 0 = demo
1: anagrams 1-10;
2: anagrams 11-20;
3: anagrams 21-30;
values.anagramCount: counts the number of anagrams run
values.anagram: stores the current anagram
values.anagramSolution: stores the solution of the current anagram
response: the participant's response
latency: the response latency (in ms)
values.anagramRT: stores the latency (in ms) of Spacebar press
values.firstLetterRT: stores the latency of entering the first letter after Spacebar press (time btw. hitting spacebar and entering first letter)
values.proposedSolutionRT: time (in ms) it took to type solution; measured from spacebar press until solution was submitted
values.proposedSolution: stores the proposed anagram solution
values.ACC: 1 = proposed solution is correct;
0 = otherwise
values.solutionFlag: 1 = solution is flagged (proposedSolutionRT > parameters.flagSolutionRT)
0 = solution is not flagged
(2) Summary data file: 'solvinganagrams_textboxes_summary*.iqdat' (a separate file for each participant)*
computer.platform: the platform the script was run on (win/mac/ios/android)
script.startdate: date script was run
script.starttime: time script was started
script.subjectid: assigned subject id number
script.groupid: assigned group id number
script.sessionid: assigned session id number
script.elapsedtime: time it took to run script (in ms); measured from onset to offset of script
script.completed: 0 = script was not completed (prematurely aborted);
1 = script was completed (all conditions run)
values.form: form run (A vs. B)
values.nr_anagrams: the number of anagrams presented (based on the provided item lists)
expressions.ACC: proportion correctly solved anagrams
expressions.medianRT: median solution time (in ms); measured from onset of anagram until first letter (of correct solutions) is hit
expressions.meanRT: mean solution time (in ms); measured from onset of anagram until first letter (of correct solutions) is hit
expressions.medianProposedSolutionRT: median proposed solution time (in ms); measured from entering first letter until solution is submitted
expressions.meanProposedSolutionRT: mean proposed solution time (in ms); measured from entering first letter until solution is submitted
expressions.meanCorrections: mean number of corrections made to proposed solution across all anagrams
correction = backspace is used for letter deletion
values.countSolutionFlags: number of times a solution was flagged because values.proposedSolutionRT > parameters.flagSolutionRT (default: 10s)
for 30 anagrams:
values.ACC_10: proportion correct solution for anagram 1-10
values.medianRT_10: median correct latency (in ms) for anagram 1-10 (latency measured from onset of anagram until first key is hit)
values.meanRT_10: mean correct latency (in ms) for anagram 1-10 (latency measured from onset of anagram until first key is hit)
values.ACC_20: proportion correct solution for anagram 11-20
values.medianRT_20: median correct latency (in ms) for anagram 11-20 (latency measured from onset of anagram until first key is hit)
values.meanRT_20: mean correct latency (in ms) for anagram 11-20 (latency measured from onset of anagram until first key is hit)
values.ACC_30: proportion correct solution for anagram 21-30
values.medianRT_30: median correct latency (in ms) for anagram 21-30 (latency measured from onset of anagram until first key is hit)
values.meanRT_30: mean correct latency (in ms) for anagram 21-30 (latency measured from onset of anagram until first key is hit)
* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions
___________________________________________________________________________________________________________________
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________
Script counterbalances the use of 2 anagram forms A vs. B by groupnumber:
odd groupnumbers run version A
evengroupnumbers run version B
1. Demo Block: runs 1 demo trial (by default: additional demo anagrams can be added under section Editable Stimuli and the script will automatically adapt)
- demo trial: only accepts the correct solution
=> if the time limit is up without a response, a solution hint is provided
- provides feedback
2. Test Block: runs 30 trials (by default: additional test anagrams can be added/removed under section Editable Stimuli
and the script will automatically adapt)
- each anagram is presented for 10s (default, can be edited under section Editable Parameters)
- if the Spacebar is hit within those 10s, participants can type in their response into a textbox
(if participants take longer than parameters.solutionFlagRT (10s), the solution is flagged)
- once the participant has submitted the final solution, feedback is provided
Trial Sequence:
Anagram Presentation (for max. 10s) -> Textbox (if applicable)->Feedback
___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
Anagram selection for FormA/FormB:
Tresselt & Mayzner (1966), Table1 lists anagrams of 5-letter words in increasing median solution times.
An increase in median solution time was taken as an indicator of increasing anagram difficulty in this script.
Attempts were made to match the 30 anagrams chosen for formA and formB as closely as possible
in increasing median solution times:
Mean(A) = 45.03s, SD(A) = 62.63s, Median(A) = 20.75s
Mean(B) = 45.08s, SD(B) = 62.38s, Median(B) = 20.75s
(see anagrampool.xlsx for individual solution times)
Anagrams and their solution can be easily replaced under section Editable Stimuli.
The task automatically adjusts if the number of anagrams changes.
___________________________________________________________________________________________________________________
INSTRUCTIONS
___________________________________________________________________________________________________________________
provided by Millisecond Software under section Editable Instructions
___________________________________________________________________________________________________________________
EDITABLE CODE
___________________________________________________________________________________________________________________
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.
The parameters you can change are:
/anagramFontSize: the size of the anagrams in percentage of canvas height (default: 5%)
/maxAnagramPresentationTime: the maximum presentation time (in ms) of the anagram (default: 10000ms)
/flagSolutionRT: if participant needs more than 10s (default) to enter the solution after hitting the spacebar,
the solution is flagged
(Note: there is no timelimit on typing in the solution to the anagram after pressing Spacebar.
Thus, participants could potentially press Spacebar without knowing the solution and then
use extra time to think about the solution before submitting it)
**************************************************************************************************************
**************************************************************************************************************
EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
/anagramFontSize = 5%
/maxAnagramPresentationTime = 10000
/flagSolutionRT = 10000
**************************************************************************************************************
**************************************************************************************************************
EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************
Anagram selection for FormA/FormB:
Tresselt & Mayzner (1966), Table1 lists anagrams of 5-letter words in increasing median solution times.
An increase in median solution time was taken as an indicator of increasing anagram difficulty in this script.
Attempts were made to match the 30 anagrams chosen for formA and formB as closely as possible
in increasing median solution times:
Mean(A) = 45.03s, SD(A) = 62.63s, Median(A) = 20.75s
Mean(B) = 45.08s, SD(B) = 62.38s, Median(B) = 20.75s
****************************
Form A
****************************
-
/1 = "egujd"
/2 = "odelm"
/3 = "ntrai"
/4 = "iuegd"
/5 = "milbc"
/6 = "ihrca"
/7 = "hroac"
/8 = "ugars"
/9 = "rmcap"
/10 = "iptna"
/11 = "nrtde"
/12 = "mhnua"
/13 = "cahtb"
/14 = "ohytu"
/15 = "ltvia"
/16 = "patoi"
/17 = "lrufo"
/18 = "taibh"
/19 = "gawno"
/20 = "sjtuo"
/21 = "ciotn"
/22 = "hecab"
/23 = "dpaot"
/24 = "obrac"
/25 = "pncia"
/26 = "eucnl"
/27 = "speua"
/28 = "dtuai"
/29 = "rdcei"
/30 = "nrcui"
-
/1 = "judge"
/2 = "model"
/3 = "train"
/4 = "guide"
/5 = "climb"
/6 = "chair"
/7 = "roach"
/8 = "sugar"
/9 = "cramp"
/10 = "paint"
/11 = "trend"
/12 = "human"
/13 = "batch"
/14 = "youth"
/15 = "vital"
/16 = "patio"
/17 = "flour"
/18 = "habit"
/19 = "wagon"
/20 = "joust"
/21 = "tonic"
/22 = "beach"
/23 = "adopt"
/24 = "cobra"
/25 = "panic"
/26 = "uncle"
/27 = "pause"
/28 = "audit"
/29 = "cider"
/30 = "incur"
****************************
Form B
****************************
-
/1 = "aewtr"
/2 = "eocvi"
/3 = "adtri"
/4 = "nrdki"
/5 = "ntgia"
/6 = "lcoht"
/7 = "tonba"
/8 = "awrlb"
/9 = "ypeon"
/10 = "ohtnm"
/11 = "rtypa"
/12 = "iuftr"
/13 = "aotlg"
/14 = "kcler"
/15 = "oulgh"
/16 = "oewrp"
/17 = "huocg"
/18 = "eokrp"
/19 = "iumcs"
/20 = "rhtib"
/21 = "roing"
/22 = "ntjau"
/23 = "tanog"
/24 = "augdr"
/25 = "elcsa"
/26 = "acohv"
/27 = "oapnr"
/28 = "rbloa"
/29 = "aebrl"
/30 = "glaei"
-
/1 = "water"
/2 = "voice"
/3 = "triad"
/4 = "drink"
/5 = "giant"
/6 = "cloth"
/7 = "baton"
/8 = "brawl"
/9 = "peony"
/10 = "month"
/11 = "party"
/12 = "fruit"
/13 = "gloat"
/14 = "clerk"
/15 = "ghoul"
/16 = "power"
/17 = "cough"
/18 = "poker"
/19 = "music"
/20 = "birth"
/21 = "groin"
/22 = "jaunt"
/23 = "tango"
/24 = "guard"
/25 = "scale"
/26 = "havoc"
/27 = "apron"
/28 = "labor"
/29 = "blare"
/30 = "agile"
*******************************
Demo
*******************************
-
/1 = "muose"
-
/1 = "mouse"
**************************************************************************************************************
**************************************************************************************************************
EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
/ fontstyle = ("Arial", 2.8%, false, false, false, false, 5, 1)
You have reached the end of the task.
^^Thank you!
-
/1 = "In the following task you will be asked to solve <%item.anagrams.itemcount%> <%length(item.anagrams.item(1))%>-letter anagrams such as 'tilup'.
The anagrams get more difficult as you proceed.
For each trial, you will be given a new anagram and you have <%parameters.maxAnagramPresentationTime/1000%>s to solve it.
~nOnce you have the solution to the anagram (here: tulip), hit the immediately.
A textbox then appears and you can enter your solution. Be aware: you only have <%parameters.flagSolutionRT/1000%>s to enter your solution.
If you could not think of the solution in time, the correct solution will be presented, and a new trial will start.
Let's work through a demonstration trial. "
/2 = "The demonstration is over.
Remember:
you have <%parameters.maxAnagramPresentationTime/1000%>s to solve each of the <%item.anagrams.itemcount%> <%length(item.anagrams.item(1))%>-anagrams.
As soon as you know the solution, hit the Spacebar. Then immediately enter your solution in the textbox as fast as possible.
Begin the task when you are ready!"
-
/1 = "Demo Hint:
the solution is '<%values.anagramSolution%>'"
/2 = "as soon as you know the solution, hit the Spacebar."
/3 = "Proposed Solution:
<%values.proposedSolution%>"
/4 = "The correct solution to '<%values.anagram%>' was:
<%values.anagramSolution%>"
/5 = "Correct!"
/6 = ""
/7 = "Enter your solution:"
/ items = ("Thank you!")
/ fontstyle = ("Arial", 8%, true, false, false, false, 5, 1)
/ position = (50%, 50%)
/ size = (80%, 10%)
/ vjustify = center
/ valign = center
/ halign = center
/ items = ("")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
/ valign = center
/ halign = center
****************************************************************************************************
general instruction expressions: adjust the instruction text depending on device used to run script
****************************************************************************************************
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response buttons located on the bottom of your screen";} else {"keys on your keyboard";}
**************************************************************************************************************
!!!REMAINING CODE: Customize after careful consideration only!!!
**************************************************************************************************************
**************************************************************************************************************
**************************************************************************************************************
DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.1.0.0 or higher
/canvasaspectratio = (4,3)
/minimumversion = "6.1.0.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = white
/ txcolor = (0, 0, 0)
**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
Note: data file explanations under User Manual Information at the top
To change from one data file per participant to one data file for all participants, set
/separatefiles = false
***********************
raw data file
***********************
/ columns = (build, computer.platform, date, time, subject, group, script.sessionid,
blockcode, blocknum, trialcode, trialnum,
values.form,
values.phase, values.anagramCount, values.anagram, values.anagramSolution,
response, latency,
values.anagramRT, values.firstLetterRT, values.proposedSolutionRT, values.proposedSolution,values.ACC,
values.solutionFlag)
***********************
summary data file
***********************
/ columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.form, values.nr_anagrams,
expressions.ACC, expressions.medianRT, expressions.meanRT,
expressions.medianFirstLetterRT, expressions.meanFirstLetterRT,
expressions.medianProposedSolutionRT, expressions.meanProposedSolutionRT,
values.countSolutionFlags,
values.ACC_10, values.medianRT_10, values.meanRT_10,
values.ACC_20, values.medianRT_20, values.meanRT_20,
values.ACC_30, values.medianRT_30, values.meanRT_30)
**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
/phase: 0 = demo
1: anagrams 1-10;
2: anagrams 11-20;
3: anagrams 21-30;
/form: A vs. B (different lists of anagrams that are matched in difficulty)
/nr_anagrams: the number of anagrams presented (based on the provided item lists)
/index: helper variable to fill dynamic anagram lists
/demoTrials: counts the number of demo trials run
/anagramCount: counts the number of anagrams run
/anagram: stores the current anagram
/anagramSolution: stores the solution of the current anagram
/anagramRT: stores the latency (in ms) of the first key entered
/proposedSolution: stores the proposed anagram solution
/correct: 1 = proposed solution is correct; 0 = otherwise
/feedback: stores the itemnumber (item.trialInstructions )of the feedback stimulus to be presented:
4 = 'incorrect' feedback; 5 = 'correct' feedback
/countLetters: counts the number of letters/keys entered for the proposed solution
Summary Variables (for 30 anagrams )
/ACC_10: proportion correct solution for anagram 1-10
/meanRT_10: mean correct latency (in ms) for anagram 1-10 (latency measured from onset of anagram until first key is hit)
/medianRT_10: median correct latency (in ms) for anagram 1-10 (latency measured from onset of anagram until first key is hit)
/ACC_20: proportion correct solution for anagram 11-20
/meanRT_20: mean correct latency (in ms) for anagram 11-20 (latency measured from onset of anagram until first key is hit)
/medianRT_20: median correct latency (in ms) for anagram 11-20 (latency measured from onset of anagram until first key is hit)
/ACC_30: proportion correct solution for anagram 21-30
/meanRT_30: mean correct latency (in ms) for anagram 21-30 (latency measured from onset of anagram until first key is hit)
/medianRT_30: median correct latency (in ms) for anagram 21-30 (latency measured from onset of anagram until first key is hit)
/phase = 0
/form = ""
/nr_anagrams = 0
/index = 0
/demoTrials = 0
/anagramCount = 0
/anagram = 0
/anagramSolution = ""
/anagramRT = 0
/proposedSolution = ""
/proposedSolutionRT = ""
/ACC = 0
/feedback = 0
/countLetters = 0
/solutionFlag = 0
/countSolutionFlags = 0
/firstLetterRT = 0
/ACC_10 = ""
/meanRT_10 = ""
/medianRT_10 = ""
/ACC_20 = ""
/meanRT_20 = ""
/medianRT_20 = ""
/ACC_30 = ""
/meanRT_30 = ""
/medianRT_30 = ""
**************************************************************************************************************
**************************************************************************************************************
EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/selectAnagrams_FormA: function that stores anagrams and their solutions from Form A in the respective
dynamic item lists (odd groupnumbers)
/selectAnagrams_FormA: function that stores anagrams and their solutions from Form B in the respective
dynamic item lists (even groupnumbers)
/propCorrect: proportion correctly solved anagrams
/medianRT: median solution time (in ms); measured from onset of anagram until spacebar is hit
/meanRT: mean solution time (in ms); measured from onset of anagram until spacebar is hit
/medianFirstLetterRT: median first letter input after spacebar (in ms); measured from spacebar press until first letter is entered into textbox
/meanFirstLetterRT: mean first letter input after spacebar (in ms); measured from spacebar press until first letter is entered into textbox
/medianProposedSolutionRT: median proposed solution time (in ms); measured from spacebar press until solution is submitted
/meanProposedSolutionRT: mean proposed solution time (in ms); measured from spacebar press until solution is submitted
/selectAnagrams_FormA = {
values.index += 1;
if (values.index <= item.anagramSolutions_formA.itemcount){
item.anagrams.insertitem(item.anagrams_formA.item(values.index), values.index);
item.anagramSolutions.insertitem(item.anagramSolutions_formA.item(values.index), values.index);
expressions.selectAnagrams_FormA;
};
}
/selectAnagrams_FormB = {
values.index += 1;
if (values.index <= item.anagramSolutions_formB.itemcount){
item.anagrams.insertitem(item.anagrams_formB.item(values.index), values.index);
item.anagramSolutions.insertitem(item.anagramSolutions_formB.item(values.index), values.index);
expressions.selectAnagrams_FormB;
};
}
/ACC = list.accuracy.mean
/medianRT = list.latencies.median
/meanRT = list.latencies.mean
/medianProposedSolutionRT = list.proposedSolutionRTs.median
/meanProposedSolutionRT = list.proposedSolutionRTs.mean
/medianFirstLetterRT = list.firstLetterRTs.median
/meanFirstLetterRT = list.firstLetterRTs.mean
**************************************************************************************************************
**************************************************************************************************************
INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************
/ items = Instructions
/ select = sequence
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ position = (50%, 50%)
/ size = (80%, 80%)
/ hjustify = left
/ items = trialInstructions
/ select = 1
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ position = (50%, 20%)
/ size = (80%, 20%)
/ txcolor = red
/ items = trialInstructions
/ select = 2
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 20%)
/ txcolor = gray
/ items = trialInstructions
/ select = 7
/ fontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ position = (50%, 40%)
/ size = (80%, 5%)
/ txcolor = black
/ erase = false
/ items = trialInstructions
/ select = 3
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 20%)
/ items = trialInstructions
/ select = values.feedback
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ position = (50%, 70%)
/ size = (80%, 20%)
/ txcolor = black
/ items = trialInstructions
/ select = 6
/ fontstyle = ("Courier New", 2.5%, false, false, false, false, 5, 1)
/ position = (50%, 95%)
/ size = (80%, 20%)
/ txcolor = blue
/ stimulusframes = [1 = instructions, continue]
/ validresponse = (" ")
/ recorddata = false
/ inputdevice = keyboard
/ stimulusframes = [1 = finish, exit]
/ validresponse = (" ")
/ recorddata = false
**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************
Note: fill dynamically with the anagrams for the selected form
-
Note: fill dynamically with the anagram Solutions for the selected form
-
/ items = demoAnagrams
/ select = sequence
/ fontstyle = ("Arial", parameters.anagramFontSize, false, false, false, false, 5, 1)
/ position = (50%, 30%)
/ items = anagrams
/ select = values.anagramCount
/ fontstyle = ("Arial", parameters.anagramFontSize, false, false, false, false, 5, 1)
/ position = (50%, 30%)
/ items = ("<%values.proposedSolution%>")
/ fontstyle = ("Arial", parameters.anagramFontSize, false, false, false, false, 5, 1)
/ position = (50%, 50%)
/ size = (80%, parameters.anagramFontSize)
**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
/ items = (0, 1)
/ replace = true
*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************
Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
Note: list stores the latency of correct responses for each relevant trial
Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
for 10 consecutive trials
Note: list stores the latency of correct responses for each relevant trial
for 10 consecutive trials
Note: list stores all values.proposedSolutionRTs
Note: list stores all values.firstLetterRTs
**************************************************************************************************************
**************************************************************************************************************
DEMO TRIALS
**************************************************************************************************************
**************************************************************************************************************
Note: trial.demoAnagram
- retrieves the demo anagram (as well as solution) and presents it
- waits for response (aka Spacebar press)
=> if Spacebar is not pressed during the allotted time (10s), a hint is given during the demo trial
- calls openended.demoAnagramSolution
/ ontrialbegin = [
values.demoTrials += 1;
values.anagram = item.demoAnagrams.item(values.demoTrials);
values.anagramSolution = item.demoAnagramSolutions.item(values.demoTrials);
values.ACC = "";
values.proposedSolution = "";
values.proposedSolutionRT = "";
values.solutionFlag = 0;
values.firstLetterRT = "";
trial.demoAnagram.insertstimulustime(text.demoHint, parameters.maxAnagramPresentationTime);
]
/ stimulusframes = [1 = anagramInstructions, demoAnagram]
/ validresponse = (" ")
/ ontrialend = [
trial.demoAnagram.resetstimulusframes();
values.countLetters += 1;
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ branch = [
return openended.demoAnagramSolution;
]
Note: openended.demoAnagram
- presents textbox to collect anagram response
=> only the correct response is accepted and terminates this trial
- calls trial.demoAnagramFeedback
/ responsefontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (60%, 5%)
/ stimulusframes = [1 = TextboxInstructions]
/ iscorrectresponse = [
values.proposedSolution = openended.demoAnagramSolution.response;
values.proposedSolutionRT = openended.demoAnagramSolution.latency;
if (values.proposedSolutionRT > parameters.flagSolutionRT){
values.solutionFlag = 1;
};
values.firstLetterRT = openended.demoAnagramSolution.firstcharlatency;
if (monkey.monkeymode){
values.proposedSolution = values.anagramSolution;
};
return (tolower(values.proposedSolution) == tolower(values.anagramSolution));
]
/ response = correct
/ errormessage = true(text.demoHint, 0)
/ ontrialend = [
values.ACC = openended.demoAnagramSolution.correct;
values.feedback = 5;
text.feedback.textcolor = green;
]
/ branch = [
return trial.demoAnagramFeedback;
]
Note: trial.demoAnagramFeedback
- presents correct feedback
- calls another demo trial IF the number of presented demo trials is
smaller than the number of demo anagrams listed in item.demoAnagrams
/ stimulusframes = [1 = proposedSolution, feedback, continue]
/ validresponse = (" ")
/ recorddata = true
/ branch = [
if (values.demoTrials < item.demoAnagrams.itemcount){
return trial.demoAnagram;
};
]
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
Note: trial.Anagram
- retrieves the next anagram (as well as solution) and presents it
- waits for response (aka Spacebar press)
- if no response is given within the allotted timeframe (10s), the trial terminates and trial.anagramFeedback is called
- if Spacebar is hit,
=> latency is stored under values.anagramRT
=> trial.proposedAnagramSolution is called
/ ontrialbegin = [
values.anagramCount += 1;
if (values.anagramCount <= 10){
values.phase = 1;
} else if (values.anagramCount <= 20){
values.phase = 2;
} else if (values.anagramCount <= 30){
values.phase = 3;
} else {
values.phase = "NA";
};
values.anagram = item.anagrams.item(values.anagramCount);
values.anagramSolution = item.anagramSolutions.item(values.anagramCount);
values.ACC = "";
values.proposedSolutionRT = "";
values.solutionFlag = 0;
values.firstLetterRT = "";
]
/ stimulusframes = [1 = clearscreen, anagramInstructions, Anagram]
/ validresponse = (" ")
/ beginresponsetime = 0
/ timeout = parameters.maxAnagramPresentationTime
/ ontrialend = [
values.anagramRT = trial.anagram.latency;
]
/ branch = [
if (trial.anagram.responsetext == " "){
return openended.AnagramSolution;
} else {
values.ACC = 0;
values.feedback = 4;
text.feedback.textcolor = red;
return trial.anagramFeedback;
}
]
Note: openended.Anagram
- collects solution
- the trial terminates after 10s and trial.anagramFeedback is called
/ responsefontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (60%, 5%)
/ stimulusframes = [1 = clearscreen, TextboxInstructions]
/ beginresponsetime = 0
/ ontrialend = [
values.proposedSolution = openended.anagramSolution.response;
values.firstLetterRT = openended.anagramSolution.firstcharlatency;
list.firstLetterRTs.appenditem(values.firstLetterRT);
values.ACC = tolower(values.proposedSolution) == tolower(values.anagramSolution);
values.proposedSolutionRT = openended.anagramSolution.latency;
list.proposedSolutionRTs.appenditem(values.proposedSolutionRT);
if (values.proposedSolutionRT > parameters.flagSolutionRT){
values.solutionFlag = 1;
values.countSolutionFlags += 1;
};
]
/ branch = [
if (values.ACC == 1){
text.feedback.textcolor = green;
values.feedback = 5;
return trial.anagramFeedback;
} else {
values.feedback = 4;
text.feedback.textcolor = red;
return trial.anagramFeedback;
};
]
Note: trial.anagramFeedback
- presents the correct solution if an incorrect solution was proposed
otherwise says 'correct'
- updates summary lists
- calls another anagram trial IF the number of presented anagram trials is
smaller than the number of anagrams stored in item.anagrams
/ ontrialbegin = [
list.accuracy.insertitem(values.ACC, 1);
if (values.ACC == 1){
list.latencies.insertitem(values.anagramRT, 1);
};
]
/ stimulusframes = [1 = proposedSolution, feedback, continue]
/ validresponse = (" ")
/ recorddata = true
/ ontrialend = [
if (values.anagramCount <= 10){
list.accuracy10.insertitem(values.ACC, 1);
if (values.ACC == 1){
list.latencies10.insertitem(values.anagramRT, 1);
};
if (values.anagramCount == 10){
values.ACC_10 = list.accuracy10.mean;
values.meanRT_10 = list.latencies10.mean;
values.medianRT_10 = list.latencies10.median;
list.accuracy10.reset();
list.latencies10.reset();
};
} else if (values.anagramCount <= 20){
list.accuracy10.insertitem(values.ACC, 1);
if (values.ACC == 1){
list.latencies10.insertitem(values.anagramRT, 1);
};
if (values.anagramCount == 20){
values.ACC_20 = list.accuracy10.mean;
values.meanRT_20 = list.latencies10.mean;
values.medianRT_20 = list.latencies10.median;
list.accuracy10.reset();
list.latencies10.reset();
};
} else if (values.anagramCount <= 30){
list.accuracy10.insertitem(values.ACC, 1);
if (values.ACC == 1){
list.latencies10.insertitem(values.anagramRT, 1);
};
if (values.anagramCount == 30){
values.ACC_30 = list.accuracy10.mean;
values.meanRT_30 = list.latencies10.mean;
values.medianRT_30 = list.latencies10.median;
list.accuracy10.reset();
list.latencies10.reset();
};
};
]
/ branch = [
if (values.anagramCount < values.nr_anagrams){
return trial.anagram;
};
]
**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
Note:
* runs as many demo trials as there demo anagrams (default: 1)
/ trials = [1 = instructions; 2 = demoAnagram; 3 = instructions]
Note:
* runs as many anagram trials as there anagrams (default: 30)
/ trials = [1 = Anagram]
/ trials = [
1 = finish;
]
**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
Note: odd groupnumbers run version A
=> all items from version A are stored in the dynamic lists list.anagrams and list.anagramSolutions
/ groups = (1 of 2)
/ onexptbegin = [
values.form = "A";
expressions.selectAnagrams_FormA;
values.nr_anagrams = item.anagrams.itemcount;
]
/ blocks = [
1 = demo;
2 = Anagram;
3 = finish;
]
Note: even groupnumbers run version B
=> all items from version B are stored in the dynamic lists list.anagrams and list.anagramSolutions
/ groups = (2 of 2)
/ onexptbegin = [
values.form = "B";
expressions.selectAnagrams_FormB;
values.nr_anagrams = item.anagrams.itemcount;
]
/ blocks = [
1 = demo;
2 = Anagram;
3 = finish;
]
**************************************************************************************************************
End of File
**************************************************************************************************************