treatment "public-goods-punishment.ztt"{ background{ table globals{ } table subjects{ } table summary{ } table contracts{ } table clients{ } table treatments{ } table sessionglobals{ } table participations{ } numsubjects = 4; numgroups = 1; numpracticeperiods = 0; numactualperiods = 10; exchangerate = 1; startendowment = 0; showupfee = 0; noAutoscope = FALSE; firstBoxesOnTop = FALSE; showupfeeawaytext = "You are making losses. Do you want to invest the showupfee in order to continue?"; showupfeeawayyestext = "Yes"; showupfeeawaynotext = "No"; moneyawaytext = "You are making losses. Do you want to continue?"; moneyawayyestext = "Yes"; moneyawaynotext = "No"; bancruptwaittext = "Please wait until the experimenter unlocks your PC."; program{ table = subjects; do{ Endowment = 20; Multiplier = 2; MaxPunishment = 3; PunishmentEffect = 2; Pun1 = 0; Pun2 = 0; Pun3 = 0; Pun4 = 0; } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; headerbox "Header"{ hasframe = TRUE; height = 10%; top = 0p; cuttop = TRUE; showPeriods = TRUE; showNumPeriods = TRUE; periodtext = "Period"; periodoftext = "of"; practiceperiodprefix = "Trial "; showtime = TRUE; timestr = "Remaining time [sec]:"; pleasedecidetext = "Please reach a decision."; } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Text"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "Please wait until the experiment continues."; } } } } stage "Contribution"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 60; screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Contribution"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You are in a group of 4 players. What the group contributes to the project is"; } item{ label = "multiplied by 2 and shared equally among its 4 players."; } item{ } item{ label = "Your endowment"; variable = Endowment; format = "1"; input = FALSE; } item{ label = "Your contribution"; variable = Contribution; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = Endowment; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } stage "Punishment"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 60; program{ table = subjects; do{ C1 = find(same(Group) & Player == 1, Contribution); C2 = find(same(Group) & Player == 2, Contribution); C3 = find(same(Group) & Player == 3, Contribution); C4 = find(same(Group) & Player == 4, Contribution); } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "You"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You are player"; variable = Player; format = "1"; input = FALSE; } item{ label = "Your contribution"; variable = Contribution; format = "1"; input = FALSE; } } standardbox "Punish 1"{ hasframe = TRUE; displaycondition = Player == 1; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You can pay up to 3 points to punish each of the others."; } item{ label = "Each point you pay takes 2 points from the player you punish."; } item{ } item{ label = "Player 2 contributed"; variable = C2; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 2"; variable = Pun2; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 3 contributed"; variable = C3; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 3"; variable = Pun3; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 4 contributed"; variable = C4; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 4"; variable = Pun4; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } standardbox "Punish 2"{ hasframe = TRUE; displaycondition = Player == 2; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You can pay up to 3 points to punish each of the others."; } item{ label = "Each point you pay takes 2 points from the player you punish."; } item{ } item{ label = "Player 1 contributed"; variable = C1; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 1"; variable = Pun1; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 3 contributed"; variable = C3; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 3"; variable = Pun3; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 4 contributed"; variable = C4; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 4"; variable = Pun4; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } standardbox "Punish 3"{ hasframe = TRUE; displaycondition = Player == 3; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You can pay up to 3 points to punish each of the others."; } item{ label = "Each point you pay takes 2 points from the player you punish."; } item{ } item{ label = "Player 1 contributed"; variable = C1; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 1"; variable = Pun1; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 2 contributed"; variable = C2; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 2"; variable = Pun2; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 4 contributed"; variable = C4; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 4"; variable = Pun4; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } standardbox "Punish 4"{ hasframe = TRUE; displaycondition = Player == 4; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "You can pay up to 3 points to punish each of the others."; } item{ label = "Each point you pay takes 2 points from the player you punish."; } item{ } item{ label = "Player 1 contributed"; variable = C1; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 1"; variable = Pun1; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 2 contributed"; variable = C2; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 2"; variable = Pun2; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } item{ label = "Player 3 contributed"; variable = C3; format = "1"; input = FALSE; } item{ label = "Points you pay to punish player 3"; variable = Pun3; format = "1"; input = TRUE; showdefault = FALSE; emptyallowed = FALSE; min = 0; max = MaxPunishment; } button "OK"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } stage "Results"{ startwaitforall = TRUE; startConditionStr = ""; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = ifnoinput; timeout = 30; program{ table = subjects; do{ SumC = sum(same(Group), Contribution); Share = SumC * Multiplier / count(same(Group)); Sent = Pun1 + Pun2 + Pun3 + Pun4; Received = sum(same(Group), if(:Player == 1, Pun1, if(:Player == 2, Pun2, if(:Player == 3, Pun3, Pun4)))); Profit = Endowment - Contribution + Share - Sent - PunishmentEffect * Received; } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Results"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "Your contribution"; variable = Contribution; format = "1"; input = FALSE; } item{ label = "Your group contributed"; variable = SumC; format = "1"; input = FALSE; } item{ label = "Each player's share of the project"; variable = Share; format = "0.01"; input = FALSE; } item{ label = "You paid to punish others"; variable = Sent; format = "1"; input = FALSE; } item{ label = "Points others paid to punish you"; variable = Received; format = "1"; input = FALSE; } item{ } item{ label = "Your payoff"; variable = Profit; format = "0.01"; input = FALSE; } button "Continue"{ clearinputafterok = FALSE; norecordmadeorselected = FALSE; terminatestage = FALSE; donotterminatestage = FALSE; specialbuttoncolor = FALSE; buttoncolor = 0; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } roles{ role "S 1"{ } role "S 2"{ } role "S 3"{ } role "S 4"{ } } period "1"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "2"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "3"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "4"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "5"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "6"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "7"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "8"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "9"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } period "10"{ prompt = ""; subject 1{ name = ""; group = 1; do{ Player = 1; } } subject 2{ name = ""; group = 1; do{ Player = 2; } } subject 3{ name = ""; group = 1; do{ Player = 3; } } subject 4{ name = ""; group = 1; do{ Player = 4; } } } }