Hearts and Flowers Task

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: March 26, 2018

Last Modified: August 06, 2026 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements the Hearts and Flowers Task (a child friendly Simon's Task), a test of Executive Control that is based on the Dot-Task by Davidson et al (2006). The Hearts and Flowers Task is described in Diamond et al (2007).

This script runs with keyboard input but adapts to touchscreen-only devices by providing response buttons as well as adapting visual/text instructions to the different platforms automatically. (for a task specifically designed for touchscreen/mouse input: check out heartsandflowerstask_mi.iqjs)

References

Diamond,A., Barnett, W.S., Thomas,J. & Munro, S. (2007). Preschool Program Improves Cognitive Control. SCIENCE, 318, 1387-1388 (as well as supporting documents)

Dot-Task:
M.C. Davidson, D. Amso, L.C. Anderson, A. Diamond (2006). Development of cognitive control and executive functions from 4 to 13 years: Evidence from manipulations of memory, inhibition, and task switching. Neuropsychologia 44, 2037–2078

Lisas Scores:
Vandierendonck A. On the Utility of Integrated Speed-Accuracy Measures when Speed-Accuracy Trade-off is Present. J Cogn. 2021 Mar 18;4(1):22. doi: 10.5334/joc.154. Erratum in: J Cogn. 2021 Nov 10;4(1):59. doi: 10.5334/joc.192. PMID: 33778368; PMCID: PMC7977027.

Duration

7 minutes

Description

Participants are presented trials with either a heart or a flower that appear to the left or right of a fixation cross. If participants see a heart, they are asked to press the corresponding left ('A') or right ('L') response button (=congruent trials). For example, if the heart is left to the fixation cross, participants are asked to press the left ("A") key. If participants see a flower, they are asked to press the opposite response button (=incongruent trials). For example, if the flower is left to the fixation cross, participants are asked to press the right ("L") key.

3 main blocks to test the three core abilities of Executive Control (Diamond et al, 2007)*: 1) only congruent trials: participants work through a block of heart trials (Working Memory) 2) only incongruent trials: participants work through a block of flower trials (Working Memory + Inhibitory Control) 3) mixed trials: participants work through a random mix of heart and flower trials (Working Memory + Inhibitory Control + Cognitive Flexibility)

The following are the three core abilities of Executive Control (Diamond et al, 2007) 1. Working Memory: Remember the rules and execute them accordingly 2. Inhibitory Control: Ability to override behavioral impulses 3. Cognitive Flexibility: Adapt behavior to changing demands

Procedure

3 main conditions: run in sequence
1. Congruent-Only: 20 'heart' trials (10 hearts appear left, 10 hearts appear right):
press matching response button

2. Incongruent-Only: 20 'flower' trials (10 flowers appear left, 10 flowers appear right):
press opposite response button

3. Mixed*: 10 'heart' trials (5 hearts left, 5 hearts right), 10 'flowers' trials
(5 flowers left, 5 flowers right)
=> random order with constraint that max. 3 of the same trials can be run consecutively
=> number of switch trials will vary (minimum number of switch trials = 6 for 20 trials)
switch trial: switch from congruent to incongruent trial and vice versa
• Diamond et al (2007) do not specify how the mixed condition is set up in detail other than that
the trials were randomly intermixed. In this script, a constraint was placed on the random selection to
ensure that a minimum of switch trials would run for each participant.


Each condition runs:
A. Practice Block(s): a maximum of 3 (default, can be set under section Editable Parameters) practice blocks of
8 trials. If participants reach a performance of 75% correct (default, can be set under
section Editable Parameters) during any of the blocks, the test block is started - otherwise the script is aborted
after 3 unsuccessful practice blocks.
During practice, participants receive positive feedback for 500ms in the form of a 'smiley' and auditory feedback
if they press the correct response button. For incorrect responses as well as noresponses, participants will
get a visual and auditory reminder of the rules and have to retry the trial (at this point, only correct responses
are accepted to move to the next trial).

B. Test Block:
Each Test Block runs 20 trials.

number of trials per block can be set under section Editable Parameters

Trial Sequence:
stimulus (heart or flower)-> max. 5000ms(congruent-only and incongruent-only)/6000ms (mixed) -> iti: 1000ms
(timings can easily be changed under section Editable Parameters)

Stimuli

provided by Millisecond - can be edited under section Editable Stimuli

