User Manual: Inquisit Trust Game


___________________________________________________________________________________________________________________	

								                 TRUST GAME
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 06-28-2022
last updated:  09-05-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 09-05-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements Millisecond Software's computerized version of the 'Trust Game',
a socio-economic decision game to investigate trust and reciprocity in an investment setting.

The script uses elements of several Trust Game publications.

References:
											
Berg, J., Dickhaut, J., & McCabe, K. (1995). Trust, reciprocity, and social history. Games and
Economic Behavior, 10(1), 122–142.

Chetty, Rinelle & Hofmeyr, Andre & Kincaid, Harold & Monroe, Brian, 2021. 
"The Trust Game Does Not (Only) Measure Trust: The Risk-Trust Confound Revisited," 
Journal of Behavioral and Experimental Economics (formerly The Journal of Socio-Economics), Elsevier, vol. 90(C).

Croson, Rachel, and Nancy Buchan. 1999. "Gender and Culture: International Experimental Evidence from Trust Games."
American Economic Review, 89 (2): 386-391.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________

This script implements a general 'Trust Game'.
In a Trust Game 2 players play with each other. Both Players receive the same start amount (here: $10).
PlayerA is asked to share any amount with PlayerB. The shared amount is tripled by the experimenter
and added to PlayerB's total. PlayerB can then decide how much of their money to share with PlayerA in return.

This implementation is not a true multi player game but simulates the behavior of coplayers
with computer algorithms to pretend that participants play against real people.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 2 minutes to complete

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'trustgame_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:					with the current subject id
group: 						with the current group id
session:					with the current session id

/////Parameters:
/computerSharingStrategyA    	//1 = computer is not trusting: shares only 0-20% of its bounty
								//2 = computer is neither trusting nor untrusting: shares 40% to 60% of its bounty
								//3 = computer is trusting: shares 80% to all its bounty									 									 
								//4 = computer adapts uses PlayerBehavior as guide (if player hasn't played yet, plays as neither trusting nor untrusting)
									 									

																											
computerSharingStrategyB        //1 = computer as PlayerB is acting in self-interest only: shares 0-10% of its bounty (decision time is relatively quick)
								//2 = computer as PlayerB reciprocates (looks at proportion shared and acts accordingly) (decision takes longer)
								//Share Amount: adjusts the fair share by original proportion shared by PlayerA
								//3 = computer as PlayerAB is fair => makes sure both players end up with roughly the same amount (decision takes longer)



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. 
																
								
								
roundCounter:				updates how many rounds have been started
			
participantRoles:			updates the role participant played in each round
							Example: "AB" => 2 rounds played, 1st round: participant was PlayerA; 2nd Round: participant was PlayerB
							
role:						the role the participant plays in the current round ("A" vs. "B")

participantTotal: 			the total amount of money won by participant (across all rounds)
computerTotal:  			the total amount of money won by computer (across all rounds)

PlayerA_total:				the current PlayerA_total 
PlayerA_share: 				the current share amount by PlayerA
propAshare:					the current proportional share amount (proportional to PlayerA_total)
shareTotal:					the tripled PlayerA share amount
PlayerB_total:				the current PlayerB_total 
PlayerB_share: 				the current share amount by PlayerB				
								
response:					the response of participant
latency:					response latency (in ms); measured from:


(2) Summary data file: 'trustgame_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)	

/////Parameters:
/computerSharingStrategyA    	//1 = computer is not trusting: shares only 0-20% of its bounty
								//2 = computer is neither trusting nor untrusting: shares 40% to 60% of its bounty
								//3 = computer is trusting: shares 80% to all its bounty									 									 
								//4 = computer adapts uses PlayerBehavior as guide (if player hasn't played yet, plays as neither trusting nor untrusting)
																											
computerSharingStrategyB        //1 = computer as PlayerB is acting in self-interest only: shares 0-10% of its bounty (decision time is relatively quick)
								//2 = computer as PlayerB reciprocates (looks at proportion shared and acts accordingly) (decision takes longer)
								////Share Amount: adjusts the fair share by original proportion shared by PlayerA
								//3 = computer as PlayerAB is fair => makes sure both players end up with roughly the same amount (decision takes longer)


timeSpentOnInstructions_ins:	notes the time (in seconds) that participant spent on instruction block 
countInstructionBlocks:			counts the number of times participant worked through the instruction block


roundCounter:					the number of rounds played 
participantRoles:				the roles participant played in each round

participantTotal:				the final total participant won  
computerTotal:					the final total computer won

meanProportionShare_A:			the mean proportion of the total shared with computer when participant played PlayerA
meanDecisionTime_A:				the mean time (in ms) it took to make sharing decision when participant played PlayerA

meanProportionShare_B:			the mean proportion of the total shared with computer when participant played PlayerB			
meanDecisionTime_B:				the mean time (in ms) it took to make sharing decision when participant played PlayerB

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

This script implements a general 'Trust Game'.
In a Trust Game 2 players play with each other. Both Players receive the same start amount (here: $10).
PlayerA is asked to share any amount with PlayerB. The shared amount is tripled by the experimenter
and added to PlayerB's total. PlayerB can then decide how much of their money to share with PlayerA.
This implementation is not a true multi player game but simulates the behavior of coplayers
with computer algorithms to pretend that participants play against real people.

The default script plays 1 round of the game with Participant playing the part of PlayerA.
The default computer response as PlayerB is to be somewhat reciprocal, that is the more PlayerA shares,
the more they will get back from PlayerB. If they share everything, computer ensures to return the
fair share (that is both players end up with $20).

The script allows to change the following settings under Editable Parameters:
- starting role of participant
- number of rounds played (Note: if more than one round is played, the roles of participant/computer alternate)
- the computer's sharing behavior (from selfish, reciprocal to fair)

////Computer Sharing Algorithms:////

Computer acting as PlayerA:
- selfish: shares a random amount of 0-20% of its total
- somewhere in between: shares a random amount of 40-60% of its total
- generous: shares a random amount of 80% to all of its total 
- adaptive: uses participant trusting behavior as a guide

Computer acting as PlayerB:
- selfish: shares a random amount of 0-10% of its total
- reciprocal: uses the sharing proportion of PlayerA and adjusts the fair share by this proportion.
The final share is further adjusted by a small random jiggle (constraint: computer does not end up with a smaller total than participant)
- fair: shares the fair amount adjusted by a small random jiggle (constraint: computer does not share more than the fair share)

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

Images were taken from 'https://pixabay.com/' (license: free for commercial use)

Music by https://www.free-stock-music.com:
https://www.free-stock-music.com/fsm-team-upbeat.html
(free for commercial use with attribution)

Sound Effects by:
https://freesound.org/people/renatalmar/sounds/264981/ (Creative Commons 0 License)
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software.
The default instructions are in English. To change instructions (or translate them),
change any text stimuli under the different modules.
Instructions can be repeated as often as needed.
___________________________________________________________________________________________________________________	
EDITABLE CODE 
___________________________________________________________________________________________________________________	
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code 
to further customize your experiment.

The parameters you can change are: