Return to the Tangrams Puzzle Task page
						
										TANGRAMS DEMO SCRIPT
SCRIPT INFO

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

Script Copyright © 09-15-2016 Millisecond Software


BACKGROUND INFO 

											*Purpose*
This script implements a Tangram script inspired by:
www.abcya.com/tangrams.htm


											  *Task*
Participants are given 7 individual geometric shapes and are asked to use them to create 6 complex figures. 
Shapes can be moved via drag and drop. Once a  shape is moved, it moves into "rotation mode" and can be rotated via 
a rotation console that is located at the bottom right of the screen. During "rotation mode", no drag and drop can happen.
The rotation mode is exited via a click anywhere on the canvas (with exceptions of the rotation arrows).
By default, the task is self-paced.


DATA FILE INFORMATION: 
The default data stored in the data files are:

(1) Raw data file: 'Tangrams_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) 
/practice:						1 = practice trial; 0 = test trial
/countTangrams:					counts the number of Tangram test problems presented
/selecttangram:					stores the itemnumber of the currently presented test tangram									
response:						the participant's response
/response:						stores 'submit' once the submit button was pressed (board otherwise)
latency: 						the response latency (in ms) of the current trial
/sumRT:							latency (in ms) of each tangram solution attempt. Measured from onset of tangram to pressing of "submit" button
/correct:						1 = all 7 shapes were correctly placed; 0 = otherwise
									!!!NOTE: the algorithm expressions.determineCorrectResponses may not work correctly if different tangrams are used.
/correctPlacements: 			number of correct placements (Max = 7); correct placement = orientation of shape is correct AND its center is within paramters.max_deviationTolerance (default: 5%) of the correct center coordinates
									!!!NOTE: the algorithm expressions.determineCorrectResponses may not work correctly if different tangrams are used.
/correct1-
/correct7:						1 = shape was correctly placed on tangram; 0 = otherwise (for each of the 7 shapes)
									!!!NOTE: the algorithm expressions.determineCorrectResponses may not work correctly if different tangrams are used.

for shapes 1-7: 

!Note: please keep in mind that shape1/2 and shape3/4 are interchangeable.
Furthermore, for some configurations alternative itemnumbers (not stored in the datafile) for several shapes can be correct as well

/correctRotation1_itemnumber:	the correct itemnumber stored for the rotated stimuli for shape 1-7 
/select1:						the selected itemnumber of the rotated stimuli for shape 1-7 
/correctX1:						the correct horizontal percentage coordinates for shapes 1-7  
/correctY1:						the correct vertical percentage coordinates for shapes 1-7 
/finalX1:						the final horizonal percentage coordinates for shapes 1-7 (Note: if shape was NOT moved, the pixel converted percentages are off) 
/finalY1:						the final vertical percentage coordinates for shapes 1-7 (Note; if shape was NOT moved, the pixel converted percentages are off)

									
(2) Summary data file: 'Tangrams_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)
/nrCorrect:						number of correctly solved Tangrams
/propCorrect:					proportion correctly solved Tangrams 
/meanRT:						mean latency (in ms) of correctly solving a Tangram
/SD_RT:							standard deviation (in ms) of the latencies of correctly solving a Tangram
/tangram1_correct:				1 = tangram 1 was correctly solved; 0 = otherwise
/tangram1_duration:				duration (in ms) of tangram1 solution
(same for all 6 tangrams)


* 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
* 1 practice tangram
* 6 tangrams are presented in predetermined order (by default - order can be randomized/changed -> list.tangramPresentationOrder)
* the 7 shapes are presented in the same screen positions but with a randomly determined rotation angle (Note: start angle can be edited under list.selectStartitemnumber)
* no time limit for solution (self-paced)
* participants can either move the individual shapes around or rotate them in a 2D plane by 45degrees using a provided 
"Rotation Console" on the lower right of the screen
* solution is submitted by clicking on a "submit" button

Algorithm to determine correct placement of shapes:
- the algorithm to determine the correct placement of shapes assumes that 
the provided shapes are being used -  it might not function properly with
a different assortment of tangrams nor a different assortment of simple shapes
- it compares the final rotated angle of each shape with all possible correct
rotations for this particular shape and then (if a match is found) 
- checks whether the  final shape coordinates are within the tolerated distance of the correct 
coordinates for this particular rotation.
(algorithm doesn't check placement if the shape is not rotated to the/any correct angle)
- for identical shapes it is also checked if the shapes occupy different
areas of the tangram figure (as they cannot sit on top of each other) 


STIMULI
6 tangrams and 5 different shapes are provided by Millisecond Software (www.abcya.com/tangrams.htm)-
Note: if different tangrams are used, the lists for each tangram as well as the 
algorithm for correct responses need to be adapted accordingly.

INSTRUCTIONS
provided by Millisecond Software - see 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:

/max_deviationTolerance:	the acceptable percentage difference between the correct placement of the images and the final placement of images (=center of image)
							to still be evaluated as correct (if the shape is correctly rotated)
							Note: 'correct' placement coordinates were determined by manually clicking on the centers of the 
							correctly positioned shapes and recording the corresponding percentage coordinates in the data file.

Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment