Anagram

Study the time to rearrange scrambled letters to form a valid word

Anagrams are a string of letters which must be rearranged to form a valid word or phrase.

Because solving anagrams requires a certain level of cognitive flexibility, anagrams are often used to measure stress, anxiety, sleep deprivation,  or sedative drug effects (Walker et al., 2002).

When designing anagrams, the characteristics of the target word (e.g. imagery, familiarity, concreteness, length), or solvability can be used to control difficulty of an anagram (Gilhooly, 1978; Valeryjev, 2020). Anagrams may also intentional by unsolvable to induce stress or mood states which negatively affect the performance in following cognitive tasks (Starcke, 2017).

Solving an anagram requires the subject to rearrange the scrambled letters as well as classifying the outcome as a qualified phrase.  Research suggests that these two steps are not sequential, but the discovery of the correct word can be facilitated by semantic priming (White, 1988)

Publications

Gilhooly, K.J., (1978). Bigram statistics for 205 five-letter words having single-solution anagrams. Behavior Research Methods & Instrumentation, 1978, Vol. 10 (3), 389-392

Starcke, K., Agorku, J.D., & Brand, M., (2017).  Exposure to Unsolvable Anagrams Imparis Performance on the Iowa Gambling Task.  Frontiers in Behabioral Neuroscience, June 2017, Vol. 11, 114.

Valerjev, P., Dujmovic, M. (2020). The impact of the length and solvability of anagrams on performance and metacognitive judgements. In 21st Psychology days in Zadar: Book of Selected Proceedings, Publisher:  University of Zadar, Department of Psychology

Walker M.P., Liston C., Hobson J.A., Stickgold R. (2002). Cognitive flexibility across the sleep–wake cycle: REM-sleep enhancement of anagram problem solving. Cognitive Brain Research. 2002;14(3):317-324.

White, H. (1988). Semantic priming of anagram solutions. The American Journal of Psychology, 101(3), 383–399. https://doi.org/10.2307/1423086

 

; This script is only an sample. To run this script go to www.cognitionlib.com and copy & paste this content into the online editor.

SCREENAREA 150 150
COLOR White C 0 0 95
COLOR Black C 0 0 0
SCREENCOLOR Black White

; ========== instructions

PICTURE Title T
Instruction

PICTURE Intro T
In this task you will be asked to solve anagrams.
You should use every letter provided to create a valid word.

Click on the letters to construct the new word.
If you have found the solution, click on submit.
Delete will undo your selection.

These items were taken from a general intelligence task
and your performance will be compared to other people.

Please do this task as quickly and as accurately as possible.
You will have three minutes to correctly complete
as many anagrams as possible.

PICTURE Start T
Click to start with the task

PICTURE Continue T
Press mouse key to proceed with the next anagram

PICTURE End T
End of Preview!

FONT VeryBig Arial 10 1 Bold
FONT Big Arial 8 1 Bold
FONT Medium Arial 5 1.3
FONT MedBold Arial 5 1.3 Bold

POSITION TitlePos P 0,-55
POSITION TxtPos P 0,0
POSITION PromptPos P 0,55

KEY Click ML MR Space

; ========= variables and expressions for dynamic computations

VARIABLE INPUT
VARIABLE ANSWER 0
VARIABLE CORRWRD 0
VARIABLE INDEX 0 0
VARIABLE TOTRT 0 0
VARIABLE TRT 0

; convert T1, T2, T3, .. keys into position index 1, 2, 3,
EXPRESSION GetIndex
@INDEX = slice(get_rsp(‘key’),1)
@TOTRT = @TOTRT + get_rsp(‘rt’)
@TRT = numform(@TOTRT,1)

; get letter which was displayed at pos index X and add to echo buffer
EXPRESSION GetResp
@TMPIC = get_obj(‘PICTURE’, ‘@?’)
@NEWLETT = @TMPIC.content.txt[@INDEX – 1]
@INPUT = if(@INPUT == ‘?’, ”, @INPUT)
@INPUT = @INPUT || @NEWLETT
@ANSWER = @NEWLETT
@fbo = if(@INPUT == ‘@?’, 2, 1)
set_fb(@fbo)

