Advertisement

Behavior Research Methods

, Volume 49, Issue 3, pp 972–978 | Cite as

IGT-Open: An open-source, computerized version of the Iowa Gambling Task

  • Christopher L. DancyEmail author
  • Frank E. Ritter
Article

Abstract

The Iowa Gambling Task (IGT) is commonly used to understand the processes involved in decision-making. Though the task was originally run without a computer, using a computerized version of the task has become typical. These computerized versions of the IGT are useful, because they can make the task more standardized across studies and allow for the task to be used in environments where a physical version of the task may be difficult or impossible to use (e.g., while collecting brain imaging data). Though these computerized versions of the IGT have been useful for experimentation, having multiple software implementations of the task could present reliability issues. We present an open-source software version of the Iowa Gambling Task (called IGT-Open) that allows for millisecond visual presentation accuracy and is freely available to be used and modified. This software has been used to collect data from human subjects and also has been used to run model-based simulations with computational process models developed to run in the ACT-R architecture.

Keywords

Open-source Software IGT Iowa Gambling Task Stimulus timing Visual presentation Decision-making 

The Iowa Gambling Task (IGT; Bechara et al., 1994) is a repeated decision-making task used to understand the learning and choice processes underlying decision-making under uncertainty. In the IGT, a participant must select a card from one of four decks on each trial. The selection of the card will result in an associated reward, some are gains and some are losses, depending on the fixed reward/loss schedule in each deck.

Though the data from this task has been used in the past as evidence for the Somatic Marker Hypothesis (Bechara & Damasio, 2005), the task has also been used more generally to understand the neural and psychological processes that underlie decision-making and how these processes may differ in clinical populations. Lawrence et al. (2009) explored activation in regions of the prefrontal cortex, while Li et al. (2011) used the task to explore activation in brain regions related to the Somatic Marker Hypothesis and what activation of these structures may mean for using the IGT to study abnormalities in processes in clinical populations. The IGT has been used in several separate studies to understand differences in decision-making mechanisms between healthy participants and different clinical populations, including, pathological gamblers (e.g., Brevers et al., 2013), cocaine users (e.g., Verdejo-Garcia et al., 2007), and those suffering from Parkinson’s disease (e.g., Kobayakawa et al., 2008).

Although the task has been used many times, understanding these results together should be done with caution because there can be discrepancies in the task presentation method (e.g., Balodis et al., 2006; Overman & Pierce, 2013). This is especially apparent in computerized versions of the task where aspects of the task, like instructions, timing, and visual presentation, do differ.

