User Manual: Inquisit Maze Task


										German Version
																														


___________________________________________________________________________________________________________________	

								Maze Task
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-27-2025
last updated:  09-03-2025 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 09-03-2025 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a Maze Task to investigate spatial navigation, visuoconstructional ability, and 
executive functions of planning and foresight.
The current script is inspired by the Snell Grove Mazetask (SMT) and Computerized Mazetask published 
by Ott et al (2008) which were designed as a screening test for road (in)competence in older adults.
A more child-friendly design was selected for this script to make it more flexible for a larger audience.

The current script runs one practice maze (5x5) and one test maze (10x10) but can be easily edited to run 
more/different mazes. Check out helper script 'mazetask_stims1_inc.igjs'.

It is recommended to run the task on ipad sized touchscreens with a stylus pen to 
imitate a pencil and paper administration.
However, the task can also be run with a computer mouse on non-touchscreens.
The default settings will run the script with proportional stimuli sizing but can be
easily changed to use absolute sizing instead.

/*References:*/										

Snellgrove, C. (2005). Cognitive screening for the safe driving competence of older people with 
mild cognitive impairment or early dementia. ATSB Report. 
http://www.atsb.gov.au/ publications/2005/pdf/cog_screen_old.pdf.

Snellgrove, C. (2006). Older drivers with mild cognitive impairment or early dementia. 
University of Adelaide. [Unpublished PhD Thesis].

Ott, B. R., Festa, E. K., Amick, M. M., Grace, J., Davis, J. D., & Heindel, W. C. (2008). 
Computerized Maze Navigation and On-Road Performance by Drivers With Dementia. 
Journal of Geriatric Psychiatry and Neurology, 21(1), 18–25. 
https://doi.org/10.1177/0891988707311031

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________

After practising on a 5x5 maze, participants are asked to help a hungry mouse find its way quickly 
through a 10x10 maze to get to the cheese at the exit. Participants are explicitly asked to avoid
hitting deadends.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 3 minutes to complete

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONAIRY
___________________________________________________________________________________________________________________		
The fields in the data files are:

(1) Raw data file: 'XXX_raw*.iqdat'

build:						The specific Inquisit version used (the 'build') that was run
computer.platform:			the platform the script was run on (win/mac/ios/android)
computer.touch:				1 = the current screen has touchscreen capabilities; 0 = otherwise
date, time: 				date and time script was run 
subject:					with the current subject id
group: 						with the current group id
session:					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. 
								
practiceMazesCounter:		tracks the number of practice mazes run 
testMazesCounter:			tracks the number of test mzaes run								
								
mazeID: 					default: 0 (practice), 1 (test)
maxMazeDuration:			the maximum time allotted to the maze
solutionPath: 				the solution path of the current maze (stores the matrix 'boxes' that need to be travelled)
solutionPathLength:			the length of the solution path (in number of boxes)
mazeTimestamp:				the script.elapsedtime of the onset of the maze

updated at the end of evaluating the current response:
prevBox: 					store the previous box (for the upcoming response)
currentBox: 				stores the current box (for the upcoming response)
newBox: 					stores the new box (for the current response; if valid will become the currentBox)

violation: 					0 = currently no violation (e.g. lifting stylus or trying to cross a wall) 
							1 = current violation
							
path: 						stores the matrix path taken (stores the matrix 'boxes' that participant travelled through)
pathLength:					length of path travelled (in number of boxes)
invalidMovesCounter:		counts the number of invalid moves attemped (e.g. trying to cross a wall)

duration: 					the time it took to work on the current maze

planningRT: 				the duration (in ms) coded as planning time
								PlanningRT:
								- time spent until start box is pressed
								- time spent NOT drawing: 'not drawing' is operationalized as spending more than 1s on the same response box (no movement)
								=> time that is spent in excess of 1s on the same response box is added to the planningRT

success: 					0 = maze was not solved 
							1 = maze was solved
							
to: 						0 = maze was not timed out 
							1 = maze was timed out

pathDiffLength: 			= pathLength-solutionPathLength (for successful navigation, this measure shows how many boxes in excess of the minimum number was travelled)

detour: 					0 = participant is currently not a detour (currently on solutionPath going in the right direction); 
							1 = participant is currently on a detour (going away from solutionPath)
							
detourCounter: 				counts the number of times participant started to move in the wrong direction
deadEndsCounter:			counts the number of times participant actually reached a deadEnd


maze:						JSON string variable that stores the current maze settings


(2) Summary data file: 'xxx_summary*.iqdat'

inquisit.version:			Inquisit version run
computer.platform:			the platform the script was run on (win/mac/ios/android)
computer.touch:				1 = the current screen has touchscreen capabilities; 0 = otherwise
startdate:					date script was run
starttime:					time script was started
subjectid:					assigned subject id number
groupid:					assigned group id number
sessionid:					assigned session id number
elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
completed:					0 = script was not completed (prematurely aborted); 
							1 = script was completed (all conditions run)
							
