___________________________________________________________________________________________________________________ BLACK JACK ___________________________________________________________________________________________________________________ last updated: 02-17-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 02-17-2022 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This sample script shows how to implement the game of Blackjack with Inquisit. ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ variable (player can quit at any point) ___________________________________________________________________________________________________________________ DATA FILE INFORMATION ___________________________________________________________________________________________________________________ The default data stored in the data files are: (1) Raw data file: 'blackjack_raw*.iqdat' (a separate file for each participant) build: The specific Inquisit version used (the 'build') that was run computer.platform: the platform the script was run on (win/mac/ios/android) date, time: date and time script was run subject, group: with the current subject/groupnumber session: with the current session id blockcode, blocknum: the name and number of the current block (built-in Inquisit variable) trialcode, trialnum: the name and number of the currently recorded trial (built-in Inquisit variable) Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those that do not store data to the data file such as feedback trials. Thus, trialnum may not reflect the number of main trials run per block. response: the participant's response (selected button) latency: the response latency (in ms); measured from:onset of current trial dealerhand: sum of the dealer's cards playerhand: sum of the player's cards outcome: "p win", "d win", "draw" + individual cards for dealer and player (2) Summary data file: 'blackjack_summary*.iqdat' (a separate file for each participant) inquisit.version: Inquisit version run computer.platform: the platform the script was run on (win/mac/ios/android) startdate: date script was run starttime: time script was started subjectid: assigned subject id number groupid: assigned group id number sessionid: assigned session id number elapsedtime: time it took to run script (in ms); measured from onset to offset of script completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) games: counts the number of games played pwins: counts the number of times the player won dwins: counts the number of times the dealer won draws: counts the number of draws ___________________________________________________________________________________________________________________ SET-UP ___________________________________________________________________________________________________________________ - number of games up to player Per GAME: - both dealer and player get two cards - player can decide to draw up to three more cards (if below or at 21; if over 21 but at least one ace then the total is adjusted down by 10) by hitting 'hit' or stand down by hitting 'stand' => if player cards add up to more than 21, then the player automatically loses - if player stands down, dealer can draw up to three more cards (if below or at 17; if over 21 but at least one ace then the total is adjusted down by 10) => if dealer cards add up to more than 21, then the dealer automatically loses Scoring: => if player cards add up to more than 21 (taking into account all drawn player aces which reduce the total by -10 each for values), then the player automatically loses => if dealer cards add up to more than 21 (taking into account all drawn dealer aces), then the player automatically loses => if both have the same value <= 21, then it's a draw => otherwise the player with the higher number wins