Hungry Donkey Task

Technical Manual

Script Author: David Nitz (dave@millisecond.com), Millisecond

Last Modified: January 15, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements the 'Hungry Donkey Task', a child friendly Iowa Gambling Task. The task assesses risk learning utilizing rewards and punishment in an uncertain simulated real-life decision making context.

The implememted procedure is described in Crone & van der Molen (2004).

References

Crone, E. A., & van der Molen, M. W. (2004). Developmental changes in real life decision making: Performance on a gambling task previously shown to depend on the ventromedial prefrontal cortex. Developmental Neuropsychology, 25(3), 251-279.

The picture stimuli used in this task were adapted from the open source PEBL Test Battery available at 'https://pebl.sourceforge.net'.

Duration

20 minutes

Description

The goal of the game is to collect as many apples as possible for a hungry donkey. The apples can be found behind 4 doors. Each door can either offer apples (reward) or take apples away (punishment) or both at the same time. The 4 doors are tied to 4 different reinforcement schedules: two of the doors offer overall more apples than take them away (advantageous doors); two doors overall take more apples than offer them (disadvantageous doors).

Procedure

2 conditions (standard, reverse), tested within-subjects, order is counterbalanced by groupnumber aassignment
=> 200 trials in each block

Standard: Doors C, D are advantageous (across 10 draws: gain of 10 apples); doors A, B are disadvantageous (across 10 draws: loss of 10 apples)
Reverse: Doors C, D are disadvantageous; doors A, B are advantageous

win/loss amounts of apples are sampled randomly from a list of 10 possible outcomes that are different for each door.
After 10 selections, the lists reset.

Stimuli

The picture stimuli used in this task were adapted from the open source PEBL Test Battery
available at 'https://pebl.sourceforge.net'.

Instructions

The instructions can be edited in script hungrydonkeytask_instructions_inc.iqjs

Summary Data

File Name: hungrydonkeytask_summary*.iqdat

Data Fields

NameDescription
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
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
total Total earned
globalGain Amount of apples gained across the whole task with separate
counts for standard and reversed version.
globalLoss Amout of apples lost across the whole task with separate
counts for standard and reversed version.
dooraGain Amount of apples gained across the whole task for Door A with
separate counts for standard and reversed version.
dooraLoss Amount of apples lost across the whole task for Door A with
separate counts for standard and reversed version.
doorbGain Amount of apples gained across the whole task for Door B with
separate counts for standard and reversed version.
doorbLoss Amount of apples lost across the whole task for Door B with
separate counts for standard and reversed version.
doorcGain Amount of apples gained across the whole task for Door C with
separate counts for standard and reversed version.
doorcLoss Amount of apples lost across the whole task for Door C with
separate counts for standard and reversed version.
doordGain Amount of apples gained across the whole task for Door D with
separate counts for standard and reversed version.
doordLoss Amount of apples lost across the whole task for Door D with
separate counts for standard and reversed version.
doorahPosition Horizontal screen position for Door A and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doorbhPosition Horizontal screen position for Door B and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doorchPosition Horizontal screen position for Door C and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doordhPosition Horizontal screen position for Door D and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
trackingCondition Parameter: Adjustable parameter to switch between three different feedback
tracking conditions (i.e. which feedback bars are available).
'1' -> Display global and local feedback.
'2' -> Display only global feedback.
'3' -> Display no visual feedback at all.

Raw Data

File Name: hungrydonkeytask_raw*.iqdat

Data Fields

NameDescription
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
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
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.
doorsSelected Running count of the number of doors selected by the subject.
latency The response latency (in ms)
response The participant's response (selected door)
currentGain Amount of apples gained in a given trial.
currentLoss Amount of apples lost in a given trial.
total Total earned
globalGain Amount of apples gained across the whole task with separate
counts for standard and reversed version.
globalLoss Amout of apples lost across the whole task with separate
counts for standard and reversed version.
dooraGain Amount of apples gained across the whole task for Door A with
separate counts for standard and reversed version.
dooraLoss Amount of apples lost across the whole task for Door A with
separate counts for standard and reversed version.
doorbGain Amount of apples gained across the whole task for Door B with
separate counts for standard and reversed version.
doorbLoss Amount of apples lost across the whole task for Door B with
separate counts for standard and reversed version.
doorcGain Amount of apples gained across the whole task for Door C with
separate counts for standard and reversed version.
doorcLoss Amount of apples lost across the whole task for Door C with
separate counts for standard and reversed version.
doordGain Amount of apples gained across the whole task for Door D with
separate counts for standard and reversed version.
doordLoss Amount of apples lost across the whole task for Door D with
separate counts for standard and reversed version.
doorahPosition Horizontal screen position for Door A and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doorbhPosition Horizontal screen position for Door B and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doorchPosition Horizontal screen position for Door C and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
doordhPosition Horizontal screen position for Door D and associated elements
assigned by 'trial.doorpositions' and 'list.doorpositions' at block
onset. By default, doors are positioned in alphabetical order from
left to right (A->B->C->D). See comments for 'list.doorpositions'
for further details.
trackingCondition Parameter: Adjustable parameter to switch between three different feedback
tracking conditions (i.e. which feedback bars are available).
'1' -> Display global and local feedback.
'2' -> Display only global feedback.
'3' -> Display no visual feedback at all.
Debugging Variable
applesPositionX The horizontal position of the apple feedback

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
feedbackDuration Duration of trial feedback in milliseconds. The original task used
2000 ms.
2000
trackingCondition Adjustable parameter to switch between three different feedback
tracking conditions (i.e. which feedback bars are available).
'1' -> Display global and local feedback.
'2' -> Display only global feedback.
'3' -> Display no visual feedback at all.
1
runStandard Pseudo-boolean switch to easily (de)activate the task's standard
version. '1' will run the standard version, '0' will skip the standard
block. By default, both standard and reversed version of the task
are run in counterbalanced order.
1
runReversed Pseudo-boolean switch to easily (de)activate the task's reversed
version. '1' will run the reversed version, '0' will skip the reversed
block. By default, both standard and reversed version of the task
are run in counterbalanced order.
1