numberPracticeMazes:		the number of practice mazes run
numberTestMazes:			the number of test mazes run							
							
//only for test mazes:							
id1:						the identification index of the first test maze
path1:						the chosen path towards the exit
success1:					1 = successfully navigated the maze to the exit; 0 = otherwise
liftOffs1:					number of time a finger/stylus was lifted off the screen (not possible if mouse is used)
violations1:				number of violations (e.g. wall crossings)
detourCount1:				number of detours taken (number of times path is going off into the wrong direction)
deadEndsCounter1:			number of times actual deadends are visited
planningRT1:				planning time in ms (see raw data for operationalization of planning RT is used in this script)
duration1:					the total duration of the first test maze

(Note: possible summary variables for up to 5 test mazes - fields stay empty if they are not used)							


(3)	Streaming data file: 'xxxx_stream*.iqdat'
This data file records relevant data after each stimulusframe (on a 60Hz monitor, roughly every 16ms)

inquisit.version:			Inquisit version run
computer.platform:			the platform the script was run on (win/mac/ios/android)
computer.touch:				1 = the current screen has touchscreen capabilities; 0 = otherwise
startdate:					date script was run
starttime:					time script was started
subjectid:					assigned subject id number
groupid:					assigned group id number
sessionid:					assigned session id number

display.height:				the height of the current screen in pixels 
display.canvasHeight:		the height of the current active canvas in pixels (active canvas = part of the screen used to run the script) 
display.refreshInterval:	the refreshinterval (in ms) of the current display 
expressions.pxPerMM:		px/mm conversion number	for the current display


script.elapsedTime:			current script.elapsedTime in ms (0 = start of script)
mazeID:						the current maze 
trialcode:					the current trial 

updated at the end of evaluating the current response:
prevBox: 					store the previous box (for the upcoming response)
currentBox: 				stores the current box (for the upcoming response)
newBox: 					stores the new box (for the current response; if valid will become the currentBox)

expressions.planning:		expressions that updates whether participant is likely in 'planning mode' (spends more than 1s on the same box)
							0 = not in planning mode
							1 = likely in planning mode

planningRT:					stores the current time (in ms) participant spent in 'planning mode'

							
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

(1) Practice: 1 5x5 Maze; with verbal instructions (instructions can be repeated)
(2) Test: 1 Mazes; TimeLimit: 3 minutes

Notes:
- participants cannot move through walls. If a wall-violation is detected, a red circle
appears in the middle of the currentBox and participants have to return to it before they can
move on.
- on touchscreens: when participants lift their finger/stylus, a red circle
appears in the middle of the currentBox and participants have to return to it before they can
move on.


//////////////////////////////////
//Errors
//////////////////////////////////
Detours: the script counts the number of times participants starts to go off in the wrong direction for each maze
DeadEnds: the script counts the number of times participants hit a deadend for each maze


//////////////////////////////////
//Planning RT
//////////////////////////////////

PlanningRT:
- time spent until start box is pressed
- time spent NOT drawing: not drawing operationalized as spending more than 1s on the same response box (no movement)
=> time that is spent in excess of 1s on the same response box is added to the planningRT

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

Mazes provided by Millisecond Software. The following maze generator was used
to generate them: https://codebox.net/pages/maze-generator/online

The provided mazes were selected to be somewhat comparable to the mazes used by the Snellgrove Maze Task (SMT)
in number of deadends and length of solution path (though the mazes in the SMT task have slightly more
deadends and a longer solution path). The currently provided mazes have not been validated/tested in research.

Practice: 5x5 matrix maze
Test: 10x10 matrix maze

Mazes can be edited and new mazes can be added in script: 'mazetask_stims1_inc.igjs'.
The procedure will automatically adapt to the specified maze sizes (max. size: 10x10)

Other images were downloaded from: pixabay.com

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited in script 'mazes_instructions_inc.iqjs'
___________________________________________________________________________________________________________________	
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:

//color parameter
/ canvasColor = white				//Display color of the actively used portion of the screen (the 'canvas')
									//Note: if set to a color other than the screenColor, you can distinguish the active canvas
									//from the inactive portion of the screen
									
/ screenColor = gray				//Color of the screen not used by the canvas ('inactive screen')
/ defaultTextColor = black			//Default color of text items


//CANVAS SIZING PARAMETERS
//sizing Parameters in RELATIVE measurements relative to CANVAS HEIGHT
//NOTE: to run the script with ABSOLUTE screen measurements, go to 'defaults' and set 
//canvasSize to absolute measurements (NOTE: the current default is set to an absolute canvassize)
										
//timing parameters
/ maxMazeDurationMS = 180000		//the max time (in ms) allotted to each test maze