Despite this widespread use of computerized versions for the IGT, few versions of the task are freely available for download and use that can be used on different computing platforms or that can be used in conjunction with physiological measurement methods (e.g., functional magnetic resonance imaging, electroencephalogram, or electrodermal activity). The Psychology Experiment Building Language (PEBL; Mueller & Piper, 2014) contains a version of the Iowa Gambling Task that is one of the only available software versions of the task that can be used on a computer free-of-charge. This version is useful as it is prebuilt and is available to be modified as desired; however, it does not currently use hardware acceleration for drawing visual objects on the screen (Mueller & Piper, 2014). Using graphics hardware acceleration to draw objects can provide more consistent visual timing precision, especially as the system load increases (see the Psychophysics toolbox website, http://psychtoolbox.org, for a more detailed discussion on hardware acceleration and stimulus timing). Visual presentation timing precision is important for determining event-related physiological change (e.g., during an event-related brain imaging study). In the next section, we describe a freely available open source version of the Iowa Gambling Task that uses software libraries built for precise visual presentation timing.

IGT-Open: A freely available version of the Iowa Gambling Task

We have developed an open source version of the Iowa Gambling Task that is freely available for download, and use or modification.1 This version of the IGT (IGT-Open) can run in both Matlab and Octave (an open-source version of the Matlab interpreter); it uses Psychtoolbox2 libraries for Matlab (Brainard, 1997; Kleiner, 2010; Kleiner et al., 2007) that allow precise visual presentation timing so that the software may be used in conjunction with instruments that collect physiological data. IGT-Open has been used to collect human behavioral, eye-tracking, and electrodermal activity data. Computational process models that are built to use the JSON Network Interface (JNI) module in ACT-R (Hope et al., 2014) can also have ACT-R models complete the IGT task with the IGT-Open system.

Using the software with human subjects

IGT-Open was developed to be used for a decision-making study to examine the effects of subliminal emotional stimuli on task-related and physiological behavior over the course of the task (Dancy, 2014). This software uses the Psychtoolbox libraries that can be used with both Octave and Matlab so that the visual presentation within the task was precise enough to rapidly display images (i.e., subliminal presentation) and relate these visual events to physiological changes. Using these libraries also allowed behavioral data to be correctly aligned with eye-tracking data that was input into the system via a serial connection. A manual that includes details on setup of the libraries that the software uses is included with the software distribution.

Using the IGT-Open software is fairly simple as the program can be started by calling the GUI or directly calling the igt_open function from within either the Matlab or Octave interpreters. A user can call the start_up graphic user interface (from within the interpreter) that provides a visual interface for the user to see the parameters they are changing to confirm their task settings. Figure 1 shows a screenshot of the GUI with default parameters.
Fig. 1

The GUI that can be used to specify parameters and start the software

The function (igt_open) can be called with 11 parameters (see Table 1 for an explanation of these parameters) that allow the user to customize the experiment.
Table 1

Functional arguments for the main IGT-Open file that can be specified when starting the software

Argument

Functional significance

group

Used for data file names and optional alternative image sets

sid

Participant's id

numTrials

Can be used to specify the number of trials in the task (100 by default)

savePath

The directory to which data files are saved

mORf

(male or female) Used for data file names and optional alternative image sets

penaltyFunStr

A string of the function name that gives the distribution of rewards and penalties that are to be used with the different decks. This function can also be used to specify the number of decks (which normally is set at 4). An example penalty function file is provided in the distribution

igtHomeDir

The home directory of the function and the supplementary system files

imageDir

The directory that holds all image files to be used with the software

breaksLength

An array of integers that specify how long the flipped card should be shown, how long the reward and loss should be shown, how long the intertrial break should be, and (optionally) how long any visual stimuli should be shown before the reward and loss are shown

comPort

(Optional) The serial port name (a string) that can be used to communicate with an ISCAN eye tracker

simulation

(Optional) A flag that specifies whether the software will communicate with a computational cognitive model (using language to communicate with JNI)

Figure 2 displays an example functional diagram of the software called with the 11 possible arguments (the last function parameter is used for model-based simulations). IGT-Open has been designed to partition each trial into four phases: a deck selection phase, a card display phase, a reward/loss phase (in which an optional treatment-based image can be shown), and an intertrial break phase. Partitioning the trials into these phases allows for event-related analysis of some physiological-based measures (e.g., event-related fMRI analysis or EDA analysis).
Fig. 2

A functional diagram of the IGT-Open software and its parameters

The IGT software has been used on both a machine running Windows 7 that uses a Matlab interpreter and a machine running Ubuntu 12.04 LTS (a Linux distribution) that uses an Octave interpreter for a study examining the effects of rapid visual stimuli presentation on physiological and decision-making behavior during the IGT (Dancy, 2014); the software has also been tested on a Mac machine (OSX 10.10) using the Matlab interpreter and with Ubuntu 14.04 LTS using the Octave interpreter. Those data were processed and analyzed using a combination of functions included with the IGT software and R software libraries. Descriptive statistics of behavioral data recorded using the software can be output using the AnalyzeIGT function. Figure 3 gives an example set of commands that can be run within Octave or Matlab to output descriptive statistics useful in data analysis.
Fig. 3

An example of the descriptive data output function included with the IGT-Open software

Table 2 gives a list of the comma separated metrics output by the functions shown in Fig. 3. The file contains both overall metrics on the task (e.g., score per block), and metrics based on the context of the task when a participant makes a deck selection (e.g., number of cards selected from deck A when current amount of money is less than the amount a participant had at the beginning of the task). Because all three operating systems and both interpreters are officially supported by the Psychtoolbox libraries, there are no functional differences between running the IGT-Open software on the different system-interpreter combinations.
Table 2

Metrics output by the function specified in Fig. 2. Separate values are output for each block. (GD = Good Decks, BD = Bad Decks, w/ = with)

Metric

Description

Deck response time (A, B, C, D, GD, BD, All decks)

Average response time for deck(s) after starting the trial

Number of cards selected (A, A w/ money < 0, A w/ money >= 0, B, B w/ money < 0, B w/ money >= 0, C, C w/ money < 0, C w/ money >= 0, D, D W money < 0, D w/ money >= 0, GD, GD w/ money < 0, GD w/ money >= 0, BD, BD w/ money < 0, BD w/ money >= 0)

Total number of cards selected from deck(s)

Score (w/ money < 0, w/ money >= 0, Total)

The score equals the total number of cards selected from the good decks minus the total number of cards selected from the bad decks (Score = GD - BD = C + D - B - A)

A Rate (Between all decks, From BD to GD, From GD to BD, Within GD, Within BD)

Alternating Rate (percentage of selecting a different deck from the one selected during the previous trial)

Visual stimulus presentation timing

When presenting visual stimuli rapidly (e.g., with ms interstimuli intervals), it is important that stimulus presentation timing is accurate so that the experiment can be replicated. Accurate and precise timing also allows an experimenter to correlate rapid stimulus events with any event-related physiological changes (e.g., event-related potentials or galvanic skin response). For studies involving subliminal or preconscious presentation (e.g., Dehaene et al., 1998), presentation timing as low as, or lower than, 16 ms may be desired.

Though the Psychtoolbox libraries have been used previously for accurate and precise visual stimulus presentation, it is useful to test the library functions independently within the software using them to ensure there are not any issues or incompatibilities that compromise the function precision. To ensure the timing accuracy of the stimulus presentation in the IGT-Open software, stimulus onset times of an image rapidly (i.e., 16.6 ms) presented were recorded over 1,000 trials during a simulated run of a normal IGT experiment. We also ran a similar test on the stimulus presentation timing of a version of the IGT that comes with the PEBL 0.14 software. Figure 4 shows a histogram of the image flip onset timing exhibited while running the IGT-Open software.
Fig. 4

A histogram of image flip times recorded in IGT-Open over 1,000 trials

In the bimodal distribution shown in Fig. 4, the second peak contains the majority of flip times, as the images take between 16.65 ms and 16.70 ms for the majority of the 1,000 trials. The distribution of times is predominantly due to variance in refresh-rate timing of the monitor used for testing. As also indicated in Table 3, though there is a variance in timing, overall standard error of the mean (SEM) is still at a reasonable level.
Table 3

Mean, standard deviation, standard error of the mean, minimum and maximum values of the display time of the IGT-Open and PEBL version of the IGT software

Software

Mean (ms)

Standard Dev.

SEM

Minimum

Maximum

IGT-Open

16.67

0.05

0.002

16.47

16.79

PEBL

12.07

0.17

5.43

2.00

23.00

As expected, the IGT-Open software reported visual stimulus onset timing that was within 0.1 ms of the minimum onset time allowed by the hardware used (a monitor with a 60-Hz refresh rate). More specifically, IGT-Open had an average recorded onset time of 16.67 ms (with a standard error of the mean of 0.002). We also recorded PEBL timing using the native timing functions provided by the software. Interestingly, the PEBL timing test resulted in an impossible average onset time of 12.07 ms (with a standard error of the mean of 0.17). There are two possible reasons for this timing result: (a) the timing mechanism used in the software malfunctioned; (b) the visual stimulus experienced “tearing,” that is the image began to be presented after a monitor refresh has already begun, causing only part of the image to be presented during that particular cycle.

It is difficult to diagnose the first explanation without a clearer picture on the timing mechanisms used in PEBL, but the second possible explanation can be understood of as an artifact of using legacy Simple Direct Media Layer (SDL) 1.2 C libraries for visual stimulus presentation. In addition to adding an extra layer between the software and the graphics hardware (SDL can act as a middle layer between OpenGL and DirectX APIs), SDL 1.2 does not natively support hardware acceleration (Mueller & Piper, 2014), making visual presentation timing less precise and reliable. The Psychtoolbox libraries that are used by IGT-Open bypass this limitation by directly using the OpenGL API as an interface with graphics hardware. Thus, software interpreted by Matlab or Octave that uses the Psychtoolbox libraries (as IGT-Open does) has hardware acceleration available and enabled by default.

Using the software with computational process and models and statistical models

The IGT-Open software can be used to communicate with certain computational process models so that modelers can complete and get information from the same task environment that is presented to human participants (see Ritter et al., 2000 and Hope et al., 2014, for related discussions). To allow computational models to use the software, we developed functionality that can communicate with the JSON Network interface (JNI; Hope et al., 2014). The JNI allows a computational process model to communicate with other software via a TCP connection.

The communication system is meant to be used with the JNI ACT-R module, though the software could be used with any software following the general JNI communication protocol; the protocol essentially specifies a standard communication language between two systems (in this case, IGT-Open and an ACT-R model). We have used the IGT software and JNI communication module to have computational process models use simulated eyes and hands to perceive the visual stimuli in the task environment, use these stimuli to make a deck choice, and respond by using a virtual keyboard (Dancy, 2014). Because the source code is freely available, other computational modelers could also modify the communication system to work within their respective frameworks.

Statistical models can also be used with the software in a fairly straightforward manner. An expectancy valence model function is included with the software that will simulate the model on the given number of decks and penalty distribution using the decks variable that is output from a user’s penalty distribution function (specified by the penaltyFunStr parameter in the main igt_open function detailed in a previous section). Users can enter optional parameters for maximum number of cards in each deck, expectancy-valence model parameters (α, weight, and c from Busemeyer & Stout, 2002), number of trials for the model to run, a custom output file name, and the total number of simulation runs (which may be useful if using parameters that result in more random-like behavior, for example a c of 0). The function file that is included will also give users an idea of how they may create their own statistical model to run with their chosen penalty distribution function.

Conclusion and future work

IGT-Open is a useful tool that can be used in studies that use the Iowa Gambling Task. This IGT variant allows accurate and precise visual presentation timing, which can be important for event-related data analysis (e.g., brain imaging). Because the code is available, users of the software can understand the details of the software implementation, request modified or expanded versions of the software, and modify the software themselves to better suit variations in operating system, hardware configurations, or use. There have been several variants of the task used that include different timing intervals between portions of each trial, different payment distributions, and certain stimuli (e.g., Davies & Turnbull, 2011; Turnbull et al., 2005; van den Bos et al., 2013). IGT-Open can replicate the majority of these studies with the corresponding image set, parameters for timing, and reward-loss distribution function file.

The software is currently the only freely available open-source software that can be used for running the IGT and related tasks, and that provides the timing accuracy to associate behaviors with physiological events on a millisecond-level. Particular physiological recording methods that would greatly benefit from having the software include Electroencephalography (e.g., Marco-Pallares et al., 2008), electrodermal activity recording (e.g., Bechara et al., 1997), and eye/pupil response (e.g., Lavin et al., 2014). The importance of timing accuracy is especially apparent when one considers that these physiological recordings are often used in event-based associations, which can happen on a trial-by-trial basis. If the software being used to present the task and stimulus has issues with accuracy and a larger variation, the error can add up to an unreliable difference after 100 or more trials, which is the typical number of trials seen in the IGT and similar gambling type tasks. Another aspect that makes this particular software useful is the libraries used to build it also include certain functionality to interact with popular EEG, EDA, eye-tracking, and other physiological recordings devices through parallel and serial ports. Some commonly used systems (e.g., the EGI/Netstation or the SR-Research Eyelink) have their own interfaces/functions that can be used with the IGT-Open software through interaction with the Psychtoolbox libraries employed.

IGT-Open has been used to gather behavioral and physiological data in a study where participants were presented with subliminal stimuli while completing the IGT. Functions included in the package were also used for parts of the data analysis. This same software was used as a task environment that a computational process model communicated with using virtual eyes and hands.

We plan to further expand the software to allow more tractable modification of the details of the task. Given that different penalty distributions can be used in this task, we plan to add more penalty distribution function files to the software to allow users to explore more decision-making-related questions. We also plan to add more statistical models, similar to the expectancy-valence and prospect-utility models already included.

This software provides a useful alternative to IGT environments that require paid software or may not have the desired visual presentation precision for some event-related physiological data collection. Because the code that implements the task is freely available, users wishing to understand task-related and physiological behavior during the IGT have the opportunity to fully comprehend how to change the task and, thus, how changes in the task environment may affect behavior. Using IGT-Open in its current state, or modifying it to suit a particular research question, may also make potentially important differences between IGT task environments more clear.

Footnotes

  1. 1.

    The software is distributed under a GNU General Public License and can currently be downloaded at https://gitlab.bucknell.edu/AI-CogSci-Group/IGT-Open (URL).

  2. 2.

    Documentation for using the Psychtoolbox libraries can be found on the official Psychtoolbox website.

Notes

Acknowledgments

Some of this work was supported by the Bunton-Waller Fellowship and the Alfred P. Sloan Foundation Graduate Scholarship while CLD was a graduate student.

References

  1. Balodis, I. M., MacDonald, T. K., & Olmstead, M. C. (2006). Instructional cues modify performance on the Iowa Gambling Task. Brain and Cognition, 60(2), 109–117.CrossRefPubMedGoogle Scholar
  2. Bechara, A., & Damasio, A. R. (2005). The somatic marker hypothesis: A neural theory of economic decision. Games and Economic Behavior, 52(2), 336–372.CrossRefGoogle Scholar
  3. Bechara, A., Damasio, A. R., Damasio, H., & Anderson, S. W. (1994). Insensitivity to future consequences following damage to human prefrontal cortex. Cognition, 50(1–3), 7–15.CrossRefPubMedGoogle Scholar
  4. Bechara, A., Damasio, H., Tranel, D., & Damasio, A. R. (1997). Deciding advantageously before knowing the advantageous strategy. Science, 275(5304), 1293–1295.CrossRefPubMedGoogle Scholar
  5. Brainard, D. H. (1997). The Psychophysics Toolbox. Spatial Vision, 10(4), 433–436.CrossRefPubMedGoogle Scholar
  6. Brevers, D., Bechara, A., Cleeremans, A., & Noël, X. (2013). Iowa Gambling Task (IGT): Twenty years after–gambling disorder and IGT. Frontiers in Psychology, 4, 665. doi: 10.3389/fpsyg.2013.00665
  7. Busemeyer, J. R., & Stout, J. C. (2002). A contribution of cognitive decision models to clinical assessment: Decomposing performance on the Bechara Gambling Task. Psychological Assessment, 14(3), 253–262.CrossRefPubMedGoogle Scholar
  8. Dancy, C. L. (2014). Why the change of heart? Understanding the interactions between physiology, affect, and cognition and their effects on decision-making. (Ph.D.), Penn State, University Park, PA.Google Scholar
  9. Davies, J. L., & Turnbull, O. H. (2011). Affective bias in complex decision making: Modulating sensitivity to aversive feedback. Motivation and Emotion, 35(2), 235–248.CrossRefGoogle Scholar
  10. Dehaene, S., Naccache, L., Le Clec'H, G., Koechlin, E., Mueller, M., Dehaene-Lambertz, G., . . . Le Bihan, D. (1998). Imaging unconscious semantic priming. Nature, 395(6702), 597–600.Google Scholar
  11. Hope, R. M., Schoelles, M. J., & Gray, W. D. (2014). Simplifying the interaction between cognitive models and task environments with the JSON Network Interface. Behavior Research Methods, 46(4), 1007–1012.CrossRefPubMedGoogle Scholar
  12. Kleiner, M. (2010). Visual stimulus timing precision in Psychtoolbox-3: Tests, pitfalls and solutions. Perception, 39, 189.Google Scholar
  13. Kleiner, M., Brainard, D. H., Pelli, D., Ingling, A., Murray, R., & Broussard, C. (2007). What’s new in Psychtoolbox-3. Perception, 36(14), 1.1–16.Google Scholar
  14. Kobayakawa, M., Koyama, S., Mimura, M., & Kawamura, M. (2008). Decision making in Parkinson's disease: Analysis of behavioral and physiological patterns in the Iowa Gambling Task. Movement Disorders, 23(4), 547–552.CrossRefPubMedGoogle Scholar
  15. Lavin, C., San Martín, R., & Rosales Jubal, E. (2014). Pupil dilation signals uncertainty and surprise in a learning gambling task. Frontiers in Behavioral Neuroscience, 7, 218. doi: 10.3389/fnbeh.2013.00218
  16. Lawrence, N. S., Jollant, F., O'Daly, O., Zelaya, F., & Phillips, M. L. (2009). Distinct roles of prefrontal cortical subregions in the Iowa Gambling Task. Cerebral Cortex, 19(5), 1134–1143.CrossRefPubMedGoogle Scholar
  17. Li, J., Schiller, D., Schoenbaum, G., Phelps, E. A., & Daw, N. D. (2011). Differential roles of human striatum and amygdala in associative learning. Nature Neuroscience, 14(10), 1250–1252.CrossRefPubMedPubMedCentralGoogle Scholar
  18. Marco-Pallares, J., Cucurell, D., Cunillera, T., García, R., Andrés-Pueyo, A., Münte, T. F., & Rodríguez-Fornells, A. (2008). Human oscillatory activity associated to reward processing in a gambling task. Neuropsychologia, 46(1), 241–248.CrossRefPubMedGoogle Scholar
  19. Mueller, S. T., & Piper, B. J. (2014). The Psychology Experiment Building Language (PEBL) and PEBL Test Battery. Journal of Neuroscience Methods, 222, 250–259.CrossRefPubMedGoogle Scholar
  20. Overman, W. H., & Pierce, A. (2013). Iowa Gambling Task with non-clinical participants: Effects of using real + virtual cards and additional trials. Frontiers in Psychology, 4, 935. doi: 10.3389/fpsyg.2013.00935
  21. Ritter, F. E., Baxter, G. D., Jones, G., & Young, R. M. (2000). Supporting cognitive models as users. ACM Transactions on Computer-Human Interaction (TOCHI), 7(2), 141–173.CrossRefGoogle Scholar
  22. Turnbull, O. H., Evans, C. E. Y., Bunce, A., Carzolio, B., & O’Connor, J. (2005). Emotion-based learning and central executive resources: An investigation of intuition and the Iowa Gambling Task. Brain and Cognition, 57(3), 244–247.CrossRefPubMedGoogle Scholar
  23. van den Bos, R., Homberg, J., & De Visser, L. (2013). A critical review of sex differences in decision-making tasks: Focus on the Iowa Gambling Task. Behavioural Brain Research, 238, 95–108.CrossRefPubMedGoogle Scholar
  24. Verdejo-Garcia, A., Benbrook, A., Funderburk, F., David, P., Cadet, J., & Bolla, K. I. (2007). The differential relationship between cocaine use and marijuana use on decision-making performance over repeat testing with the Iowa Gambling Task. Drug and Alcohol Dependence, 90(1), 2–11.CrossRefPubMedPubMedCentralGoogle Scholar

Copyright information

© Psychonomic Society, Inc. 2016

Authors and Affiliations

  1. 1.Department of Computer ScienceBucknell UniversityLewisburgUSA
  2. 2.College of Information Sciences and TechnologyThe Pennsylvania State UniversityUniversity ParkUSA

Personalised recommendations