Tower of London Task (TOL) -- Krikorian et al. (1994) Version SCRIPT INFO Script Author: David Nitz (dave@millisecond.com) for Millisecond Software, LLC last updated: 08-29-2016 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC Copyright © 08-29-2016 Millisecond Software BACKGROUND INFO *Purpose* This script implements the 'Tower of London' task originally described in: Shallice, T. (1982). Specifc impairments of planning. Philosophical Transactions of the Royal Society of London, Biology, 298, 199-209. Procedural details were adapted from: Krikorian, R., Bartok, J., & Gay, N. (1994). Tower of London procedure: A standard method and developmental data. Journal of Clinical and Experimental Neuropsychology, 16, 840-850. Task instructions were adapted from: Anderson, P., Anderson, V., & Lajoie, G. (1996). The Tower of London test: Validation and standardization for pediatric populations. The Clinical Neuropsychologist, 10, 54-65. Further references: Berg, W. K. & Byrd, D. L. (2002). The Tower of London spatial problem-solving task: Enhancing clinical and research implementation. Journal of Clinical and Experimental Neuropsychology, 24(5), 586-604. *Task* Participants need to figure out how to move and arrange three colorfuls discs on 3 provided pegs in such a way to achieve a specific solution pattern. DATA FILE INFORMATION: The default data stored in the data files are: (1) Raw data file: 'TowerOfLondon_raw*.iqdat' (a separate file for each participant) build: Inquisit build computer.platform: the platform the script was run on date, time, subject, group: date and time script was run with the current subject/groupnumber blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) response: response made latency: the latency of the response in ms (or if no response: trialduration) problemnumber Current problem number. By default the task consists of 1 practice problem and 12 test problems presented sequentially. 0 indicates a practice problem. subjectattempts Number of current attempts to solve the given problem. targetmoves Number of prescribed moves for the current problem. subjectmoves Number of subject-performed moves for the current problem. excessmoves Returns the difference between number of moves performed by the subject and the number of target moves for a given problem. movestring Text string containing a record of performed moves. E.g. "B2R3" indicates that the blue ball (B) was moved to peg 2 (center) and the red ball (R) was moved to peg 3 (right). targetachieved Returns true as soon as the subject has successfully reached a given problem's target / goal state. Otherwise false. problemscore Score awarded for solving the current problem. See Krikorian et al. (1994) for details. totalscore Score achieved across the whole set of test problems. Computed as the sum of individual problem scores. Maximum is 36 in the standard version. firstmovetime Returns the time (in ms) elapsed between initial presentation of the target configuration and the initialization of the subject's first move. Sometimes also referred to as "planning time" or simply "latency". Note: Measure is computed separately for each attempt. executiontime Computed as solutiontime - firstmovetime. Note: Measure is computed separately for each attempt. solutiontime Returns the time (in ms) elapsed between initial presentation of the target configuration and a subject's successful solution. Note: Measure is computed separately for each attempt. t_choicestart Absolute start time for trial.choice in ms. May be used to derive additional measures during data analysis (e.g. mean move time). t_choiceend Absolute end time for trial.choice in ms. May be used to derive additional measures during data analysis (e.g. mean move time). (2) Summary data file: 'TowerOfLondon_summary*.iqdat' (a separate file for each participant) script.startdate: date script was run script.starttime: time script was started script.subjectid: subject id number script.groupid: group id number script.elapsedtime: time it took to run script (in ms) computer.platform: the platform the script was run on /completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /totalscore: Score achieved across the whole set of test problems. Computed as the sum of individual problem scores. Maximum is 36 in the standard version. Note: the following variables are calculated independent of accuracy of solution: /mean_solutionTime: the mean solution time (in ms) of all solutions with solutiontime > 0 /SD_solutionTime: the standard deviation (in ms) of solution times of solutions with solutiontime > 0 /mean_executionTime: the mean execution time (in ms) of all solutions with solutiontime > 0 /SD_executionTime: the standard deviation (in ms) of all execution times of all completed solutions with solutiontime > 0 Note: the following variables are calculated for solutions with values.problemscore > 0: /mean_solutionTime_correctSolution: the mean solution time (in ms) of all solutions with values.problemscore > 0 /SD_solutionTime_correctSolution: the standard deviation (in ms) of solution times of solutions values.problemscore > 0 /mean_executionTime_correctSolution: the mean execution time (in ms) of all solutions with values.problemscore > 0 /SD_executionTime_correctSolution: the standard deviation (in ms) of all execution times of all completed solutions with values.problemscore > 0 EXPERIMENTAL SET-UP 1 Practice trial (problem with 2 moves) 12 Test trials (2 problems with 2 moves, 2 problems with 3 moves, 4 problems with 4 moves, 4 problems with 5 moves: tested sequentially in fixed order) Per Problem: * no time limit * reset button provided * 3 attempts per problem to solve it given the max. number of moves. After failure to solve a problem in 3 attempts, participants are moved to the next problem in the sequence (participants can also move ahead to the next problem by clicking a 'next' button) STIMULI see section Editable Stimuli (to re-create new target states, try EmptyPegs.pptx - provided by Millisecond Software) INSTRUCTIONS see section Editable Instructions. Instructions are provided in the form of *.html pages. Edits can be made to the html-files directly. 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: maxattempts Allowed number of attempts to solve any given problem with minimum amount of moves. Default is 3. npracticeproblems Number of practice problems. By default, the task contains 1 practice problem and 12 test problems. Default is 1. n_a_slots Capacity of peg 1 (left). Default is 3. n_b_slots Capacity of peg 2 (center). Default is 2. n_c_slots Capacity of peg 3 (right). Default is 1. intertrialinterval The intertrial interval (time between problems) in ms. Default is 1000. feedbackduration Duration of performance feedback in ms. Default is 2000. h1 -> h3 Horizontal coordinates of pegs 1, 2 and 3 in screen percentages. Defaults are 20%, 50% and 80%. v1 -> v3 Available vertical coordinates for the three balls in screen percentages. Defaults are 80%, 65%, 50%. r_startX, r_startY Determines the red ball's start position (horizontal, vertical). g_startX, g_startY Determines the green ball's start position (horizontal, vertical). b_startX, b_startY Determines the blue ball's start position (horizontal, vertical). ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** / maxattempts = 3 / npracticeproblems = 1 / time_per_problem = 60000 / n_a_slots = 3 / n_b_slots = 2 / n_c_slots = 1 / intertrialinterval = 1000 / feedbackduration = 2000 / h1 = 20% / h2 = 50% / h3 = 80% / v1 = 80% / v2 = 65% / v3 = 50% / r_startX = parameters.h1 / r_startY = parameters.v2 / g_startX = parameters.h1 / g_startY = parameters.v1 / b_startX = parameters.h2 / b_startY = parameters.v1 ************************************************************************************************************** ************************************************************************************************************** EDITABLE STIMULI: change editable stimuli here ************************************************************************************************************** ************************************************************************************************************** / 01 = "Problem00.gif" / 02 = "Problem01.gif" / 03 = "Problem02.gif" / 04 = "Problem03.gif" / 05 = "Problem04.gif" / 06 = "Problem05.gif" / 07 = "Problem06.gif" / 08 = "Problem07.gif" / 09 = "Problem08.gif" / 10 = "Problem09.gif" / 11 = "Problem10.gif" / 12 = "Problem11.gif" / 13 = "Problem12.gif" Note: if the problem pics are changed, the lists under section 'Editable Lists' might also need to be edited / 1 = "N1Peg.gif" / 2 = "N2Peg.gif" / 3 = "N3Peg.gif" ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** / inputdevice = mouse / file = "intro.html" / file = "practice.html" / file = "test.html" / file = "end.html" **************************************************************************************************** general instruction expressions: adjust the instruction text depending on device used to run script **************************************************************************************************** /buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"tap on it";} else {"click on it with your mouse";} ************************************************************************************************************** ************************************************************************************************************** EDITABLE Lists: change problem sets here ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** Shallice (1982) Problem Set (1 Practice Item, 12 Test Items) ************************************************************************************************************** Problem Number (Ordinal) Note: Problem #0 indicates practice item. / items = (0,1,2,3,4,5,6,7,8,9,10,11,12) / selectionmode = sequence / resetinterval = 0 ************************************************************************************************************** Number of Target Moves ************************************************************************************************************** / items = (2,2,2,3,3,4,4,4,4,5,5,5,5) / selectionmode = list.problemnumber.currentindex ************************************************************************************************************** Red Ball: the end positions of the red ball for all 12 pics ************************************************************************************************************** x lists contain the horizonal positions of each ball (which pegs the ball should end up on) y lists contain the vertical positions of each ball (bottom, center, top) h = horizontal position of ball => 1 (left peg), 2 (center peg), 3 (right peg = shortest) v = vertical position of ball= > 1 (bottom ball), 2 (center ball), 3 (top ball) / items = (parameters.h3,parameters.h3,parameters.h2,parameters.h2,parameters.h2,parameters.h1, parameters.h2,parameters.h1,parameters.h2,parameters.h1,parameters.h1,parameters.h2,parameters.h2) / selectionmode = list.problemnumber.currentindex / items = (parameters.v1,parameters.v1,parameters.v1,parameters.v1,parameters.v1,parameters.v1, parameters.v1,parameters.v1,parameters.v1,parameters.v1,parameters.v1,parameters.v1,parameters.v1) / selectionmode = list.problemnumber.currentindex ************************************************************************************************************** Green Ball: the end positions of the green ball for all 12 pics ************************************************************************************************************** / items = (parameters.h1,parameters.h2,parameters.h1,parameters.h1,parameters.h1,parameters.h1, parameters.h2,parameters.h3,parameters.h3,parameters.h1,parameters.h1,parameters.h1,parameters.h3) / selectionmode = list.problemnumber.currentindex / items = (parameters.v1,parameters.v2,parameters.v1,parameters.v1,parameters.v1,parameters.v2, parameters.v2,parameters.v1,parameters.v1,parameters.v2,parameters.v3,parameters.v2,parameters.v1) / selectionmode = list.problemnumber.currentindex ************************************************************************************************************** Blue Ball: the end position of the blue ball for all 12 pics ************************************************************************************************************** / items = (parameters.h1,parameters.h2,parameters.h3,parameters.h1,parameters.h2,parameters.h2, parameters.h1,parameters.h1,parameters.h2,parameters.h1,parameters.h1,parameters.h1,parameters.h1) / selectionmode = list.problemnumber.currentindex / items = (parameters.v2,parameters.v1,parameters.v1,parameters.v2,parameters.v2,parameters.v1, parameters.v1,parameters.v2,parameters.v2,parameters.v3,parameters.v2,parameters.v1,parameters.v1) / selectionmode = list.problemnumber.currentindex ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 5.0.0.0 or higher / canvassize = (100%, 100%) / canvasaspectratio = (4,3) / minimumversion = "5.0.0.0" / inputdevice = mouse / screencolor = black / fontstyle = ("Arial", 2.50%, true) / txcolor = white / txbgcolor = black ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top *********************************** raw data file *********************************** / columns = (build, computer.platform, date,time,subject, group, blockcode, blocknum, trialcode, trialnum, latency,response,trial.choice.lastdropsource, trial.choice.lastdroptarget, values.problemnumber,values.subjectattempts,values.targetmoves,values.subjectmoves, expressions.excessmoves,values.movestring,expressions.targetachieved,values.problemscore, values.totalscore,expressions.firstmovetime,expressions.executiontime, expressions.solutiontime,values.t_choicestart,values.t_choiceend) / separatefiles = true *********************************** summary data file *********************************** / columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, values.totalscore, expressions.mean_solutionTime, expressions.mean_executionTime, expressions.mean_solutionTime_correctSolutions, expressions.mean_executionTime_correctSolutions) / separatefiles = true ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically updated ************************************************************************************************************** ************************************************************************************************************** r_currentX, r_currentY Stores the red ball's current position (horizontal, vertical). g_currentX, g_currentY Stores the green ball's current position (horizontal, vertical). b_currentX, b_currentY Stores the blue ball's current position (horizontal, vertical). r_targetX, r_targetY Stores the red ball's target position (horizontal, vertical). g_targetX, g_targetY Stores the green ball's target position (horizontal, vertical). b_targetX, b_targetY Stores the blue ball's target position (horizontal, vertical). a_count The number of balls currently placed on peg 1 (left). b_count The number of balls currently placed on peg 2 (center). c_count The number of balls currently placed on peg 3 (right). problemnumber Current problem number. By default the task consists of 1 practice problem and 12 test problems presented sequentially. 0 indicates a practice problem. targetmoves Number of prescribed moves for the current problem. subjectmoves Number of subject-performed moves for the current problem. subjectattempts Number of current attempts to solve the given problem. problemscore Score awarded for solving the current problem. See Krikorian et al. (1994) for details. totalscore Score achieved across the whole set of test problems. Computed as the sum of individual problem scores. Maximum is 36 in the standard version. movestring Text string containing a record of performed moves. E.g. "B2R3" indicates that the blue ball (B) was moved to peg 2 (center) and the red ball (R) was moved to peg 3 (right). stopblock Pseudo-boolean switch to stop the current practice or test block once all problems have been completed. t_roundstart Absolute start time for the current round / attempt. Used to compute first move time, solution time and execution time (expressions.firstmovetime, expressions.solutiontime, expressions.executiontime). t_firstmove Absolute time the first move was initiated for the current round / attempt. Used to determine planning time. (expressions.firstmovetime). t_solution Absolute time when target state was achieved for the current round / attempt. Used to determine solution and execution time (expressions.solutiontime, expressions.executiontime). in Indicates where a ball was positioned by the subject (1=left peg; 2=center peg; 3=right peg). A value of 0 indicates that the subject tried to place the ball in an illegal position (e.g. full peg). t_choicestart Absolute start time for trial.choice in ms. May be used to derive additional measures during data analysis (e.g. mean move time). t_choiceend Absolute end time for trial.choice in ms. May be used to derive additional measures during data analysis (e.g. mean move time). completed 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) / r_currentX = 0 / r_currentY = 0 / g_currentX = 0 / g_currentY = 0 / b_currentX = 0 / b_currentY = 0 / r_targetX = 0 / r_targetY = 0 / g_targetX = 0 / g_targetY = 0 / b_targetX = 0 / b_targetY = 0 / a_count = 0 / b_count = 0 / c_count = 0 / problemnumber = 0 / targetmoves = 0 / subjectmoves = 0 / subjectattempts = 0 / problemscore = 0 / totalscore = 0 / movestring = "" / stopblock = 0 / t_roundstart = 0 / t_firstmove = 0 / t_solution = 0 / in = 0 / choicecount = 0 / t_choicestart = 0 / t_choiceend = 0 / completed = 0 / timeleft = 0 ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** available_a_slots Returns the number of free slots for peg 1 (left). available_b_slots Returns the number of free slots for peg 2 (center). available_c_slots Returns the number of free slots for peg 3 (right). vmax_a Returns the maximum vertical position (slot) currently occupied for peg 1 (left). Returns 0 (false) if peg is empty. vmax_b Returns the maximum vertical position (slot) currently occupied for peg 2 (center). Returns 0 (false) if peg is empty. vmax_c Returns the maximum vertical position (slot) currently occupied for peg 3 (right). Returns 0 (false) if peg is empty. vnext_a Returns the next available vertical position (slot) for peg 1 (left). Returns 0 (false) if peg is full. vnext_b Returns the next available vertical position (slot) for peg 2 (center). Returns 0 (false) if peg is full. vnext_c Returns the next available vertical position (slot) for peg 3 (right). Returns 0 (false) if peg is full. top_in_a Returns the object (R,G,B) currently inhabiting the top position on peg 1 (left). Returns 'none' if peg is empty. Used to determine valid responses in 'trial.choice'. top_in_b Returns the object (R,G,B) currently inhabiting the top position on peg 2 (center). Returns 'none' if peg is empty. Used to determine valid responses in 'trial.choice'. top_in_c Returns the object (R,G,B) currently inhabiting the top position on peg 3 (right). Returns 'none' if peg is empty. Used to determine valid responses in 'trial.choice'. firstmovetime Returns the time (in ms) elapsed between initial presentation of the target configuration and the initialization of the subject's first move. Sometimes also referred to as "planning time" or simply "latency". Note: Measure is computed separately for each attempt. solutiontime Returns the time (in ms) elapsed between initial presentation of the target configuration and a subject's successful solution. Note: Measure is computed separately for each attempt. executiontime Computed as solutiontime - firstmovetime. Note: Measure is computed separately for each attempt. excessmoves Returns the difference between number of moves performed by the subject and the number of target moves for a given problem. targetachieved Returns true as soon as the subject has successfully reached a given problem's target / goal state. Otherwise false. Note: the following variables are calculated independent of accuracy of solution: /mean_solutionTime: the mean solution time (in ms) of all solutions with solutiontime > 0 /SD_solutionTime: the standard deviation (in ms) of solution times of solutions with solutiontime > 0 /mean_executionTime: the mean execution time (in ms) of all solutions with solutiontime > 0 /SD_executionTime: the standard deviation (in ms) of all execution times of all completed solutions with solutiontime > 0 Note: the following variables are calculated for solutions with values.problemscore > 0: /mean_solutionTime_correctSolution: the mean solution time (in ms) of all solutions with solutiontime > 0 /SD_solutionTime_correctSolution: the standard deviation (in ms) of solution times of solutions with solutiontime > 0 /mean_executionTime_correctSolution: the mean execution time (in ms) of all solutions with solutiontime > 0 /SD_executionTime_correctSolution: the standard deviation (in ms) of all execution times of all completed solutions with solutiontime / available_a_slots = (parameters.n_a_slots-values.a_count) / available_b_slots = (parameters.n_b_slots-values.b_count) / available_c_slots = (parameters.n_c_slots-values.c_count) / vmax_a = if(values.a_count>0)getitem(list.vpos,values.a_count) else false / vmax_b = if(values.b_count>0)getitem(list.vpos,values.b_count) else false / vmax_c = if(values.c_count>0)getitem(list.vpos,values.c_count) else false / vnext_a = if(expressions.available_a_slots>0)getitem(list.vpos,values.a_count+1) else false / vnext_b = if(expressions.available_b_slots>0)getitem(list.vpos,values.b_count+1) else false / vnext_c = if(expressions.available_c_slots>0)getitem(list.vpos,values.c_count+1) else false / top_in_a = if(values.r_currentX==parameters.h1 && values.r_currentY==expressions.vmax_a)"R" else if(values.g_currentX==parameters.h1 && values.g_currentY==expressions.vmax_a)"G" else if(values.b_currentX==parameters.h1 && values.b_currentY==expressions.vmax_a)"B" else "none" / top_in_b = if(values.r_currentX==parameters.h2 && values.r_currentY==expressions.vmax_b)"R" else if(values.g_currentX==parameters.h2 && values.g_currentY==expressions.vmax_b)"G" else if(values.b_currentX==parameters.h2 && values.b_currentY==expressions.vmax_b)"B" else "none" / top_in_c = if(values.r_currentX==parameters.h3 && values.r_currentY==expressions.vmax_c)"R" else if(values.g_currentX==parameters.h3 && values.g_currentY==expressions.vmax_c)"G" else if(values.b_currentX==parameters.h3 && values.b_currentY==expressions.vmax_c)"B" else "none" / firstmovetime = if(values.t_firstmove>0)values.t_firstmove-values.t_roundstart else 0 / solutiontime = if(values.t_solution>0)values.t_solution-values.t_roundstart else 0 / executiontime = if(expressions.solutiontime>0)expressions.solutiontime-expressions.firstmovetime else 0 / excessmoves = values.subjectmoves-values.targetmoves / targetachieved = if(values.r_currentX==values.r_targetX && values.r_currentY==values.r_targetY && values.g_currentX==values.g_targetX && values.g_currentY==values.g_targetY && values.b_currentX==values.b_targetX && values.b_currentY==values.b_targetY) true else false / feedbackswitch = if(values.subjectmoves<=values.targetmoves)1 else 2 /mean_solutionTime = list.solutionTimes.mean /SD_solutionTime = list.solutionTimes.standarddeviation /mean_executionTime = list.executionTimes.mean /SD_executionTime = list.executionTimes.standarddeviation /mean_solutionTime_correctSolutions = list.solutionTimes_correctSolutions.mean /SD_solutionTime_correctSolutions = list.solutionTimes_correctSolutions.standarddeviation /mean_executionTime_correctSolutions = list.executionTimes_correctSolutions.mean /SD_executionTime_correctSolutions = list.executionTimes_correctSolutions.standarddeviation ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** Info Areas & Onscreen Messages ************************************************************************************************************** / items = ("Problem #<%values.problemnumber%> Attempt #<%values.subjectattempts%>") / txbgcolor = transparent / erase = false / size = (30%,30%) / position = (1%,1%) / hjustify = center / vjustify = center / halign = left / valign = top / items = ("Allowed moves: <%values.targetmoves%> Performed moves: <%values.subjectmoves%>") / txbgcolor = transparent / erase = false / size = (30%,30%) / position = (99%,1%) / hjustify = center / vjustify = center / halign = right / valign = top / items = ("Correct!", "Too many moves!") / fontstyle = ("Arial", 3.50%, true) / txbgcolor = transparent / erase = false / select = expressions.feedbackswitch / position = (50%,40%) / hjustify = center / vjustify = center / items = ("Get ready...") / fontstyle = ("Arial", 3.50%, true) / txbgcolor = transparent / erase = false / select = 1 / position = (50%,40%) / hjustify = center / vjustify = center / items = ("Resetting...") / fontstyle = ("Arial", 3.50%, true) / txbgcolor = transparent / erase = false / select = 1 / position = (50%,40%) / hjustify = center / vjustify = center ************************************************************************************************************** UI Elements ************************************************************************************************************** / items = ("Reset") / fontstyle = ("Arial", 2.50%, true) / vjustify = center / txcolor = black / txbgcolor = white / size = (20%,4%) / position = (35%,98%) / valign = bottom / erase = false / items = ("Reset") / fontstyle = ("Arial", 2.50%, true) / vjustify = center / txcolor = white / txbgcolor = black / size = (20%,4%) / position = (35%,98%) / valign = bottom / erase = false / items = ("Next") / fontstyle = ("Arial", 2.50%, true) / vjustify = center / txcolor = black / txbgcolor = white / size = (20%,4%) / position = (65%,98%) / valign = bottom / erase = false / items = ("Next") / fontstyle = ("Arial", 2.50%, true) / vjustify = center / txcolor = white / txbgcolor = black / size = (20%,4%) / position = (65%,98%) / valign = bottom / erase = false ************************************************************************************************************** Debug Stuff ************************************************************************************************************** / items = ("Free (A): <%expressions.available_a_slots%> | Free (B): <%expressions.available_b_slots%> | Free (C): <%expressions.available_c_slots%> Top (A): <%expressions.top_in_a%> | Top (B): <%expressions.top_in_b%> | Top (C): <%expressions.top_in_c%> Max (A): <%expressions.vmax_a%> | Max (B): <%expressions.vmax_b%> | Max (C): <%expressions.vmax_c%> Next (A): <%expressions.vnext_a%> | Next (B): <%expressions.vnext_b%> | Next (C): <%expressions.vnext_c%> In: <%values.in%>") / erase = false / size = (40%,10%) / position = (50%, 37%) / vjustify = center / items = ("Problem Number: <%values.problemnumber%> Attempt Number: <%values.subjectattempts%> Target Moves: <%values.targetmoves%> Subject Moves: <%values.subjectmoves%> Excess Moves: <%expressions.excessmoves%> First Move Time: <%expressions.firstmovetime%> Solution Time: <%expressions.solutiontime%> Execution Time: <%expressions.executiontime%> Problem Score: <%values.problemscore%> Total Score: <%values.totalscore%> Performed Moves: <%values.movestring%>") / erase = false / size = (30%,30%) / position = (1%,1%) / hjustify = left / halign = left / valign = top ************************************************************************************************************** Background ************************************************************************************************************** / shape = rectangle / color = black / size = (100%, 100%) / erase = false ************************************************************************************************************** Base ************************************************************************************************************** / items = ("Base.gif") / erase = false / transparentcolor = black / size = (90%, 25%) / position = (50%,100%) / halign = center / valign = bottom ************************************************************************************************************** Pegs ************************************************************************************************************** / items = pegs / erase = false / transparentcolor = black / select = parameters.n_a_slots / position = (20%,88%) / size = (20%, 50%) / valign = bottom / droptarget = true / dropposition = (parameters.h1, parameters.v1) / items = pegs / erase = false / transparentcolor = black / select = parameters.n_b_slots / position = (50%, 88%) / size = (20%, 50%) / valign = bottom / droptarget = true / dropposition = (parameters.h2, parameters.v1) / items = pegs / erase = false / transparentcolor = black / select = parameters.n_c_slots / position = (80%, 88%) / size = (20%, 50%) / valign = bottom / droptarget = true / dropposition = (parameters.h3, parameters.v1) ************************************************************************************************************** Balls ************************************************************************************************************** / items = ("R1.gif") / erase = false / transparentcolor = black / hposition = values.r_currentX / vposition = values.r_currentY / size = (15%, 15%) / dropsource = true / items = ("G1.gif") / erase = false / transparentcolor = black / hposition = values.g_currentX / vposition = values.g_currentY / size = (15%, 15%) / dropsource = true / items = ("B1.gif") / erase = false / transparentcolor = black / hposition = values.b_currentX / vposition = values.b_currentY / size = (15%, 15%) / dropsource = true ************************************************************************************************************** Items (Problem Set) ************************************************************************************************************** / items = targetstateitems / select = current(problemnumber) / erase = false / size = (50%,30%) / position = (50%,1%) / valign = top ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** Generic Position Lists ************************************************************************************************************** / items = (parameters.v1,parameters.v2,parameters.v3) / selectionmode = sequence / items = (parameters.h1,parameters.h2,parameters.h3) / selectionmode = sequence ************************************************************************************************************** Summary Data Lists ************************************************************************************************************** ************************************************************************************************************** Monkey Target Pegs ************************************************************************************************************** / items = ("apeg") / selectionrate = always ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** Start Round / Get Problem ************************************************************************************************************** / ontrialbegin = [ values.timeleft = parameters.time_per_problem; values.t_roundstart=0; values.t_firstmove=0; values.t_solution=0; values.subjectattempts=1; values.subjectmoves=0; values.problemscore=0; values.movestring=""; values.choicecount=0; values.problemnumber=list.problemnumber.nextvalue; values.targetmoves=list.targetmoves.nextvalue; values.r_targetX=list.r_targetX.nextvalue; values.r_targetY=list.r_targetY.nextvalue; values.g_targetX=list.g_targetX.nextvalue; values.g_targetY=list.g_targetY.nextvalue; values.b_targetX=list.b_targetX.nextvalue; values.b_targetY=list.b_targetY.nextvalue; values.r_currentX=parameters.r_startX; values.r_currentY=parameters.r_startY; values.g_currentX=parameters.g_startX; values.g_currentY=parameters.g_startY; values.b_currentX=parameters.b_startX; values.b_currentY=parameters.b_startY; picture.R.hposition = parameters.r_startX; picture.R.vposition = parameters.r_startY; picture.G.hposition = parameters.g_startX; picture.G.vposition = parameters.g_startY; picture.B.hposition = parameters.b_startX; picture.B.vposition = parameters.b_startY; ] / stimulusframes = [1=background,startmsg] / validresponse = (anyresponse) / trialduration = parameters.intertrialinterval / recorddata = false / branch = [trial.choice] *************************************************************************************************************** Reset Round *************************************************************************************************************** / ontrialbegin = [ values.r_currentX=parameters.r_startX; values.r_currentY=parameters.r_startY; values.g_currentX=parameters.g_startX; values.g_currentY=parameters.g_startY; values.b_currentX=parameters.b_startX; values.b_currentY=parameters.b_startY; picture.R.hposition = parameters.r_startX; picture.R.vposition = parameters.r_startY; picture.G.hposition = parameters.g_startX; picture.G.vposition = parameters.g_startY; picture.B.hposition = parameters.b_startX; picture.B.vposition = parameters.b_startY; values.t_roundstart=0; values.t_firstmove=0; values.t_solution=0; values.subjectmoves=0; values.subjectattempts+=1; values.problemscore=0; values.movestring=""; values.choicecount=0 ] / stimulusframes = [1=background,resetmsg] / validresponse = (anyresponse) / trialduration = parameters.intertrialinterval / recorddata = false / branch = [trial.choice] *************************************************************************************************************** Select Object *************************************************************************************************************** / ontrialbegin = [ values.a_count=0; values.b_count=0; values.c_count=0; if(values.r_currentX==parameters.h1) values.a_count+=1; if(values.g_currentX==parameters.h1) values.a_count+=1; if(values.b_currentX==parameters.h1) values.a_count+=1; if(values.r_currentX==parameters.h2) values.b_count+=1; if(values.g_currentX==parameters.h2) values.b_count+=1; if(values.b_currentX==parameters.h2) values.b_count+=1; if(values.r_currentX==parameters.h3) values.c_count+=1; if(values.g_currentX==parameters.h3) values.c_count+=1; if(values.b_currentX==parameters.h3) values.c_count+=1; values.choicecount+=1; if(values.choicecount==1) values.t_roundstart=script.elapsedtime; values.t_choicestart=script.elapsedtime; picture.apeg.droptarget = expressions.available_a_slots; picture.apeg.dropY = expressions.vnext_a; picture.bpeg.droptarget = expressions.available_b_slots; picture.bpeg.dropY = expressions.vnext_b; picture.cpeg.droptarget = expressions.available_c_slots; picture.cpeg.dropY = expressions.vnext_c; list.monkeyPegs.clearitems(); if (picture.apeg.droptarget) list.monkeyPegs.appenditem("apeg"); if (picture.bpeg.droptarget) list.monkeyPegs.appenditem("bpeg"); if (picture.cpeg.droptarget) list.monkeyPegs.appenditem("cpeg"); picture.R.dropsource = (expressions.top_in_a == "R" || expressions.top_in_b =="R" || expressions.top_in_c == "R"); picture.G.dropsource = (expressions.top_in_a == "G" || expressions.top_in_b =="G" || expressions.top_in_c == "G"); picture.B.dropsource = (expressions.top_in_a == "B" || expressions.top_in_b =="B" || expressions.top_in_c == "B"); ] / stimulusframes = [1=background,probleminfo,moveinfo,targetstate,base,apeg,bpeg,cpeg, R,G,B,resetround,nextround] / inputdevice = dragdrop / validresponse = (apeg,bpeg,cpeg,resetround,nextround, 0) / isvalidresponse = [ if (trial.choice.response == "apeg") { picture.apeg.droptarget; } else if (trial.choice.response == "bpeg") { picture.bpeg.droptarget; } else if (trial.choice.response == "cpeg") { picture.cpeg.droptarget; } else true; ] / monkeyresponse = ("resetround", "nextround", list.monkeyPegs.nextvalue, list.monkeyPegs.nextvalue) / responsemessage = (resetround,clickresetround,250) / responsemessage = (nextround,clicknextround,250) / recorddata = true / ontrialend = [ values.t_choiceend=script.elapsedtime; values.timeleft -= (values.t_choiceend - values.t_choicestart); if (trial.choice.response != "resetround" && trial.choice.response != "nextround" && trial.choice.response != 0) { values.r_currentX = picture.R.hposition; values.r_currentY = picture.R.vposition; values.g_currentX = picture.G.hposition; values.g_currentY = picture.G.vposition; values.b_currentX = picture.B.hposition; values.b_currentY = picture.B.vposition; if(values.subjectmoves==0) values.t_firstmove=script.elapsedtime; values.subjectmoves+=1; values.movestring=concat(values.movestring, trial.choice.lastdroptarget); } ] / branch = [ if(trial.choice.response=="resetround") { if (values.subjectattempts < parameters.maxattempts) trial.resetround; else trial.stopblock; } else if (trial.choice.response == "nextround" || trial.choice.response == 0) trial.stopblock; else if (expressions.targetachieved) trial.feedback; else trial.choice; ] / timeout = values.timeleft *************************************************************************************************************** Feedback Trial *************************************************************************************************************** / ontrialbegin = [ values.t_solution = script.elapsedtime; list.solutionTimes.appenditem(expressions.solutiontime); list.executionTimes.appenditem(expressions.executiontime); if(expressions.excessmoves == 0){ values.problemscore = parameters.maxattempts - (values.subjectattempts - 1) }; values.totalscore = values.totalscore + values.problemscore; if (values.problemscore > 0){ list.solutionTimes_correctSolutions.appenditem(expressions.solutiontime); list.executionTimes_correctSolutions.appenditem(expressions.executiontime); }; ] / stimulusframes = [1=background,probleminfo,moveinfo,targetstate,base,apeg,bpeg,cpeg,R,G,B,feedbackmsg] / validresponse = (anyresponse) / trialduration = parameters.feedbackduration / branch = [ if(expressions.excessmoves > 0 && values.subjectattempts < parameters.maxattempts) trial.resetround else trial.stopblock ] / recorddata = true *************************************************************************************************************** Stop block if all practice / test items have been completed. *************************************************************************************************************** / ontrialbegin = [ if(script.currentblock == "practice" && list.problemnumber.selectedcount == parameters.npracticeproblems) values.stopblock = 1; if(list.problemnumber.unselectedcount==0) values.stopblock = 1; ] / validresponse = (anyresponse) / trialduration = 0 / branch = [trial.newround] / recorddata = false ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** / preinstructions = (practice) / onblockend = [values.stopblock=0] / stop = [values.stopblock==1] / trials = [1=newround] / preinstructions = (test) / onblockbegin = [values.totalscore=0] / stop = [values.stopblock==1] / trials = [1=newround] ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** / preinstructions = (intro) / postinstructions = (end) / blocks = [1=practice; 2=test] /onexptend = [values.completed = 1] ************************************************************************************************************** End of File **************************************************************************************************************