```
THE HUNGRY MONKEY GAME (dove-hawk paradigm)

SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
last updated:  01-06-2016 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

BACKGROUND INFO

*Purpose*
This script runs an experiment designed for kids based on the dove-hawk paradigm (aka Game of Chicken)*. The basic premise of the dove-hawk
paradigm is that two people compete for the same resources and have to decide to (a) take the resources fast or (b) wait for the
opponent's decision. If they decide to take the resource they can either win the resource (=> the other person waited) or experience
a  devastating loss (=>the other person also went for the resource). If they wait they either don't get the resource (=> the other
person went for the resource) or are able to share it (=> the other person also waited).

*Reference for Dove-Hawk Paradigm (aka Game of Chicken): http://en.wikipedia.org/wiki/Chicken_(game)

In this experiment, kids are asked to collect as many bananas as they can for a hungry monkey named "Charly" while competing
with a (computer-generated) "second player", e.g. "Alex"*. In order to decide if they want to
a) wait to see what the opponent is doing (=dove behavior) or
b) take the bananas right away (=hawk behavior)
they have to consider the following rules that determine the outcome of their decisions:

1) If the participant takes the bananas and the opponent waits, the participant gets the full amount of the offered bananas
2) If the opponent takes the bananas and the participant waits, the participant neither wins nor loses any bananas
3) If the opponent and the participant wait, they equally share the bananas (each gets half)
4) If both take the bananas, they each lose double the amount of bananas offered

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

(1) Raw data file: 'DoveHawk_raw*.iqdat' (a separate file for each participant)

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block)
values.opponent_name:			name of the current opponent
values.p_hawk:					probability of hawk-strategy (likelihood that opponent "takes" the bananas)
values.winamount:				current amount of bananas that can be won
values.comp_strategy:			opponent's decision: 1 = hawk (=take), 0 = dove (=wait)
response:						the response box that participant clicked
values.p_response:				participant's choice: 1 = hawk (take), 0 = dove (=wait)
latency:						time it took participant to make a choice in ms (once the response boxes were presented)
values.outcome:					the outcome of the "fight": 1 = opponent wins, 2 = participant wins, 3 = both lose, 4 = compromise
values.p_total:					the total sum of bananas won at this time

(2) Summary data file: 'DoveHawk_summary*.iqdat' (a separate file for each participant)

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
/p_total:						the total sum of bananas won

EXPERIMENTAL SET-UP
The experiment offers 3 basic blocks that vary the probability with which the computer-generated opponent decides to take bananas
(=hawk) or wait (=dove):
1) Mixed Block: 	p(hawk) = 0.5
2) Hawk: 			p(hawk) = 0.8
3) Dove:			p(hawk) = 0.2

In each of these blocks, participants are presented with 15 trials in which they have to make a dove-hawk decision.
The name of the opponent for each block is randomly pulled from a pool of 3 gender-neutral names
Note: if trial sequence needs a build-in delay, there are several editable parameter that can be set to accomplish a delay.

A second round of the three basic blocks continuously increases the amount of bananas that can be won by 2
(max amount of bananas that can be won = 30, max of bananas that can be lost = 60).

STIMULI
provided by Millisecond Software - check under section EDITABLE STIMULI

INSTRUCTIONS
provided by Millisecond Software - check under section EDITABLE INSTRUCTIONS

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:

to build in delays:
skipdelay:						false = delay trials are run
true = delay trials are not run (default)
responseboxdelay:				delay of the response boxes in ms (default: 0ms)
posttrialpause_choice:			default = 0 ms
delayduration:					the duration of the delay trial in ms (default: 5000ms) - runs only if skipdelay = false
posttrialpause_feedback:		default = 0 ms
nextdelay:						delay of the 'continue/next' buttons after feedback was given (default: 0ms)

to change these variables, also change the corresponding lists under "EDITABLE LISTS":
pr_mixed:						sets the probability of hawk strategy in the mixed condition, here: 0.5
pr_hawk:						sets the probability of hawk strategy in the hawk condition, here: 0.8
pr_dove:						sets the probability of hawk strategy in the dove condition, here:0.2

```