Florida-And-Georgia Gambling Task - FLAG

Technical Manual

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

Created: April 14, 2025

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

Script Copyright © Millisecond Software, LLC

Background

This script implements the Florida-And-Georgia Gambling Task (FLAG) proposed by Wang et al (2024). The FLAG provides a framework to study the impact of value integration on gambling under uncertainty.

References

Wang S, Wilson R, Ebner NC, Lighthall NR. Modeling value integration during decision making under uncertainty: The Florida-and-Georgia (FLAG) gambling task. PsyArXiv; 2024. DOI: 10.31234/osf.io/6gp9n. preprint of article: https://osf.io/preprints/psyarxiv/6gp9n_v1

Original Game Code (Javascript) Available Here:
https://github.com/swan232/FLAG.

Duration

25 minutes

Description

Participants play a card game for points. They are given decks of cards with variable point distributions (positive and negative). Five cards are revealed to them ('sampling phase') before they have to make a choice ('choice phase'): uncover a sixth card from the deck and win (or lose) the points of this uncovered card or take a sure offer instead.

Procedure

Block Sequence
(1) Intro

(2) Practice: 4 practice decks with additional instructional pointers
- practice trials are all self-paced; timeouts are suspended
- the four practice decks are presented in fixed order (see list.deckInfoPractice; contains deck information from original javaScript program)

(3) Test: 100 test decks
- decks are presented in randomized order (see list.deckInfoTest; contains deck information from original javaScript program)

Trial Sequence:
- 'new deck' announcement: 1000ms

sampling phase: repeats for 5 cards ( sampling of cards is done in FIXED order for each deck)
- sampling start card (until response)
- card revelation (1000ms)

choice phase:
- choice: gamble deck vs. sure offer (until response) ( half the time the gamble deck is located on the left)
- feedback and score update: 1000ms

Stimuli