Instructions

provided by Millisecond (not original to Diamond et al, 2007)- can be edited under
section Editable Instructions
different visual stimuli are provided for devices with keyboards vs. devices without keyboards

The instruction stimuli for devices with detected external keyboards are located in helper script:
hearsandflowers_instructions_keyboard.iqjs

The instruction stimuli for devices without detected external keyboards are located in helper script:
hearsandflowers_instructions_touchscreen.iqjs

Scoring

Linear Integrated Speed-Accuracy Scores (Lisas): (Vandierendonck, 2021)
A LISAS score is simply the weighted sums of the RT and PE measures, with weights being calculated as the ratio of
the (correct) response time standard deviation to the error rate standard deviation.
LISAS output is expressed in units of time. It represents an individual's "error-corrected processing speed".

LISAS = meanRT(of correct responses) + (sdRT/sdErrors) * propErrors

=> A low LISAS means the participant was both fast and accurate; the minimum LISAS that can be assigned to a participants
equals their mean correct response time (this happens with error rates = 0);
=> A high LISAS means the participant struggled with accuracy or had to drastically slow down to maintain accuracy

in this script sdRT and sdErrors are based on the pooled standard deviation, separate for BLOCKED
and MIXED trials

Summary Data

File Name: heartsandflowerstask_keyboard_summary*.iqdat

Data Fields

NameDescription
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
Practice Performance
countCongruent Counts the number of congruent practice blocks run
practiceAccCongruent The highest proportion correct in one of the congruent practice blocks (if not run, propCorrect = 0)
passCongruent 1 = participant successfully passed the congruent practice
0 = otherwise
countIncongruent Counts the number of incongruent practice blocks run
practiceAccIncongruent The highest proportion correct in one of the incongruent practice blocks (if not run, propCorrect = 0)
passIncongruent 1 = participant successfully passed the incongruent practice
0 = otherwise
countMixed Counts the number of mixed practice blocks run
practiceAccMixed The highest proportion correct in one of the mixed practice blocks (if not run, propCorrect = 0)
passMixed 1 = participant successfully passed the mixed practice
0 = otherwise
Test Performance
propCorrect Proportion correct across all test trials
meanRT Mean latency of correct responses across all test trials
propCorrectCongruent Proportion correct across congruent-only test trials
meanRTCongruent Mean latency of correct responses across congruent-only test trials
propCorrectIncongruent Proportion correct across incongruent-only test trials
meanRTIncongruent Mean latency of correct responses across incongruent-only test trials
propCorrectMixed Proportion correct across test trials in mixed block
meanRTMixed Mean latency of correct responses across test trials in mixed block
propCorrectMixedSwitch Proportion correct across switch trials in mixed block
meanRTMixedSwitch Mean latency of correct responses across switch test trials in mixed block
switch trial: switch from congruent to incongruent trial and vice versa
propCorrectMixedNonSwitch Proportion correct across nonswitch trials in mixed block
meanRTMixedNonSwitch Mean latency of correct responses across nonswitch test trials in mixed block
propCorrectMixedCongruent Proportion correct across congruent test trials in mixed block
meanRTMixedCongruent Mean latency of correct responses across congruent test trials in mixed block
propCorrectMixedIncongruent Proportion correct across incongruent test trials in mixed block
meanRTMixedIncongruent Mean latency of correct responses across incongruent test trials in mixed block
simonEffect Ms difference in "[mean corrRT mixed Incongruent] - [mean corrRT mixed Congruent]"
positive value: participants responded faster when
stimulus location and response button location were congruent
("stimulus-response compatibility") => Simon Effect
[negative value: participants responded faster when
stimulus location and response button location
were incongruent]
Speed-Accuracy Trade Off: Linear Integrated Speed-Accuracy Score, Lisas ("Error-Corrected Processing Speed" In Ms)
sdRTBlockedPooled The pooled standard deviation of correct response times across all BLOCKED test trials
errorSDBlockedPooled The pooled standard deviation of error rates across across all BLOCKED test trials
lisasBlockedCongruent LISAS score for Congruent trials in BLOCKED condition
lisasBlockedIncongruent LISAS score for Incongruent trials in BLOCKED condition
sdRTMixedPooled The pooled standard deviation of correct response times across all MIXED test trials
errorSDMixedPooled The pooled standard deviation of error rates across across all MIXED test trials
lisasMixedCongruent LISAS score for Congruent trials in MIXED condition
lisasMixedIncongruent LISAS score for Incongruent trials in MIXED condition
Simon Bias Scores Based On: Accuracy, Response Times, And Lisas, Separate For Blocked And Mixed Conditions
simonEffectBlockedAcc Difference in proportions correct "[congruent] - [incongruent]" for BLOCKED trials
positive value: participants made more errors on incongruent than on congruent trials in BLOCKED trials
simonEffectBlockedRT Ms difference in "[mean corrRT Incongruent] - [mean corrRT Congruent]" for BLOCKED trials
positive value: participants responded faster on congruent than on incongruent trials in BLOCKED trials
simonEffectBlockedLisas Difference in LISAS scores ("error-corrected processing speed") from Incongruent
and Congruent Trials (lisasIncongruent - lisasCongruent) for BLOCKED trials
=> integration of response time and accuracy in one measure
=> positive difference, "error-corrected processing speed" was faster for Congruent than for Incongruent ones in BLOCKED trials
=> a positive difference supports that processing Incongruent trials required more cognitive effort, time, or
accuracy sacrifices than processing congruent trials in BLOCKED trials
simonEffectMixedAcc Difference in proportions correct "[congruent] - [incongruent]" for MIXED trials
positive value: participants made more errors on incongruent than on congruent trials in MIXED trials
simonEffectMixedRT Ms difference in "[mean corrRT Incongruent] - [mean corrRT Congruent]" for MIXED trials
positive value: participants responded faster on congruent than on incongruent trials in MIXED trials
simonEffectMixedLisas Difference in LISAS scores ("error-corrected processing speed") from Incongruent
and Congruent Trials (lisasIncongruent - lisasCongruent) for MIXED trials
=> integration of response time and accuracy in one measure
=> positive difference, "error-corrected processing speed" was faster for Congruent than for Incongruent ones in MIXED trials
=> a positive difference supports that processing Incongruent trials required more cognitive effort, time, or
accuracy sacrifices than processing congruent trials in MIXED trials