EXPRESSION SetFB
@fbo = if(@INPUT == ‘@?’, 2, 1)
set_fb(@fbo)

; delet last letter when user press delete
EXPRESSION DelResp
@INPUT = slice(@INPUT, 0, -1)
@INPUT = if(@INPUT == ”, ‘?’, @INPUT)
@ANSWER = get_rsp(‘key’)

; save input buffer in answer variable which is logged in results and reset input buffer
EXPRESSION Reset
@ANSWER = @INPUT
@INPUT = ‘?’
@TOTRT = 0

TRIAL Intro
CS 1000
SF Big
SP Title TitlePos
SF Medium
&SP Intro TxtPos
&SF MedBold
&SP Start PromptPos 1
WK Click
CS 1000
EX Reset

TRIAL WrapUp
CS 1000
SF Big
SP End TxtPos 1 3000
CS 100

 

; ======= Anagram Task

FONT Echo Courier 10 1 bold
FONT Choice Courier 6 1 bold

PICTURE Press N

PICTURE Echo T
@VInput@

POSITION Center P 0,0
POSITION EchoPos P 0,-30
POSITION ActionPos P -20,10 20,10

PICTURE DEL T
Delete
PICTURE RET T
Submit

PICTURE OYT N ; 3 TOY
PICTURE ODOF N ; 4 FOOD
PICTURE OPAIN N ; 5 PIANO
PICTURE UNTERA N ; 6 NATURE
PICTURE HINZOOR N ; 7 HORIZON
PICTURE PECTURMO N ; 8 COMPUTER
PICTURE BLANCAMUE N ; 9 AMBULANCE

PICTURE Button D
Rect 0,0 10,10
Stroke 0.8

PICTURE Filled D
Rect 0,0 10,10
Stroke 0.1

SET Buttons V Button

POSITION Grid3 M 0,-10 15,15 3,1
POSITION Grid4 M 0,-10 15,15 4,1
POSITION Grid5 M 0,-10 15,15 5,1
POSITION Grid6 M 0,-10 15,15 6,1
POSITION Grid7 M 0,-10 15,15 7,1
POSITION Grid8 M 0,-10 15,15 8,1
POSITION Grid9 M 0,-10 15,15 9,1

KEY AllKeys A B C D E F G H I J K L M N O P Q R S T U V W X Y DEL RET

SET SplitChars N dummy
KEY MatchKeys A
SET EditKeys K DEL RET

TRIAL ShowAna
SF Choice
KP 1
TL ? – 10 10 1 ; Each position will be a hot zone T1, T2, ..
PS ? SplitChars ; split anagram into individual characters
UK SplitChars MatchKeys ; convert characters into key definition
UK EditKeys MatchKeys 0 ; add del and ret keys to the key definition
RK MatchKeys ; this activate only the keys needed for one anagram
FP – *1 1 0 Buttons ; fill all positions with frame
&SP *2 *1 0 ; show anagram spread across all locations
&SF VeryBig
&SP Echo EchoPos
&TP 1 ; next pic definition will be a hot zone
&SF Medium
&SP DEL ActionPos 1
&SF MedBold
&SP RET ActionPos 2 0 1
TP 0

FB SPACE

EX GetIndex
LP Filled *1 Index ; reserve the field which has been clicked

OK ; handle delete and submit
RET: CS 1000
RET: RP *1
RET: EX setfb ?
RET: EX Reset
RET: ET 1 1
DEL: RP *1 1
DEL: EX DelResp
DEL: GT 1 0 1
DEL: ET 1 1

EX GetResp *2 *3 ;
GT 1 0 1

; ============ Block and Session definition

BLOCK Sample 7
1 ShowAna Grid3 OYT TOY
1 ShowAna Grid4 ODOF FOOD
1 ShowAna Grid5 OPAIN PIANO
1 ShowAna Grid6 UNTERA NATURE
1 ShowAna Grid7 HINZOOR HORIZON
1 ShowAna Grid8 PECTURMO COMPUTER
1 ShowAna Grid9 BLANCAMUE AMBULANCE

SESSION Anagram Sample
RUNTRIAL Intro
MAXTIME 60 0 0
RUNBLOCK Sample 7 1
RUNTRIAL WrapUp