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
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.
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
25 minutes
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.
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
File Name: flag_summary*.iqdat
| Name | Description |
|---|---|
| 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 |
File Name: flag_raw*.iqdat
| Name | Description |
|---|---|
| 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 |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
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 test | 1000 |
Sizing Parameters |
||
| cardHeightPct | The height of the card image in %canvas height | 50% |
| offerFontSizePct | The fontsize of the reported outcomes in %canvas height | 10% |
Timing Parameters |
||
| deckStartMS | Duration (in ms) of the 'new Deck' trial during the test phase | 1000 |
| samplingMS | Duration (in ms) that each drawn card is presented during test phase | 1000 |
| feedbackDurationMS | Duration (in ms) of the feedback trial during the test phase | 1000 |
Responsekeys |
||
| leftResponseKey | "F" | |
| rightResponseKey | "J" | |