Raw Data

File Name: heartsandflowerstask_keyboard_raw*.iqdat

Data Fields

NameDescription
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
condition 1 = congruent-only
2 = incongruent-only
3 = mixed
position 1 = stimulus is positioned on the left
2 = stimulus is positioned on the right
congruence 1 = congruent trial
2 = incongruent trial
prevCongruence The congruence of the previous trial (important for mixed condition only)
switch 1 = switch trial (trial type changed from congruent to incongruent or vice versa)
2 = nonswitch trial (trial type stayed the same)
countSwitch Counts the number of switch trials per block
stimulusItem.1 The presented stimuli in order of trial presentation
response The participant's response (scancode of responsebutton)
30 = A = left
38 = L = right
(57 = spacebar)
correct Accuracy of response
1 = correct response
0 = otherwise
latency The response latency (in ms); measured from: onset of stim
list.accPractice.mean The proportion correct during the current practice block
countCongruent Counts the number of congruent practice blocks run
countIncongruent Counts the number of incongruent practice blocks run
countMixed Counts the number of mixed practice blocks run

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design
minPracticeAcc The minimum practice performance (proportion correct) to let participants move from a
practice block to a test block
0.75
maxPracticeRepeats Number of times a practice blocks can be repeated before the script is aborted3
numberPracticeTrials The number of practice trials per practice block8
numberTestTrials The number of test trials per test block
the number of trials should be divisible by 4
20
Sizing Parameters
picSize The proportional sizing (proportional to canvas height) of the pictures10%
fixationSize The proportional sizing (proportional to canvas height) of the fixation cross15%
leftX The left x-coordinate in canvas percentage30%
rightX The right x-coordinate in canvas percentage
left edge of canvas = 0%, right edge of canvas = 100%
(canvas = portion of the screen dedicated for the script)
70%
Duration Parameters
stimDurationBlocked The duration (in ms) of the stimulus presentation (= response timeout) for a 'simple' (= one stimulus) block5000
stimDurationMixed The duration (in ms) of the stimulus presentation (= response timeout) for the mixed block6000
iti The intertrial interval (in ms)1000
Responsekeys
leftKey The left response button (left on QWERTY keyboard)"A"
rightKey The right response button (right on QWERTY keyboard)"L"