Deck Information
• information for the 100 decks was taken from the original javaScript program (https://github.com/swan232/FLAG)
(see list.deckInfoTest)
• each deck is assigned:
- a fixed sequence of cards for the sampling phase ( the last value is the amount that can be won from turning over the 6th card)
- the location of the gamble deck during the choice phase (0 = right; 1 = left); balanced
- the sure amount that is offered during the choice phase

from Wang et al (preprint)

- "Deck outcomes centered around an average score, which differed across games and
could either be positive or negative (e.g., +250 to -250 points)."
- "FLAG task symmetrically varies both the magnitude and frequency of gains in addition to losses,
resulting in an equal number (19) of trials with either large gains (e.g., 1310 points) or losses (e.g., -1300 points).
Of the one hundred games, thirty-six included all gain trials, thirty-nine all loss trials,
and twenty-five a mixture of both gains and losses."

deck card information can be edited in script 'flag_stimuli_inc.iqjs'

Instructions

All instructions are modelled after the ones provided in the original javaScript program
(https://github.com/swan232/FLAG)

They can be edited in script flag_instructions_inc.iqjs

Summary Data

File Name: flag_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
score The final score
countTrials Number of decks played (during test)
countGambles Number of times participants chose gambel
propGamble Proportion of gamble chosen (during test) (as opposed to sure amount); measure of risk avoidance/aversion (the lower the proportion, the higher risk aversion)
countTrialsMagPlus Number of trials in which a high win value was uncovered
countGamblesMagPlus Number of trials in which a high win value was uncovered and participant chose the gamble
countTrialsMagMinus Number of trials in which a high loss value was uncovered
countGamblesMagMinus Number of trials in which a high loss value uncovered and participant chose the gamble
countTrialsMagNone Number of trials in which neither a high win or loss card was uncovered
countGamblesNone Number of trials in which neither a high win or loss card was uncovered and participant chose the gamble
countOfferPlus Number of trials in which the sure bet offer was higher than any of the uncovered cards ("superior" sure choice)
countGamblesOfferPlus Number of trials in which the sure bet offer was higher than any of the uncovered cards and yet participant chose gamble
propGamblesOfferPlus Proportion of trials with a "superior" sure choice that participant chose to gamble nonetheless
=>a high proportion of gamble choices under these conditions might point to risk-seeking behavior, lack of loss aversion, or a profound failure in value integration
countOfferMinus Number of trials in which the sure bet offer was lower than any of the uncovered cards ("inferior" sure choice)
countGamblesOfferMinus Number of trials in which the sure bet offer was lower than any of the uncovered cards and participant chose gamble
propGamblesOfferMinus Proportion of trials with an "inferor" sure choice that participant chose to gamble
=>a low proportion of gamble choices under these conditions might point to high risk aversion
countOfferNone Number of trials in which the sure bet offer was neither higher nor lower than the uncovered cards
countGamblesOfferNone Number of trials in which the sure bet offer was neither higher nor lower than the uncovered cards and participant chose gamble
=> a potential gambling baseline; should be somewhere between propGambleOfferPlus and propGambleOfferMinus
Stay Or Switch
switchRate Proportion of times participant switched from gamble to sure bet or vice versa => choice volatility
countStay Number of trials participant stayed with the same decision as made during the preceding trial
countStayGamble Number of trials participant repeated gambling
countStayGambleWin Number of trials participant repeated gambling after the previous gambling was successful (outcome was at least as good as with the sure bet)
propStayGambleWin Proportion of times that participant repeated gambling after a 'successful' gamble relative to all the times they stayed gambling
(countStayGambleWin/countStayGamble)
=> a high number indicates that participants repeated gambling only if the previous gamble provided a satisfactory outcome ("reinforcement"),
otherwise they switched choices.
=> measure of reinforced learning
countStayGambleMagPlus Number of trials in which a high WIN gamble card was revealed that participant repeated gambling
countStayGambleMagMinus Number of trials in which a high LOSS gamble card was revealed that participant repeated gambling
countStayGambleMagNone Number of trials in which neither a high win or loss gamble card was revealed that participant repeated gambling
countStayGambleOfferPlus Number of trials in which the sure bet offer was superior, yet participant repeated gambling
Rt
meanRT Mean deliberation time (time it took to make decision, in ms)
sdRT Standard deviation of deliberation times (decision variability), in ms
meanRTGamble Mean deliberation time (in ms) of deciding on a gamble
meanRTOffer Mean deliberation time (in ms) of deciding on the sure bet offer
meanRTLoss Mean deliberation time (in ms) made after a gambling loss
meanRTWin Mean deliberation time (in ms) made after a gambling win
=> differences in deliberation times after gambling wins vs losses are measures of behavioral adaptation and executive control processes.
meanRTOfferPlus Mean deliberation time (in ms) of deciding when a superior sure bet offer was made (based on: offerCat, see under raw data)
meanRTOfferMinus Mean deliberation time (in ms) of deciding when an inferior sure bet offer was made
meanRTOfferNone Mean deliberation time (in ms) of deciding when a sure bet offer was made that was neither superior nor inferior

Raw Data

File Name: flag_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.
phase "Practice" vs. "Test"
deckCounter Tracks the number of decks played (resets after practice)
Deck Information
index The current index of the deck (Practice: 0-3; Test Range: 4-103)
outcomes The current 6 deck cards (presented in order)
magnitudeCat 1 = maxDeck > 625 ("high win" card was uncovered)
0 = no extreme values (the uncovered cards did not contain high wins or high losses)
-1 = minDeck < -625 ("high loss" card was uncovered)
there are 19 test trials with magnitudeCat = 1 and 19 test trials with magnitudeCat=-1 (there is no overlap),
this aligns with information provided by Wang et al - however: the cut-off of 625/-625 was determined by Millisecond
to achieve a 19/19 split
gainsCat 1 = the UNCOVERED values are are all gains (test trials: 36 all gains trials)
0 = the UNCOVERED values are mixed (test trials: 25 mixed trials)
-1 = the UNCOVERED values are all losses (test trials: 39 all gains trials)
these values align with information provided by Wang et al
meanDeck Mean value of the UNCOVERED deck cards (based on five presented values = known knowledge)
sdDeck Standard deviation of the values of the UNCOVERED deck cards
medianDeck Mean value of the UNCOVERED deck cards
minDeck Minimum value of the UNCOVERED deck cards
maxDeck Maximum value of the UNCOVERED deck cards
side 0 = gamble deck is presented on the right
1 = gamble deck is presented on the left
offer The current sure offer
offerCat 1 = the sure offer is a likely win (the offer is larger than the maximum value revealed of gamble deck: "superior sure bet")
0 = anything in between
-1 = the sure offer is a likely loss (the offer is smaller than the minimum value revealed of gamble deck: "inferior" sure bet)
outcome The last revealed deck card ( for trial.choice 'outcome' contains the value of the 6th card; not known to participant)
Dvs
prevResp Stores the choice made in the previous trial
prevGambleSuccess Stores the gamble success value of the previous trial
respCategory "gamble" (participant chose deck during trial.choiceTest)
"offer" (participant chose sure offer during )
gambleSuccess Applies only to trials in which the gamble was selected (when sure offer is taken, it might be unclear whether this was the better choice)
0: gamble was unsuccessful (values.outcome < values.offer)
1: gamble was successful (values.outcome >= values.offer)
response The response of participant (scancode of response button)
responseText Scancode translated into actual key
latency Response latency (in ms); measured from: onset of trial
Score Information
score The current score
win Stores the 'winning' points of the current choice trial
Card Locations
picture.gambleCard.x The horizontal screen position (in %canvas width) of the gamble deck card during trial.choiceTest
picture.offerCard.x The horizontal screen position (in %canvas width) of the sure offer 'card' during trial.choiceTest
25% = left; 50% = center; 75% = right

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design
numberPracticeTrials The number of practice trials to run
Max: 4
the original javaScript program plays with 4
4
numberTestTrials The number of test trials to run
Max: 100
the original javaScript program plays with 100
100
startCapital Number of points at start of test1000
Sizing Parameters
cardHeightPct The height of the card image in %canvas height50%
offerFontSizePct The fontsize of the reported outcomes in %canvas height10%
Timing Parameters
deckStartMS Duration (in ms) of the 'new Deck' trial during the test phase1000
samplingMS Duration (in ms) that each drawn card is presented during test phase1000
feedbackDurationMS Duration (in ms) of the feedback trial during the test phase1000
Responsekeys
leftResponseKey "F"
rightResponseKey "J"