virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 23)
Status: Beta
Brought to you by:
alllee
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(21) |
Aug
(31) |
Sep
(6) |
Oct
(15) |
Nov
(2) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(4) |
Feb
(6) |
Mar
(12) |
Apr
(52) |
May
(14) |
Jun
(19) |
Jul
(81) |
Aug
(115) |
Sep
(36) |
Oct
(88) |
Nov
(46) |
Dec
(58) |
2010 |
Jan
(52) |
Feb
(55) |
Mar
(48) |
Apr
(15) |
May
(5) |
Jun
(38) |
Jul
(27) |
Aug
(24) |
Sep
(28) |
Oct
(1) |
Nov
(2) |
Dec
(29) |
2011 |
Jan
(87) |
Feb
(39) |
Mar
(63) |
Apr
(42) |
May
(26) |
Jun
(53) |
Jul
(23) |
Aug
(43) |
Sep
(37) |
Oct
(25) |
Nov
(4) |
Dec
(7) |
2012 |
Jan
(73) |
Feb
(79) |
Mar
(62) |
Apr
(28) |
May
(12) |
Jun
(2) |
Jul
(9) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
(3) |
Dec
(3) |
2013 |
Jan
(8) |
Feb
(16) |
Mar
(38) |
Apr
(74) |
May
(62) |
Jun
(15) |
Jul
(49) |
Aug
(19) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bitbucket <com...@bi...> - 2012-01-24 07:28:53
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/e81105acac41/ changeset: e81105acac41 user: alllee date: 2012-01-24 08:28:28 summary: minor hygiene: removing spammy logging. affected #: 1 file diff -r f01830195b58b32107551d4d4b7d555ded1f0e35 -r e81105acac41540f332be3f9e86cad839306aff7 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -979,7 +979,6 @@ private boolean shouldSynchronize(ClientData data) { long startCount = secondTick.getStartCount(); int assignedNumber = data.getAssignedNumber(); - logger.info("start count: " + startCount); return (startCount < 2) || ((startCount % SYNCHRONIZATION_FREQUENCY) == (assignedNumber * 10)); } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-24 07:17:33
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/f01830195b58/ changeset: f01830195b58 user: alllee date: 2012-01-24 08:16:27 summary: fixing synchronization window, moving into the second tick restart so it should only happen once / second per client. affected #: 1 file diff -r 903c3ed759823de338f5947407d5b96a2941c59f -r f01830195b58b32107551d4d4b7d555ded1f0e35 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -7,6 +7,7 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; @@ -101,6 +102,7 @@ private final Logger logger = Logger.getLogger(getClass().getName()); private final Map<Identifier, ClientData> clients = new HashMap<Identifier, ClientData>(); + private final HashSet<Identifier> syncSet = new HashSet<Identifier>(); public final static int SYNCHRONIZATION_FREQUENCY = 60; public final static int SERVER_SLEEP_INTERVAL = 75; @@ -923,6 +925,13 @@ // // } // } + for (ClientData data: clients.values()) { + if (shouldSynchronize(data)) { + logger.info("Sending full sync to: " + data); + transmit(new SynchronizeClientEvent(data, currentRoundDuration.getTimeLeft())); + syncSet.add(data.getId()); + } + } resourceDispenser.generateResources(); secondTick.restart(); } @@ -941,14 +950,14 @@ Map<Identifier, Integer> clientTokens = group.getClientTokens(); Map<Identifier, Point> clientPositions = group.getClientPositions(); for (ClientData data : group.getClientDataMap().values()) { - if (shouldSynchronize(data.getAssignedNumber())) { - logger.info("full client sync: " + data); - transmit(new SynchronizeClientEvent(data, currentRoundDuration.getTimeLeft())); - } - else { - transmit(new ClientPositionUpdateEvent(data, addedResources, removedResources, clientTokens, clientPositions, - currentRoundDuration.getTimeLeft())); - } + if (syncSet.contains(data.getId())) { + // skip this update, then remove them from the sync set. + syncSet.remove(data.getId()); + } + else { + transmit(new ClientPositionUpdateEvent(data, addedResources, removedResources, clientTokens, clientPositions, + currentRoundDuration.getTimeLeft())); + } // post-process cleanup of transient data structures on ClientData data.clearCollectedTokens(); data.resetLatestSanctions(); @@ -967,8 +976,10 @@ return false; } - private boolean shouldSynchronize(int assignedNumber) { + private boolean shouldSynchronize(ClientData data) { long startCount = secondTick.getStartCount(); + int assignedNumber = data.getAssignedNumber(); + logger.info("start count: " + startCount); return (startCount < 2) || ((startCount % SYNCHRONIZATION_FREQUENCY) == (assignedNumber * 10)); } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-24 05:59:24
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/903c3ed75982/ changeset: 903c3ed75982 user: alllee date: 2012-01-24 06:59:07 summary: forgot to clear out group diff lists after processing & transmission to all group members affected #: 3 files diff -r 11c973f697d5c23bc2901b267efb698415894296 -r 903c3ed759823de338f5947407d5b96a2941c59f src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java @@ -312,7 +312,8 @@ * Perform all cleanup. */ public void cleanupRound() { - clearResourceDistribution(); + resourceDistribution.clear(); + clearDiffLists(); tokensCollectedDuringInterval = 0; activeEnforcementMechanism = EnforcementMechanism.NONE; activeSanctionMechanism = SanctionMechanism.NONE; @@ -320,11 +321,6 @@ activeMonitor = null; } - public void clearResourceDistribution() { - resourceDistribution.clear(); - clearDiffLists(); - } - public boolean isResourceAt(Point position) { return resourceDistribution.containsKey(position); } diff -r 11c973f697d5c23bc2901b267efb698415894296 -r 903c3ed759823de338f5947407d5b96a2941c59f src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java @@ -63,9 +63,6 @@ private transient boolean dirty = false; - - - // Maps client Identifiers to the GroupDataModel that the client belongs to private final Map<Identifier, GroupDataModel> clientsToGroups = new HashMap<Identifier, GroupDataModel>(); @@ -318,12 +315,6 @@ group.harvestFruits(id, event.getResource()); } - public void clearDiffLists() { - for (GroupDataModel group : getGroups()) { - group.clearDiffLists(); - } - } - public Queue<RealTimeSanctionRequest> getLatestSanctions(Identifier id) { return clientsToGroups.get(id).getClientData(id).getLatestSanctions(); } diff -r 11c973f697d5c23bc2901b267efb698415894296 -r 903c3ed759823de338f5947407d5b96a2941c59f src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -953,6 +953,8 @@ data.clearCollectedTokens(); data.resetLatestSanctions(); } + // after transmitting all the changes to the group, make sure to cleanup + group.clearDiffLists(); } // FIXME: refine this, send basic info to the facilitator (how many resources left, etc.) if (shouldUpdateFacilitator()) { Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-24 00:04:44
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/a046d8dd6573/ changeset: a046d8dd6573 user: alllee date: 2012-01-24 01:03:56 summary: fixing reference to roundNumber in asu foraging treatment instruction templates affected #: 4 files diff -r b8755f98a7c874936eedff549ad0d3defdf86851 -r a046d8dd6573d20f465738fb06caa4590cff8329 src/main/resources/configuration/asu/2011/t1/server.xml --- a/src/main/resources/configuration/asu/2011/t1/server.xml +++ b/src/main/resources/configuration/asu/2011/t1/server.xml @@ -181,9 +181,9 @@ </entry><entry key="sameRoundAsPreviousInstructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> diff -r b8755f98a7c874936eedff549ad0d3defdf86851 -r a046d8dd6573d20f465738fb06caa4590cff8329 src/main/resources/configuration/asu/2011/t2/server.xml --- a/src/main/resources/configuration/asu/2011/t2/server.xml +++ b/src/main/resources/configuration/asu/2011/t2/server.xml @@ -181,9 +181,9 @@ </entry><entry key="sameRoundAsPreviousInstructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> diff -r b8755f98a7c874936eedff549ad0d3defdf86851 -r a046d8dd6573d20f465738fb06caa4590cff8329 src/main/resources/configuration/asu/2011/t3/server.xml --- a/src/main/resources/configuration/asu/2011/t3/server.xml +++ b/src/main/resources/configuration/asu/2011/t3/server.xml @@ -181,9 +181,9 @@ </entry><entry key="sameRoundAsPreviousInstructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> diff -r b8755f98a7c874936eedff549ad0d3defdf86851 -r a046d8dd6573d20f465738fb06caa4590cff8329 src/main/resources/configuration/asu/2011/t4/server.xml --- a/src/main/resources/configuration/asu/2011/t4/server.xml +++ b/src/main/resources/configuration/asu/2011/t4/server.xml @@ -181,9 +181,9 @@ </entry><entry key="sameRoundAsPreviousInstructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-21 06:37:37
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b8755f98a7c8/ changeset: b8755f98a7c8 user: alllee date: 2012-01-21 07:37:18 summary: tweaking sleep interval affected #: 2 files diff -r 77ad721638ad5831ee26f284f215df7e4091aff0 -r b8755f98a7c874936eedff549ad0d3defdf86851 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -43,6 +43,7 @@ import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.event.TrustGameSubmissionRequest; import edu.asu.commons.foraging.rules.iu.ForagingRule; +import edu.asu.commons.foraging.server.ForagingServer; import edu.asu.commons.foraging.ui.GameWindow; import edu.asu.commons.foraging.ui.GameWindow2D; import edu.asu.commons.foraging.ui.GameWindow3D; @@ -366,7 +367,7 @@ // moveClient(request); transmit(request); } - Utils.sleep(100); + Utils.sleep(ForagingServer.SERVER_SLEEP_INTERVAL); Thread.yield(); } } diff -r 77ad721638ad5831ee26f284f215df7e4091aff0 -r b8755f98a7c874936eedff549ad0d3defdf86851 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -103,7 +103,7 @@ private final Map<Identifier, ClientData> clients = new HashMap<Identifier, ClientData>(); public final static int SYNCHRONIZATION_FREQUENCY = 60; - public final static int SERVER_SLEEP_INTERVAL = 150; + public final static int SERVER_SLEEP_INTERVAL = 75; private Identifier facilitatorId; Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-21 06:26:53
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/77ad721638ad/ changeset: 77ad721638ad user: alllee date: 2012-01-21 07:26:37 summary: applying instructions changes to vote condition as well affected #: 6 files diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java @@ -9,13 +9,13 @@ import edu.asu.commons.net.Identifier; /** - * $Id: EnforcementRankingRequest.java 522 2010-06-30 19:17:48Z alllee $ + * $Id$ * * Sent from a client to the server signaling that the client * has updated the votes to the given options * * @author <a href='all...@as...'>Allen Lee</a> - * @version $Revision: 522 $ + * @version $Revision$ */ public class RuleSelectedUpdateEvent extends AbstractPersistableEvent { diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java @@ -6,13 +6,13 @@ import edu.asu.commons.net.Identifier; /** - * $Id: EnforcementRankingRequest.java 522 2010-06-30 19:17:48Z alllee $ + * $Id$ * * Sent from a client to the server signaling that the client * has updated the votes to the given options * * @author <a href='all...@as...'>Allen Lee</a> - * @version $Revision: 522 $ + * @version $Revision$ */ public class RuleVoteRequest extends AbstractPersistableEvent { diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/resources/configuration/iu/2011/vote/round1.xml --- a/src/main/resources/configuration/iu/2011/vote/round1.xml +++ b/src/main/resources/configuration/iu/2011/vote/round1.xml @@ -26,8 +26,8 @@ <p> In this round the renewable resource will become five times bigger. You will share this larger environment with three other random players in this room. In -particular, each of you in this room has been randomly assigned to one of several -equal-sized {self.clientsPerGroup} person groups and everyone in your group has been +particular, <b>each of you in this room has been randomly assigned to one of several +equally-sized {self.clientsPerGroup} person groups.,</b> And everyone in your group has been randomly assigned a number from 1 to {self.clientsPerGroup}. <b>You will stay in the same group for the entire experiment</b>, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other @@ -35,9 +35,9 @@ <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. </p><p> - In each round of the token task you can see how many tokens each player has + In each round of the token task, you can see how many tokens each player has collected at the top right corner of the screen. On the top left corner of the - screen you will see the remaining time in the round. + screen, you will see the remaining time in the round. </p><h3>Anonymity</h3><hr> diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/resources/configuration/iu/2011/vote/round4.xml --- a/src/main/resources/configuration/iu/2011/vote/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote/round4.xml @@ -17,26 +17,32 @@ <![CDATA[ <h1>Round {self.roundNumber} Instructions</h1><hr> - <p>Round {self.roundNumber} is the same as the previous rounds.</p> - <p>The length of this round is {duration}.</p> - <h2>Strategy Reminder</h2> - <hr> - <p>The strategy your group voted for is:</p> - <ul> - <li><b>{first(self.selectedRules)}</b></li> - </ul> - <p><b>Do you have any questions?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it.</p> +<p> +Round {self.roundNumber} is about to begin. +</p> + <p> + The length of this round is {duration}. + </p> +<h2>Strategy Reminder</h2> +<hr> + <p> + Reminder: + </p> + <ul> + <li><b>{first(self.selectedRules)}</b></li> + </ul> +<p><b>Do you have any questions?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it.</p> ]]></entry><entry key='voting-results'><![CDATA[ - <h1>Voting Results</h1> + <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr><p><b> {first(selectedRules)} </b></p> {if (tiebreaker)} - <p><b>NOTE:</b> There was a tie and selected strategy listed here was randomly selected as the winner.</p> + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p><h2>Other Nominated Strategies</h2><hr><ol> @@ -48,18 +54,19 @@ <entry key='initial-voting-instructions'><![CDATA[ -<h1>Important New Instructions</h1> +<h1>Important New Instructions!</h1><h2>Strategies for managing how players collect tokens for the rest of the experiment</h2><hr><p> -In a moment, you will have the option to implement one of six strategies for how you +In a moment, you will have the option to implement one of five strategies for how you and the three other people in your group collect tokens for the rest of the experiment. </p> + <h2>Procedure for Deciding the Strategy</h2><hr><p> - Each of the {clientsPerGroup} people in your group can nominate one of the six + Each of the {self.clientsPerGroup} people in your group can nominate one of the five potential strategies. The single strategy that receives the most nominations wins. </p> @@ -68,6 +75,7 @@ the computer. Each of the tied strategies will have an equal chance of being selected. </p> + <h2>Implementation</h2><hr><p>Neither the computer nor the experimenter will intervene to implement the @@ -87,8 +95,7 @@ <h1>Strategy Nomination Instructions</h1><hr><p> -To nominate a strategy, click the button to the right of the one you choose, and -then click "submit." The computer will tally the nominations and then report the +To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the results on the next screen. The results will be presented to each person in your group. </p> @@ -106,4 +113,5 @@ <entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_cLX7jnYikmD9eSM&SURVEY_ID={surveyId}]]></entry> + </properties> diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/resources/configuration/iu/2011/vote/round7.xml --- a/src/main/resources/configuration/iu/2011/vote/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote/round7.xml @@ -18,4 +18,21 @@ <entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8&SURVEY_ID={surveyId}]]></entry> + + +<entry key="instructions"> +<![CDATA[ +<h2>Important New Instructions!</h2> +<hr> +<p> +<b>From this point forward, participants will NOT have the option to reduce the earnings of another participant.</b> +</p> + +<h2>Round {self.roundNumber}</h2> +<hr> +<p> +Round {self.roundNumber} is about to begin. The length of this round is again {duration}.</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry></properties> diff -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 -r 77ad721638ad5831ee26f284f215df7e4091aff0 src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -23,8 +23,8 @@ <h1>Survey</h1><hr><p> - This was the final round of the token task. To wrap up we would like to again ask you - some quick questions. Please <a href='{surveyUrl}'>click here</a> to + Before we continue to the next round of the token task, we would like to ask you + some quick questions. Please <a href='{surveyUrl}'>click here</a> to begin the survey. </p><p> @@ -85,9 +85,9 @@ <hr><p> You have already earned {showUpPayment} by showing up at this experiment. You can -earn more, up to a maximum of about $15-$40, by participating in this experiment +earn more, up to a maximum of about $15-$50, by participating in this experiment which will take about an hour to an hour and a half. The amount of money you earn -depends on your decisions as well as the decisions of your group members.</p> +depends on your decisions, as well as the decisions of your group members during the nine rounds of the experiment.</p><h2>The Token Task</h2><hr><p> @@ -110,7 +110,7 @@ The tokens that you collect have the potential to regenerate. After you have collected a green token, a new token can re-appear on that empty cell. The rate at which new tokens appear is dependent on the number of adjacent cells that still have -tokens. The more tokens there are in the eight cells around empty cell, the faster +tokens. The more tokens there are in the eight cells around an empty cell, the faster a new token will appear on that empty cell. </p><p> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/f2bca6d71c29/ changeset: f2bca6d71c29 user: alllee date: 2012-01-21 07:08:27 summary: adjusting ForagingRule enums and moving into .iu subpackage and configuration / instructions fixes. Also adding a configuration variable to enable/disable the token animation. affected #: 19 files diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/client/ClientDataModel.java --- a/src/main/java/edu/asu/commons/foraging/client/ClientDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/client/ClientDataModel.java @@ -18,7 +18,7 @@ import edu.asu.commons.foraging.model.ForagingDataModel; import edu.asu.commons.foraging.model.GroupDataModel; import edu.asu.commons.foraging.model.Resource; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; import edu.asu.commons.util.Duration; /** diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -42,7 +42,7 @@ import edu.asu.commons.foraging.event.SynchronizeClientEvent; import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.event.TrustGameSubmissionRequest; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.foraging.ui.GameWindow; import edu.asu.commons.foraging.ui.GameWindow2D; import edu.asu.commons.foraging.ui.GameWindow3D; diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -18,7 +18,7 @@ import edu.asu.commons.foraging.model.EnforcementMechanism; import edu.asu.commons.foraging.model.ResourceDispenser; import edu.asu.commons.foraging.model.ServerDataModel; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; import edu.asu.commons.util.Duration; @@ -557,9 +557,7 @@ } public String getInitialVotingInstructions() { - ST template = createStringTemplate(getProperty("initial-voting-instructions", "<h1>Notice</h1><hr><p>You will be given the ability to vote for rules in the next screen.</p>")); - template.add("clientsPerGroup", getClientsPerGroup()); - return template.render(); + return createStringTemplate(getProperty("initial-voting-instructions", getParentConfiguration().getInitialVotingInstructions())).render(); } public List<ForagingRule> getForagingRules() { @@ -722,7 +720,7 @@ } public String getSubmittedVoteInstructions() { - return getProperty("submitted-vote-instructions", "<h1>Submitted</h1><hr><p>Thank you for submitting your vote. Please wait while we tally the rest of the votes from the other members of your group.</p>"); + return getProperty("submitted-vote-instructions", "<h1>Submitted</h1><hr><p>Your nomination has been recorded. The final results of the nomination will be shown once all the nominations in your group have been received.</p>"); } public String getVotingResults(List<ForagingRule> selectedRules) { @@ -829,4 +827,8 @@ public String getDurationInMinutes() { return inMinutes(getDuration()) + " minutes"; } + + public boolean showTokenAnimation() { + return getBooleanProperty("show-token-animation", true); + } } diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -143,4 +143,8 @@ return data.getCorrectQuizAnswers() * getQuizCorrectAnswerReward(); } + public String getInitialVotingInstructions() { + return assistant.getProperty("initial-voting-instructions"); + } + } diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java @@ -5,7 +5,7 @@ import java.util.Map; import edu.asu.commons.event.AbstractPersistableEvent; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; /** diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleVoteRequest.java @@ -2,7 +2,7 @@ import edu.asu.commons.event.AbstractPersistableEvent; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; /** diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/model/ClientData.java --- a/src/main/java/edu/asu/commons/foraging/model/ClientData.java +++ b/src/main/java/edu/asu/commons/foraging/model/ClientData.java @@ -13,7 +13,7 @@ import edu.asu.commons.foraging.conf.RoundConfiguration.SanctionAction; import edu.asu.commons.foraging.event.RealTimeSanctionRequest; import edu.asu.commons.foraging.graphics.Point3D; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.foraging.ui.Circle; import edu.asu.commons.net.Identifier; import edu.asu.commons.util.Duration; diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java @@ -25,7 +25,7 @@ import edu.asu.commons.foraging.event.SynchronizeClientEvent; import edu.asu.commons.foraging.event.TokenCollectedEvent; import edu.asu.commons.foraging.event.UnlockResourceRequest; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.foraging.ui.Circle; import edu.asu.commons.net.Identifier; diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/rules/ForagingRule.java --- a/src/main/java/edu/asu/commons/foraging/rules/ForagingRule.java +++ /dev/null @@ -1,36 +0,0 @@ -package edu.asu.commons.foraging.rules; - -/** - * $Id$ - * - * A set of rules for the Indiana experiments run by Daniel DeCaro in 2011/2012. - * - * Split into an .iu or other subpackage if it turns out these aren't generic enough. - * - * @author <a href='mailto:all...@as...'>Allen Lee</a> - * @version $Rev$ - */ -public enum ForagingRule { - // FIXME: hard coded for 4 minute rounds, but templatizing this text is a bit of overkill at the moment unless - // we move this over to the configuration. - WAIT_ONE_MINUTE("Wait 60 seconds for the screen to fill up with tokens (the timer will have 180 seconds left). Then everyone collects tokens for the remaining amount of time."), - PRIVATE_PROPERTY("Players divide the field up into four equally-sized areas and can do whatever they want within their area. With four people, each person takes an area around one of the four corners."), - LIMITED_COLLECTION_RATE("Each person collects tokens at a rate of 1 token every 4 seconds."), - MAINTAIN_TOKEN_CLUSTERS("Players leave two tokens untouched when the tokens are in a cluster of three or more that surround an empty cell."), - LEAVE_TEN_FOR_REGROWTH("Collect tokens until only 10 are left; at that point, everyone must wait at least 30 seconds before collecting any more tokens."), - NONE("Everyone can do whatever they want."); - - private final String description; - - private ForagingRule(String description) { - this.description = description; - } - - public String getDescription() { - return description; - } - - public String toString() { - return description; - } -} diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/rules/iu/ForagingRule.java --- /dev/null +++ b/src/main/java/edu/asu/commons/foraging/rules/iu/ForagingRule.java @@ -0,0 +1,33 @@ +package edu.asu.commons.foraging.rules.iu; + +/** + * $Id$ + * + * A set of rules for the Indiana experiments run by Daniel DeCaro in 2011/2012. + * + * @author <a href='mailto:all...@as...'>Allen Lee</a> + * @version $Rev$ + */ +public enum ForagingRule { + // FIXME: hard coded for 4 minute rounds, but templatizing this text is a bit of overkill at the moment unless + // we move this over to the configuration. + WAIT_ONE_MINUTE("Wait 60 seconds for the screen to fill up with tokens. Then everyone collects tokens for the remaining amount of time."), + PRIVATE_PROPERTY("Players divide the field up into four equally-sized areas and can do whatever they want within their area. With four people, each person takes an area around one of the four corners."), + WAIT_TEN_SECONDS("Wait 10 seconds, then collect 3 tokens. Repeat this process until the time runs out or all the tokens are gone."), + COLLECT_TOKENS_AND_WAIT("Collect tokens for 10 seconds. Then stop and wait for 5 seconds before starting this process again."), + NONE("Everyone can do whatever they want."); + + private final String description; + + private ForagingRule(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } + + public String toString() { + return description; + } +} diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -78,7 +78,7 @@ import edu.asu.commons.foraging.model.ResourceDispenser; import edu.asu.commons.foraging.model.ServerDataModel; import edu.asu.commons.foraging.model.TrustGameResult; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.foraging.ui.Circle; import edu.asu.commons.net.Dispatcher; import edu.asu.commons.net.Identifier; diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -57,7 +57,7 @@ import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.model.ClientData; import edu.asu.commons.foraging.model.Direction; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; import edu.asu.commons.ui.HtmlEditorPane; import edu.asu.commons.ui.UserInterfaceUtils; @@ -770,7 +770,6 @@ instructionsEditorPane.setActionListener(null); instructionsEditorPane.setActionListener(createSurveyFinishedListener()); setInstructions(dataModel.getRoundConfiguration().getSurveyInstructions(dataModel.getId())); - switchInstructionsPane(); } }); diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/ui/SubjectView.java --- a/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java @@ -42,8 +42,8 @@ private final ClientDataModel dataModel; - private boolean tokenFieldOfVision; - private boolean subjectFieldOfVision; + private boolean tokenFieldOfVisionEnabled; + private boolean subjectFieldOfVisionEnabled; public final static Color FIELD_OF_VISION_COLOR = new Color(255, 255, 255, 150); @@ -75,37 +75,39 @@ viewTokensField = null; synchronized (collectedTokens) { collectedTokens.clear(); - tokenFieldOfVision = configuration.isTokensFieldOfVisionEnabled(); - if (tokenFieldOfVision) { + tokenFieldOfVisionEnabled = configuration.isTokensFieldOfVisionEnabled(); + if (tokenFieldOfVisionEnabled) { viewTokensRadius = configuration.getViewTokensRadius(); Point location = dataModel.getCurrentPosition(); viewTokensField = new Circle(location, viewTokensRadius); } - subjectFieldOfVision = configuration.isSubjectsFieldOfVisionEnabled(); - if (subjectFieldOfVision) { + subjectFieldOfVisionEnabled = configuration.isSubjectsFieldOfVisionEnabled(); + if (subjectFieldOfVisionEnabled) { viewSubjectsRadius = configuration.getViewSubjectsRadius(); viewSubjectsField = new Circle(dataModel.getCurrentPosition(), viewSubjectsRadius); } } super.setup(configuration); - if (tokenFieldOfVision || subjectFieldOfVision) { + if (tokenFieldOfVisionEnabled || subjectFieldOfVisionEnabled) { fieldOfVisionOffset = (dw / 2.0d); System.err.println("field of vision offset: " + fieldOfVisionOffset); } } public void collectTokens(Point ... positions) { - synchronized (collectedTokens) { - for (Point position: positions) { - collectedTokens.put(position, Duration.create(COLLECTED_TOKEN_ANIMATION_DURATION)); - } - } + if (dataModel.getRoundConfiguration().showTokenAnimation()) { + synchronized (collectedTokens) { + for (Point position: positions) { + collectedTokens.put(position, Duration.create(COLLECTED_TOKEN_ANIMATION_DURATION)); + } + } + } } protected void paintTokens(Graphics2D graphics2D) { // three cases - show all food on the game board, show all food within // visible radius of the current player, or don't show any food. - if (tokenFieldOfVision) { + if (tokenFieldOfVisionEnabled) { viewTokensField.setCenter(dataModel.getCurrentPosition()); paintCollection(dataModel.getResourcePositions(), graphics2D, scaledTokenImage, this, viewTokensField); } @@ -118,28 +120,30 @@ int height = (int) dh; int offset = 1; // paint shrinking tokens that this client has consumed. - synchronized (collectedTokens) { - for (Iterator<Map.Entry<Point, Duration>> iter = collectedTokens.entrySet().iterator(); iter.hasNext();) { - Map.Entry<Point, Duration> entry = iter.next(); - Point point = entry.getKey(); - Duration duration = entry.getValue(); - elapsedTime = duration.getElapsedTime(); - // FIXME: offset should be proportional to the actual size. - if (elapsedTime < 333L) { - offset = 1; - } else if (elapsedTime < 666L) { - offset = 2; - } else if (elapsedTime < 1000L) { - offset = 3; - } else { - // After the time threshold has been exceeded, prune old food - // that shouldn't be displayed. - iter.remove(); - continue; - } - // food pellets shrink over time - paintToken(point, graphics2D, width/offset, height/offset); - } + if (dataModel.getRoundConfiguration().showTokenAnimation()) { + synchronized (collectedTokens) { + for (Iterator<Map.Entry<Point, Duration>> iter = collectedTokens.entrySet().iterator(); iter.hasNext();) { + Map.Entry<Point, Duration> entry = iter.next(); + Point point = entry.getKey(); + Duration duration = entry.getValue(); + elapsedTime = duration.getElapsedTime(); + // FIXME: offset should be proportional to the actual size. + if (elapsedTime < 333L) { + offset = 1; + } else if (elapsedTime < 666L) { + offset = 2; + } else if (elapsedTime < 1000L) { + offset = 3; + } else { + // After the time threshold has been exceeded, prune old food + // that shouldn't be displayed. + iter.remove(); + continue; + } + // food pellets shrink over time + paintToken(point, graphics2D, width/offset, height/offset); + } + } } } @@ -155,7 +159,7 @@ int characterHeight = fontMetrics.getAscent(); int verticalCharacterSpacing = (int) ( (dh - characterHeight) / 2); Point currentPosition = dataModel.getCurrentPosition(); - if (subjectFieldOfVision) { + if (subjectFieldOfVisionEnabled) { // paint a transparent circle centered on the current position of the subject. int radius = viewSubjectsRadius; viewSubjectsField.setCenter(currentPosition); diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/java/edu/asu/commons/foraging/ui/VotingForm.java --- a/src/main/java/edu/asu/commons/foraging/ui/VotingForm.java +++ b/src/main/java/edu/asu/commons/foraging/ui/VotingForm.java @@ -32,7 +32,7 @@ import javax.swing.WindowConstants; import edu.asu.commons.foraging.client.ForagingClient; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.ui.UserInterfaceUtils; /** diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/resources/configuration/iu/2011/vote-punish/round1.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round1.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round1.xml @@ -26,8 +26,8 @@ <p> In this round the renewable resource will become five times bigger. You will share this larger environment with three other random players in this room. In -particular, each of you in this room has been randomly assigned to one of several -equal-sized {self.clientsPerGroup} person groups and everyone in your group has been +particular, <b>each of you in this room has been randomly assigned to one of several +equally-sized {self.clientsPerGroup} person groups.,</b> And everyone in your group has been randomly assigned a number from 1 to {self.clientsPerGroup}. <b>You will stay in the same group for the entire experiment</b>, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other @@ -35,9 +35,9 @@ <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. </p><p> - In each round of the token task you can see how many tokens each player has + In each round of the token task, you can see how many tokens each player has collected at the top right corner of the screen. On the top left corner of the - screen you will see the remaining time in the round. + screen, you will see the remaining time in the round. </p><h3>Anonymity</h3><hr> diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/resources/configuration/iu/2011/vote-punish/round4.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round4.xml @@ -15,7 +15,7 @@ <entry key='voting-enabled'>true</entry><entry key="instructions"><![CDATA[ - <h1>Important New Instructions</h1> + <h1>Important New Instructions!</h1><h2>Reducing Other Player's Earnings</h2><hr><p> @@ -55,7 +55,7 @@ <h2>Strategy Reminder</h2><hr><p> - The strategy your group voted for is: + Reminder: </p><ul><li><b>{first(self.selectedRules)}</b></li> @@ -66,12 +66,12 @@ <entry key='voting-results'><![CDATA[ - <h1>Voting Results</h1> + <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr><p><b> {first(selectedRules)} </b></p> {if (tiebreaker)} - <p><b>NOTE:</b> There was a tie and selected strategy listed here was randomly selected as the winner.</p> + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p><h2>Other Nominated Strategies</h2><hr><ol> @@ -83,18 +83,19 @@ <entry key='initial-voting-instructions'><![CDATA[ -<h1>Important New Instructions</h1> +<h1>Important New Instructions!</h1><h2>Strategies for managing how players collect tokens for the rest of the experiment</h2><hr><p> -In a moment, you will have the option to implement one of six strategies for how you +In a moment, you will have the option to implement one of five strategies for how you and the three other people in your group collect tokens for the rest of the experiment. </p> + <h2>Procedure for Deciding the Strategy</h2><hr><p> - Each of the {clientsPerGroup} people in your group can nominate one of the six + Each of the {self.clientsPerGroup} people in your group can nominate one of the five potential strategies. The single strategy that receives the most nominations wins. </p> @@ -103,6 +104,7 @@ the computer. Each of the tied strategies will have an equal chance of being selected. </p> + <h2>Implementation</h2><hr><p>Neither the computer nor the experimenter will intervene to implement the @@ -122,8 +124,7 @@ <h1>Strategy Nomination Instructions</h1><hr><p> -To nominate a strategy, click the button to the right of the one you choose, and -then click "submit." The computer will tally the nominations and then report the +To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the results on the next screen. The results will be presented to each person in your group. </p> diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/resources/configuration/iu/2011/vote-punish/round7.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round7.xml @@ -22,12 +22,16 @@ <entry key="instructions"><![CDATA[ -<h3>Instructions</h3> +<h2>Important New Instructions!</h2><hr><p> -From this point forward, participants will NOT have the option to reduce the earnings of another participant. +<b>From this point forward, participants will NOT have the option to reduce the earnings of another participant.</b></p> -<p>The length of this round is {duration}.</p> + +<h2>Round {self.roundNumber}</h2> +<hr> +<p> +Round {self.roundNumber} is about to begin. The length of this round is again {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]></entry> diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -23,8 +23,8 @@ <h1>Survey</h1><hr><p> - This was the final round of the token task. To wrap up we would like to again ask you - some quick questions. Please <a href='{surveyUrl}'>click here</a> to + Before we continue to the next round of the token task, we would like to ask you + some quick questions. Please <a href='{surveyUrl}'>click here</a> to begin the survey. </p><p> @@ -85,9 +85,9 @@ <hr><p> You have already earned {showUpPayment} by showing up at this experiment. You can -earn more, up to a maximum of about $15-$40, by participating in this experiment +earn more, up to a maximum of about $15-$50, by participating in this experiment which will take about an hour to an hour and a half. The amount of money you earn -depends on your decisions as well as the decisions of your group members.</p> +depends on your decisions, as well as the decisions of your group members during the nine rounds of the experiment.</p><h2>The Token Task</h2><hr><p> @@ -110,7 +110,7 @@ The tokens that you collect have the potential to regenerate. After you have collected a green token, a new token can re-appear on that empty cell. The rate at which new tokens appear is dependent on the number of adjacent cells that still have -tokens. The more tokens there are in the eight cells around empty cell, the faster +tokens. The more tokens there are in the eight cells around an empty cell, the faster a new token will appear on that empty cell. </p><p> diff -r f22cde9f795d44940802d73c1083abd4c2271ca5 -r f2bca6d71c29c0cb8c1c574f2fc7080e2e704280 src/test/java/edu/asu/commons/foraging/model/GroupDataModelTest.java --- a/src/test/java/edu/asu/commons/foraging/model/GroupDataModelTest.java +++ b/src/test/java/edu/asu/commons/foraging/model/GroupDataModelTest.java @@ -12,7 +12,7 @@ import org.junit.Test; import edu.asu.commons.foraging.conf.RoundConfiguration; -import edu.asu.commons.foraging.rules.ForagingRule; +import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.net.Identifier; public class GroupDataModelTest { Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-20 16:22:43
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b3ca85e82159/ changeset: b3ca85e82159 user: alllee date: 2012-01-20 17:16:50 summary: asking the RoundConfiguration for survey instructions will now attempt to be loaded from ServerConfiguration if it's not set at the round level affected #: 7 files diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -705,7 +705,7 @@ } public String getSurveyInstructions() { - return getProperty("survey-instructions"); + return getProperty("survey-instructions", getParentConfiguration().getSurveyInstructions()); } public String getSurveyUrl(Identifier id) { diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -118,25 +118,29 @@ "<h3>The experiment has ended and participant payments are listed above. We recommend that you copy and paste it into a text editor for your records.</h3>"); } - public String getFacilitatorDebriefing() { - return assistant.getProperty("facilitator-debriefing"); - } - - public String getClientDebriefing() { - return assistant.getProperty("client-debriefing"); - } - - public double getTotalIncome(ClientData data) { - return getTotalIncome(data, false); - } - - public double getTotalIncome(ClientData data, boolean includeTrustGame) { - double totalIncome = data.getTotalIncome() + getShowUpPayment() + getQuizEarnings(data); - return (includeTrustGame) ? totalIncome + data.getTrustGameIncome() : totalIncome; - } - - public double getQuizEarnings(ClientData data) { + public String getSurveyInstructions() { + return assistant.getProperty("survey-instructions"); + } + + public String getFacilitatorDebriefing() { + return assistant.getProperty("facilitator-debriefing"); + } + + public String getClientDebriefing() { + return assistant.getProperty("client-debriefing"); + } + + public double getTotalIncome(ClientData data) { + return getTotalIncome(data, false); + } + + public double getTotalIncome(ClientData data, boolean includeTrustGame) { + double totalIncome = data.getTotalIncome() + getShowUpPayment() + getQuizEarnings(data); + return (includeTrustGame) ? totalIncome + data.getTrustGameIncome() : totalIncome; + } + + public double getQuizEarnings(ClientData data) { return data.getCorrectQuizAnswers() * getQuizCorrectAnswerReward(); } - + } diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/java/edu/asu/commons/foraging/event/SurveyCompletedEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/SurveyCompletedEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/SurveyCompletedEvent.java @@ -5,7 +5,7 @@ import edu.asu.commons.net.Identifier; /** - * $Id: QuizResponseEvent.java 522 2010-06-30 19:17:48Z alllee $ + * $Id$ * * Signals that a client has completed the survey for the given round. * diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/resources/configuration/iu/2011/vote-punish/round4.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round4.xml @@ -138,30 +138,6 @@ </entry><entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - Before we continue to the next round of the token task, we would like to ask you - some quick questions. Please <a href='{surveyUrl}'>click here</a> to - begin the survey. - </p> - <p> - We will continue with the rest of the experiment after all of the - surveys have been completed by all the participants in the room. Please - press the "Continue" button at the bottom of the screen after you have - successfully completed the survey. - </p> - <p> - If you encounter any problems with the survey <b>please inform the experimenter</b>. - </p> - <br> - <form> - <input type="submit" value="Continue" name="continue"> - </form> - ]]> -</entry><entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_cLX7jnYikmD9eSM&SURVEY_ID={surveyId}]]></entry> diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/resources/configuration/iu/2011/vote-punish/round7.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round7.xml @@ -15,26 +15,6 @@ <entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - Before we continue to the next round of the token task, we would like to ask you - some quick questions. Please <a href='{surveyUrl}'>click here</a> to - begin the survey. - </p> - <p> - We will continue with the rest of the experiment after all of the - surveys have been completed by all the participants in the room. Please - press the "Continue" button at the bottom of the screen after you have - successfully completed the survey. - </p> - <p> - If you encounter any problems with the survey <b>please inform the experimenter</b>. - </p> - ]]> -</entry><entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8&SURVEY_ID={surveyId}]]></entry> diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/resources/configuration/iu/2011/vote-punish/round9.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round9.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round9.xml @@ -15,26 +15,6 @@ <entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - This was the final round of the token task. To wrap up we would like to again ask you - some quick questions. Please <a href='{surveyUrl}'>click here</a> to - begin the survey. - </p> - <p> - We will continue with the rest of the experiment after all of the - surveys have been completed by all the participants in the room. Please - press the "Continue" button at the bottom of the screen after you have - successfully completed the survey. - </p> - <p> - If you encounter any problems with the survey <b>please inform the experimenter</b>. - </p> - ]]> -</entry><entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm&SURVEY_ID={surveyId}]]></entry> diff -r a21112c697c5ebc09975aab27491bb6498471dac -r b3ca85e821599807ef6682bff167286f64320afe src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -18,6 +18,31 @@ <entry key="number-of-rounds">10</entry><entry key='external-survey-enabled'>true</entry><entry key='survey-id-enabled'>true</entry> +<entry key='survey-instructions'> + <![CDATA[ + <h1>Survey</h1> + <hr> + <p> + This was the final round of the token task. To wrap up we would like to again ask you + some quick questions. Please <a href='{surveyUrl}'>click here</a> to + begin the survey. + </p> + <p> + We will continue with the rest of the experiment after all of the + surveys have been completed by all the participants in the room. Please + press the "Continue" button at the bottom of the screen after you have + successfully completed the survey. + </p> + <p> + If you encounter any problems with the survey <b>please inform the experimenter</b>. + </p> + <br> + <form> + <input type="submit" value="Continue" name="continue"> + </form> + ]]> +</entry> + <entry key="facilitator-instructions"><![CDATA[ <p> https://bitbucket.org/virtualcommons/foraging/changeset/17326d720689/ changeset: 17326d720689 user: alllee date: 2012-01-20 17:22:42 summary: wiring up facilitator messaging when clients report that they've completed the survey (w/o verification though since it's external) affected #: 1 file diff -r b3ca85e821599807ef6682bff167286f64320afe -r 17326d720689fcc2693b661c33d748b8843fe748 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -62,6 +62,7 @@ import edu.asu.commons.foraging.event.RuleVoteRequest; import edu.asu.commons.foraging.event.SanctionAppliedEvent; import edu.asu.commons.foraging.event.ShowRequest; +import edu.asu.commons.foraging.event.SurveyCompletedEvent; import edu.asu.commons.foraging.event.SurveyIdSubmissionRequest; import edu.asu.commons.foraging.event.SynchronizeClientEvent; import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; @@ -247,15 +248,15 @@ sendFacilitatorMessage(String.format("Updating %s with station number %s", clientSocketId, request.getStationNumber())); } }); - // client handlers addEventProcessor(new EventTypeProcessor<ConnectionEvent>(ConnectionEvent.class) { @Override public void handle(ConnectionEvent event) { - // handle incoming connections + // handles incoming connections if (experimentStarted) { - // currently not allowing any new connections - // FIXME: would be nice to allow for reconnection / reassociation of clients to ids and data. - // should be logged however so we can remember the context of the data + // currently not allowing any new connections + // FIXME: would be nice to allow for reconnection / + // reassociation of clients to ids and data. should be + // logged however so we can remember the context of the data transmit(new ClientMessageEvent(event.getId(), "The experiment has already started, we cannot add you at this time.")); return; } @@ -300,6 +301,20 @@ } } }); + addEventProcessor(new EventTypeProcessor<SurveyCompletedEvent>(SurveyCompletedEvent.class) { + private int submittedSurveys = 0; + @Override + public void handle(SurveyCompletedEvent event) { + if (getCurrentRoundConfiguration().isExternalSurveyEnabled()) { + submittedSurveys++; + sendFacilitatorMessage(String.format("Received %d of %d surveys: %s", submittedSurveys, clients.size(), event)); + if (submittedSurveys >= clients.size()) { + sendFacilitatorMessage("All surveys have been reported as completed, ready to continue."); + submittedSurveys = 0; + } + } + } + }); addEventProcessor(new EventTypeProcessor<QuizResponseEvent>(QuizResponseEvent.class) { public void handle(final QuizResponseEvent event) { Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-20 07:00:03
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/6e92fdb8f8d1/ changeset: 6e92fdb8f8d1 user: alllee date: 2012-01-20 07:59:16 summary: adding continue button to survey instructions + ActionListener that simply jumps to the regular round instructions and a SurveyCompletedEvent that the client will use to signal to the server + facilitator that the survey has been "completed". Still need to wire up the server / facilitator handling of SurveyCompletedEvent. affected #: 2 files diff -r 6702907cf392ccab3c5914b489a1c086f1c4bb9d -r 6e92fdb8f8d1cb836a19c972c70f964fe86277ff src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -53,6 +53,7 @@ import edu.asu.commons.foraging.event.QuizResponseEvent; import edu.asu.commons.foraging.event.RealTimeSanctionRequest; import edu.asu.commons.foraging.event.ResetTokenDistributionRequest; +import edu.asu.commons.foraging.event.SurveyCompletedEvent; import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.model.ClientData; import edu.asu.commons.foraging.model.Direction; @@ -65,34 +66,25 @@ /** * $Id$ * - * The client-side view for forager - can be used by standalone Java - * applications or Applets. + * Primary client-side view for foraging experiment that can be used by standalone Java applications or Applets. * * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Revision$ */ public class GameWindow2D implements GameWindow { - - private final ClientDataModel dataModel; - - // instructions panel private final static String INSTRUCTIONS_PANEL_NAME = "instructions screen panel"; - // game board panel private final static String GAME_PANEL_NAME = "foraging game panel"; private final static String TRUST_GAME_PANEL_NAME = "trust game panel"; - // standalone chat panel private final static String CHAT_PANEL_NAME = "standalone chat panel"; - // survey id panel + private final static String POST_ROUND_SANCTIONING_PANEL_NAME = "post round sanctioning panel"; private final static String SURVEY_ID_PANEL_NAME = "survey id panel"; - - protected static final String POST_ROUND_SANCTIONING_PANEL_NAME = null; - private String currentCardPanel = INSTRUCTIONS_PANEL_NAME; - - // private Component currentCenterComponent; + + private final StringBuilder instructionsBuilder = new StringBuilder(); + private final ClientDataModel dataModel; + private EventChannel channel; private JPanel mainPanel; - // instructions components. private JScrollPane instructionsScrollPane; private HtmlEditorPane instructionsEditorPane; @@ -105,9 +97,6 @@ private JPanel surveyIdPanel; - // FIXME: this shouldn't be public - public static Duration duration; - private ChatPanel chatPanel; private JLabel informationLabel; @@ -120,15 +109,16 @@ private SubjectView subjectView; - public Timer timer; - - private final StringBuilder instructionsBuilder = new StringBuilder(); - - private EventChannel channel; - private CardLayout cardLayout; private ChatPanel inRoundChatPanel; + + private Timer timer; + + // voting components + private JPanel votingPanel; + private VotingForm votingForm; + private HtmlEditorPane votingInstructionsEditorPane; // private EnergyLevel energyLevel; @@ -198,6 +188,17 @@ styleSheet.addRule(styleString); } } + + private ActionListener createSurveyFinishedListener() { + return new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + client.transmit(new SurveyCompletedEvent(client.getId())); + showInstructions(); + instructionsEditorPane.setActionListener(null); + } + }; + } private ActionListener createQuizListener(final RoundConfiguration configuration) { return new ActionListener() { @@ -670,7 +671,7 @@ } public void showTrustGame() { - RoundConfiguration roundConfiguration = dataModel.getRoundConfiguration(); + final RoundConfiguration roundConfiguration = dataModel.getRoundConfiguration(); if (roundConfiguration.isTrustGameEnabled()) { SwingUtilities.invokeLater(new Runnable() { public void run() { @@ -678,17 +679,12 @@ panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); JEditorPane trustGameInstructionsEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); JScrollPane scrollPane = new JScrollPane(trustGameInstructionsEditorPane); - trustGameInstructionsEditorPane.setText(client.getCurrentRoundConfiguration().getTrustGameInstructions()); + trustGameInstructionsEditorPane.setText(roundConfiguration.getTrustGameInstructions()); panel.add(scrollPane); - TrustGamePanel trustGamePanel = new TrustGamePanel(client); - // trustGamePanel.setPreferredSize(new Dimension(300, 400)); JScrollPane trustGameScrollPane = new JScrollPane(trustGamePanel); panel.add(trustGameScrollPane); panel.setName(TRUST_GAME_PANEL_NAME); - // addCenterComponent(panel); - // panel.revalidate(); - // panel.repaint(); add(panel); showPanel(TRUST_GAME_PANEL_NAME); } @@ -697,7 +693,8 @@ } public void trustGameSubmitted() { - instructionsBuilder.append("<h1>Submission successful</h1><hr><p>Please wait while the rest of the submissions are gathered.</p>"); + // FIXME: replace HTML strings with configuration template + instructionsBuilder.append("<h3>Submission successful</h3><hr><p>Please wait while the rest of the submissions are gathered.</p>"); setInstructions(instructionsBuilder.toString()); switchInstructionsPane(); } @@ -730,11 +727,6 @@ }); } - private JPanel votingPanel; - - private VotingForm votingForm; - - private HtmlEditorPane votingInstructionsEditorPane; private JPanel getVotingPanel() { if (votingPanel == null) { @@ -775,13 +767,15 @@ public void showSurveyInstructions() { SwingUtilities.invokeLater(new Runnable() { public void run() { + instructionsEditorPane.setActionListener(null); + instructionsEditorPane.setActionListener(createSurveyFinishedListener()); setInstructions(dataModel.getRoundConfiguration().getSurveyInstructions(dataModel.getId())); + switchInstructionsPane(); } }); } - public void switchInstructionsPane() { showPanel(INSTRUCTIONS_PANEL_NAME); } diff -r 6702907cf392ccab3c5914b489a1c086f1c4bb9d -r 6e92fdb8f8d1cb836a19c972c70f964fe86277ff src/main/resources/configuration/iu/2011/vote-punish/round4.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round4.xml @@ -156,6 +156,10 @@ <p> If you encounter any problems with the survey <b>please inform the experimenter</b>. </p> + <br> + <form> + <input type="submit" value="Continue" name="continue"> + </form> ]]></entry><entry key='survey-url'> https://bitbucket.org/virtualcommons/foraging/changeset/a21112c697c5/ changeset: a21112c697c5 user: alllee date: 2012-01-20 07:59:43 summary: adding continue button to survey instructions + ActionListener that simply jumps to the regular round instructions and a SurveyCompletedEvent that the client will use to signal to the server + facilitator that the survey has been "completed". Still need to wire up the server / facilitator handling of SurveyCompletedEvent. affected #: 1 file diff -r 6e92fdb8f8d1cb836a19c972c70f964fe86277ff -r a21112c697c5ebc09975aab27491bb6498471dac src/main/java/edu/asu/commons/foraging/event/SurveyCompletedEvent.java --- /dev/null +++ b/src/main/java/edu/asu/commons/foraging/event/SurveyCompletedEvent.java @@ -0,0 +1,29 @@ +package edu.asu.commons.foraging.event; + +import edu.asu.commons.event.AbstractPersistableEvent; +import edu.asu.commons.event.ClientRequest; +import edu.asu.commons.net.Identifier; + +/** + * $Id: QuizResponseEvent.java 522 2010-06-30 19:17:48Z alllee $ + * + * Signals that a client has completed the survey for the given round. + * + * + * @author <a href='mailto:All...@as...'>Allen Lee</a> + * @version $Rev: 522 $ + */ +public class SurveyCompletedEvent extends AbstractPersistableEvent implements ClientRequest { + + private static final long serialVersionUID = -7081410122722056083L; + + public SurveyCompletedEvent(Identifier id) { + super(id); + } + + @Override + public String toString() { + return String.format("Survey completed by %s", id); + } + +} Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 23:10:51
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/8832db4b5dd3/ changeset: 8832db4b5dd3 user: alllee date: 2012-01-20 00:10:52 summary: fixing survey URL and instruction links for vote-punish condition affected #: 5 files diff -r d76727cadd7803db7bb0425d9b96784779d99a15 -r 8832db4b5dd30e04c5f30cf3f612b1facf0c4635 src/main/resources/configuration/iu/2011/vote-punish/round0.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round0.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round0.xml @@ -69,13 +69,14 @@ <hr><p> {if (allCorrect)} - You have answered all the questions correctly. + You have answered all the questions correctly and earned <b>{totalQuizEarnings}</b>. {else} - You answered {numberCorrect}/{totalQuestions} questions correctly. Questions you've answered + You answered {numberCorrect} out of {totalQuestions} questions correctly + and earned <b>{totalQuizEarnings}</b>. Questions you've answered incorrectly are highlighted in red. Please see below for more details. {endif} </p> - <br><hr> + <hr><form><span class='q1'>Q1. Which of these statements is NOT correct?</span><br><b>{incorrect_q1} @@ -88,7 +89,7 @@ B. When you have collected all tokens on the screen, no new tokens will appear.<br> C. Tokens grow from the middle of the screen.<br> D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> +<br><span class='q2'>Q2. Which sequence of situations is not possible?</span><br><b> {incorrect_q2} diff -r d76727cadd7803db7bb0425d9b96784779d99a15 -r 8832db4b5dd30e04c5f30cf3f612b1facf0c4635 src/main/resources/configuration/iu/2011/vote-punish/round7.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round7.xml @@ -21,22 +21,13 @@ <hr><p> Before we continue to the next round of the token task, we would like to ask you - some quick questions. At the beginning of the survey you will need to enter: - </p> - <ul> - <li>Your participant ID: {participantId} </li> - <li>Your survey ID: {surveyId} </li> - </ul> - <p> - Please <a href='{surveyLink}'>click here</a> to begin the survey. + some quick questions. Please <a href='{surveyUrl}'>click here</a> to + begin the survey. </p> ]]></entry> - -<entry key='survey-link'> - <![CDATA[ - https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8 - ]]> +<entry key='survey-url'> + <![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8&SURVEY_ID={surveyId}]]></entry> @@ -48,10 +39,7 @@ From this point forward, participants will NOT have the option to reduce the earnings of another participant. </p><p>The length of this round is {duration}.</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]></entry></properties> diff -r d76727cadd7803db7bb0425d9b96784779d99a15 -r 8832db4b5dd30e04c5f30cf3f612b1facf0c4635 src/main/resources/configuration/iu/2011/vote-punish/round8.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round8.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round8.xml @@ -8,9 +8,6 @@ <entry key="resource-width">26</entry><entry key="duration">240</entry> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - <entry key="initial-distribution">.25</entry><entry key='always-explicit'>true</entry> diff -r d76727cadd7803db7bb0425d9b96784779d99a15 -r 8832db4b5dd30e04c5f30cf3f612b1facf0c4635 src/main/resources/configuration/iu/2011/vote-punish/round9.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round9.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round9.xml @@ -8,9 +8,6 @@ <entry key="resource-width">26</entry><entry key="duration">240</entry> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - <entry key="initial-distribution">.25</entry><entry key='always-explicit'>true</entry> @@ -24,38 +21,15 @@ <hr><p> Before we continue to the next round of the token task, we would like to ask you - some quick questions. At the beginning of the survey you will need to enter: - </p> - <ul> - <li>Your participant ID: {participantId} </li> - <li>Your survey ID: {surveyId} </li> - </ul> - <p> - Please <a href='{surveyLink}'>click here</a> to begin the survey. + some quick questions. Please <a href='{surveyUrl}'>click here</a> to + begin the survey. </p> ]]></entry> - -<entry key='survey-link'> - <![CDATA[ - https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm - ]]> +<entry key='survey-url'> + <![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm&SURVEY_ID={surveyId}]]></entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Instructions</h3> -<hr> -<p> - This is the last round of the experiment. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry><entry key="last-round-debriefing"><![CDATA[ <p> diff -r d76727cadd7803db7bb0425d9b96784779d99a15 -r 8832db4b5dd30e04c5f30cf3f612b1facf0c4635 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -179,5 +179,57 @@ <p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]></entry> - +<entry key='facilitator-debriefing'> +<![CDATA[ +<h3>Round {self.roundNumber} results</h3> +<hr> +<table border=1 cellspacing=3 cellpadding=3> +<tr> +<th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Trust game earnings</th><th>Total income</th> +</tr> +{clientDataList: {data | +<tr align="RIGHT"><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> +}} +</table> +]]> +</entry> +<entry key='client-debriefing'> +<![CDATA[ +<h1>{if (self.practiceRound)}Practice Round{else}Round {self.roundNumber}{endif} Results</h1> +<hr> +<ul> +<li>Tokens collected in this round: {clientData.currentTokens}</li> +<li>Income from tokens collected: {clientData.currentIncome}</li> +<li>Quiz earnings: {clientData.quizEarnings}</li> +<li>Show up payment: {showUpPayment}</li> +</ul> +{if (showExitInstructions && !clientData.trustGameLog.empty) } +<h2>Trust Game Earnings</h2> +<hr> +<ul> +{clientData.trustGameLog: {trustGameLog| +<li>Trust Game #{i}: {trustGameLog}</li> +}} +</ul> +Your total trust game earnings: <b>{clientData.trustGameEarnings}</b>. +{endif} +<h2>Total Income</h2> +<hr> +<p> +Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. +</p> +{if (showExitInstructions)} +<h2>Exit Survey</h2> +<hr> +<p> +This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. +</p> +<h2>Payment</h2> +<hr> +<p> +When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +</p> +{endif} +]]> +</entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 23:02:23
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/d76727cadd78/ changeset: d76727cadd78 user: alllee date: 2012-01-20 00:02:25 summary: updating template references to clientsPerGroup and roundNumber to refer to this round configuration instead of an explicitly injected attribute. affected #: 7 files diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -89,7 +89,7 @@ } public String getGeneralInstructions() { - ST st = createStringTemplate(assistant.getStringProperty("general-instructions", "")); + ST st = createStringTemplate(assistant.getStringProperty("general-instructions")); NumberFormat formatter = NumberFormat.getCurrencyInstance(); st.add("showUpPayment", formatter.format(getShowUpPayment())); st.add("dollarsPerToken", formatter.format(getDollarsPerToken())); diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/asu/2011/t1/round1.xml --- a/src/main/resources/configuration/asu/2011/t1/round1.xml +++ b/src/main/resources/configuration/asu/2011/t1/round1.xml @@ -12,7 +12,7 @@ <entry key='max-cell-occupancy'>1</entry><entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -26,9 +26,9 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with four other random players in this room. Each participant in the room has been randomly assigned to one of several equal-sized -{clientsPerGroup} person groups and everyone in your group has been randomly -assigned a number from 1 to {clientsPerGroup}. You will stay in the same group for -the entire experiment, and each person's number from 1 to {clientsPerGroup} will +{self.clientsPerGroup} person groups and everyone in your group has been randomly +assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for +the entire experiment, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/asu/2011/t2/round1.xml --- a/src/main/resources/configuration/asu/2011/t2/round1.xml +++ b/src/main/resources/configuration/asu/2011/t2/round1.xml @@ -13,7 +13,7 @@ <entry key='max-cell-occupancy'>1</entry><entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -27,9 +27,9 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with four other random players in this room. Each participant in the room has been randomly assigned to one of several equal-sized -{clientsPerGroup} person groups and everyone in your group has been randomly -assigned a number from 1 to {clientsPerGroup}. You will stay in the same group for -the entire experiment, and each person's number from 1 to {clientsPerGroup} will +{self.clientsPerGroup} person groups and everyone in your group has been randomly +assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for +the entire experiment, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/asu/2011/t3/round1.xml --- a/src/main/resources/configuration/asu/2011/t3/round1.xml +++ b/src/main/resources/configuration/asu/2011/t3/round1.xml @@ -14,7 +14,7 @@ <entry key='subjects-field-of-vision'>true</entry><entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -28,9 +28,9 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with four other random players in this room. Each participant in the room has been randomly assigned to one of several equal-sized -{clientsPerGroup} person groups and everyone in your group has been randomly -assigned a number from 1 to {clientsPerGroup}. You will stay in the same group for -the entire experiment, and each person's number from 1 to {clientsPerGroup} will +{self.clientsPerGroup} person groups and everyone in your group has been randomly +assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for +the entire experiment, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/asu/2011/t4/round1.xml --- a/src/main/resources/configuration/asu/2011/t4/round1.xml +++ b/src/main/resources/configuration/asu/2011/t4/round1.xml @@ -15,7 +15,7 @@ <entry key='subjects-field-of-vision'>true</entry><entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -29,9 +29,9 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with four other random players in this room. Each participant in the room has been randomly assigned to one of several equal-sized -{clientsPerGroup} person groups and everyone in your group has been randomly -assigned a number from 1 to {clientsPerGroup}. You will stay in the same group for -the entire experiment, and each person's number from 1 to {clientsPerGroup} will +{self.clientsPerGroup} person groups and everyone in your group has been randomly +assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for +the entire experiment, and each person's number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/iu/2011/vote-punish/round1.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round1.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round1.xml @@ -13,7 +13,7 @@ <entry key="instructions"><![CDATA[ -<h3>Instructions for Round {roundNumber}</h3> +<h3>Instructions for Round {self.roundNumber}</h3><hr><p> The first round of the experiment will begin in a moment. The length of the @@ -26,10 +26,10 @@ <p> In this round the renewable resource will become five times bigger. You will share this larger environment with three other random players in this room. In particular, -each of you in this room has been randomly assigned to one of several equal-sized {clientsPerGroup} +each of you in this room has been randomly assigned to one of several equal-sized {self.clientsPerGroup} person groups and everyone in your group has been randomly assigned a number from 1 -to {clientsPerGroup}. You will stay in the same group for the entire experiment, and each person's -number from 1 to {clientsPerGroup} will remain the same throughout the experiment. +to {self.clientsPerGroup}. You will stay in the same group for the entire experiment, and each person's +number from 1 to {self.clientsPerGroup} will remain the same throughout the experiment. The other three people in your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. </p> diff -r b8e59da90fc2c79142c752ca269280bd73ace8f0 -r d76727cadd7803db7bb0425d9b96784779d99a15 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -163,18 +163,18 @@ occurred from the room. </p><p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. + You will see other participants labeled from A to {self.lastChatHandle} in the + chat box. You can send a chat message by typing into the textfield and pressing + the enter key. </p> ]]></entry><entry key="sameRoundAsPreviousInstructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 22:57:08
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b8e59da90fc2/ changeset: b8e59da90fc2 user: alllee date: 2012-01-19 23:57:10 summary: removing defunct iu pretest configuration affected #: 11 files diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round0.xml --- a/src/main/resources/configuration/iu/2011/pretest/round0.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">13</entry> -<entry key="resource-depth">13</entry> -<entry key="practice-round">true</entry> -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key='instructions'> -<![CDATA[ -<h2>Practice Round Instructions</h2> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. The -decisions you make in this round will NOT influence your earnings. At the beginning -of the practice round half of the cells are occupied with green tokens. The -environment is a 13 x 13 grid of cells. -</p> -<p> -During this practice round, and <b>only during</b> this practice round, you are able -to reset the tokens displayed on the screen by pressing the <b>R</b> key. When you -press the <b>R</b> key you will reset the resource to its initial distribution, -randomly filling half of the cells. -</p> -<p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<h2>Quiz</h2> -<hr> -<p> -Before we begin the practice round please answer the following questions. You will earn $0.50 for each correct answer. -</p> -<br><br> -<form> -<span class='q1'>Q1. Which one of the following statements is incorrect?</span><br> -<input type="radio" name="q1" value="A">A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">B. When you have collected all tokens on the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">C. Tokens grow from the middle of the screen.<br> -<input type="radio" name="q1" value="D">D. In order to collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> -<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> -<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<input type="submit" name="submit" value="Submit"><br> -</form> -]]> -</entry> -<entry key='q1-explanation'> - <![CDATA[ - Tokens only regenerate when there are other tokens present in their immediately - neighboring cells. They do not spontaneously generate from the middle of the - screen. - ]]> -</entry> -<entry key='q2-explanation'> - <![CDATA[ - Tokens cannot regenerate on an empty screen as shown in sequence B. - ]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round1.xml --- a/src/main/resources/configuration/iu/2011/pretest/round1.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. As in the practice round you can collect green tokens but now -you will earn <b>two cents</b> for each token collected. You <b>cannot</b> -reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become five times bigger. You will share this -larger environment with four other players in this room that have been randomly -selected. Each group's resource environment is distinct from the other groups. -</p> -<p> -Each of you has been assigned a number from 1 to 5. These numbers will remain the -same throughout the experiment but you will <b>not</b> be able to identify which -person in the room has been assigned which number, so your anonymity is guaranteed. -</p> - -<p> -The other four players will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. On the top left corner of the screen you can see -a clock that displays the remaining time in the round.</p> -<p>Since you can only see the resource within your vision you may neither see all -the other participants nor all the resource units. The figure below indicates the -vision range compared to the whole environment</p> -<img src="@CODEBASE_URL@/images/vision-range.jpg"> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round2.xml --- a/src/main/resources/configuration/iu/2011/pretest/round2.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> - - -<!-- enable field of vision for tokens and subjects --> -<entry key='initial-distribution'>.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round3.xml --- a/src/main/resources/configuration/iu/2011/pretest/round3.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<!-- resource regrowth parameters --> -<entry key="initial-distribution">.25</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<hr> -<p>This round is the same as the previous round.</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round4.xml --- a/src/main/resources/configuration/iu/2011/pretest/round4.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="initial-distribution">.25</entry> -<entry key='voting-enabled'>true</entry> -<entry key='initial-voting-instructions'> - <![CDATA[ -<h1>Notice</h1> -<hr> -<p> -In a moment, you will see a screen on your computer called Rule Options. It -will list 6 different rules that you can consider as options for managing how -each of your groups collect green tokens today. -</p> -<p> -You can nominate one rule from the list to help decide whether or not to have a -rule and what that rule will be. The rule that has the most nominations will be -considered chosen and established as the rule. If there is a tie, then each -tied nominated rule will receive an equal chance of getting selected at random. -</p> - ]]> -</entry> - - -<entry key='voting-instructions'> -<![CDATA[ -<h1>Instructions</h1> -<hr> -<p> -To nominate a rule, click the radio button to the left of the one you choose, and -then click "submit." The computer will tally the nominations and then report -the results on the next screen. The results will be presented to each -participant in your group and the experimenter. -</p> - -<p> -The identity of people who nominated a particular rule will NOT be revealed. -Therefore, neither you nor the experimenter will know who nominated a -particular rule. -</p> - -</p> -]]> -</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> - Round 4 is about to begin. -</p> - -<p> -The length of this round is four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - Before we continue to the next round of the token task, we would like to ask you - some quick questions. At the beginning of the survey you will need to enter: - </p> - <ul> - <li><b>Your survey ID</b>: {surveyId} </li> - </ul> - <p> - Please <a href='{surveyLink}'>click here</a> to begin the survey. - </p> - ]]> -</entry> - -<entry key='survey-link'> - <![CDATA[ - https://qtrial.qualtrics.com/SE/?SID=SV_cLX7jnYikmD9eSM - ]]> -</entry> - - -<entry key='sanction-type'>real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> -<entry key='sanction-instructions'> - <![CDATA[ - <h1>Instructions</h1> - <hr> -<p> -During this upcoming round you will have the option to reduce the earnings of -another participant at a cost to your own earnings. -</p> -<h2>How it works</h2> -<hr> - <ul> - <li>If you press the numeric key 1-5 corresponding to another participant, you - will reduce the number of tokens they have collected in this round by two - tokens. This will also reduce your own token amount by one token. The decision - whether or when to use this option is up to you. - </li> - <li>When you reduce the number of tokens of another participant, they will - receive a message stating that you have reduced their tokens. Likewise, if - another participant reduces your number of tokens, you will also receive a - message. These messages will be displayed on the bottom of your screen. - </li> - <li>If your tokens are being reduced or you are reducing another participant's - tokens, you will receive some visual cues. When your tokens are being reduced - your yellow dot will turn red briefly with a blue background. The participant - currently reducing your tokens will turn purple with a white background. - </li> - <li>You may reduce the earnings of other participants as long as there are - tokens remaining on the screen and while both you and the other participant - have a positive number of tokens collected during the round. <b>Each time</b> - you press the numeric key corresponding to another participant your token - amount is reduced by <b>one</b>, and their token amount is reduced by - <b>two</b>. - </li> - </ul> - ]]> -</entry> - -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round5.xml --- a/src/main/resources/configuration/iu/2011/pretest/round5.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 5 Instructions</h3> -<hr> -<p> -Round 5 is the same as round 4.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key='sanction-type'>real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> -<entry key='sanction-instructions'> - <![CDATA[ - <h1>Instructions</h1> - <hr> -<p> -During this upcoming round you will have the option to reduce the earnings of -another participant at a cost to your own earnings. -</p> -<h2>How it works</h2> -<hr> - <ul> - <li>If you press the numeric key 1-5 corresponding to another participant, you - will reduce the number of tokens they have collected in this round by two - tokens. This will also reduce your own token amount by one token. The decision - whether or when to use this option is up to you. - </li> - <li>When you reduce the number of tokens of another participant, they will - receive a message stating that you have reduced their tokens. Likewise, if - another participant reduces your number of tokens, you will also receive a - message. These messages will be displayed on the bottom of your screen. - </li> - <li>If your tokens are being reduced or you are reducing another participant's - tokens, you will receive some visual cues. When your tokens are being reduced - your yellow dot will turn red briefly with a blue background. The participant - currently reducing your tokens will turn purple with a white background. - </li> - <li>You may reduce the earnings of other participants as long as there are - tokens remaining on the screen and while both you and the other participant - have a positive number of tokens collected during the round. <b>Each time</b> - you press the numeric key corresponding to another participant your token - amount is reduced by <b>one</b>, and their token amount is reduced by - <b>two</b>. - </li> - </ul> - ]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round6.xml --- a/src/main/resources/configuration/iu/2011/pretest/round6.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key='sanction-type'>real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> -<entry key='sanction-instructions'> - <![CDATA[ - <h1>Instructions</h1> - <hr> -<p> -During this upcoming round you will have the option to reduce the earnings of -another participant at a cost to your own earnings. -</p> -<h2>How it works</h2> -<hr> - <ul> - <li>If you press the numeric key 1-5 corresponding to another participant, you - will reduce the number of tokens they have collected in this round by two - tokens. This will also reduce your own token amount by one token. The decision - whether or when to use this option is up to you. - </li> - <li>When you reduce the number of tokens of another participant, they will - receive a message stating that you have reduced their tokens. Likewise, if - another participant reduces your number of tokens, you will also receive a - message. These messages will be displayed on the bottom of your screen. - </li> - <li>If your tokens are being reduced or you are reducing another participant's - tokens, you will receive some visual cues. When your tokens are being reduced - your yellow dot will turn red briefly with a blue background. The participant - currently reducing your tokens will turn purple with a white background. - </li> - <li>You may reduce the earnings of other participants as long as there are - tokens remaining on the screen and while both you and the other participant - have a positive number of tokens collected during the round. <b>Each time</b> - you press the numeric key corresponding to another participant your token - amount is reduced by <b>one</b>, and their token amount is reduced by - <b>two</b>. - </li> - </ul> - ]]> -</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 6 Instructions</h3> -<hr> -<p> -Round 6 is the same as round 5.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round7.xml --- a/src/main/resources/configuration/iu/2011/pretest/round7.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - - -<entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - Before we continue to the next round of the token task, we would like to ask you - some quick questions. At the beginning of the survey you will need to enter: - </p> - <ul> - <li>Your participant ID: {participantId} </li> - <li>Your survey ID: {surveyId} </li> - </ul> - <p> - Please <a href='{surveyLink}'>click here</a> to begin the survey. - </p> - ]]> -</entry> - -<entry key='survey-link'> - <![CDATA[ - https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8 - ]]> -</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Instructions</h3> -<hr> -<p> -From this point forward, participants will NOT have the option to reduce the earnings of another participant. The length of this round is four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round8.xml --- a/src/main/resources/configuration/iu/2011/pretest/round8.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Instructions</h3> -<hr> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/round9.xml --- a/src/main/resources/configuration/iu/2011/pretest/round9.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="resource-depth">26</entry> -<entry key="resource-width">26</entry> -<entry key="duration">240</entry> - -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - - -<entry key='external-survey-enabled'>true</entry> -<entry key='survey-instructions'> - <![CDATA[ - <h1>Survey</h1> - <hr> - <p> - Before we continue to the next round of the token task, we would like to ask you - some quick questions. At the beginning of the survey you will need to enter: - </p> - <ul> - <li>Your participant ID: {participantId} </li> - <li>Your survey ID: {surveyId} </li> - </ul> - <p> - Please <a href='{surveyLink}'>click here</a> to begin the survey. - </p> - ]]> -</entry> - -<entry key='survey-link'> - <![CDATA[ - https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm - ]]> -</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Instructions</h3> -<hr> -<p> - This is the last round of the experiment. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -<entry key="last-round-debriefing"> - <![CDATA[ - <p> - This was the last round, but not the end of the experiment. We will now - determine your payments. While we are doing this, we request that you - carefully fill out a brief survey. - </p> - <p> - When we are ready we will call you one by one to the room next door. We - will - pay you there in private. Please wait until your computer number is called, - and then proceed to the room next door to turn in your computer number and - your survey. - </p> - <p> - Please answer the survey carefully and thank you for participating. - </p> - ]]> -</entry> - - -</properties> diff -r 45b399ce665697c55eff0bb9d26cbd15cb734b53 -r b8e59da90fc2c79142c752ca269280bd73ace8f0 src/main/resources/configuration/iu/2011/pretest/server.xml --- a/src/main/resources/configuration/iu/2011/pretest/server.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging experiment server configuration</comment> -<entry key="hostname">@SERVER_ADDRESS@</entry> -<entry key="port">@PORT_NUMBER@</entry> -<entry key="round0">round0.xml</entry> -<entry key="round1">round1.xml</entry> -<entry key="round2">round2.xml</entry> -<entry key="round3">round3.xml</entry> -<entry key="round4">round4.xml</entry> -<entry key="round5">round5.xml</entry> -<entry key="round6">round6.xml</entry> -<entry key="round7">round7.xml</entry> -<entry key="round8">round8.xml</entry> -<entry key="round9">round9.xml</entry> -<entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">10</entry> -<entry key='external-survey-enabled'>true</entry> -<entry key='survey-id-enabled'>true</entry> -<entry key="facilitator-instructions"> -<![CDATA[ -<p> - This facilitator interface allows you to control the experiment. In general you - will be following a sequence similar to this: - <ol> - <li>Show instructions</li> - <li>Start round</li> - <li>After round is over - <ol> - <li>show trust game if necessary</li> - <li>start standalone chat round if necessary</li> - </ol> - </li> - <li>Goto 1.</li> - </ol> -</p> -]]> -</entry> - -<entry key='field-of-vision-instructions'> -<![CDATA[ -Your vision is limited in this experiment. The area that is visible to you will be -shaded. -]]> -</entry> - -<entry key="welcome-instructions"> -<![CDATA[ -<h1>Welcome</h1> -<hr> -<p> -Welcome to the experiment. The experiment will begin shortly after everyone has been -assigned a station. -<br><br> -Please <b>wait quietly</b> and <b>do not close this window, open any other applications, or communicate with any of the other participants</b>. -</p> -]]> -</entry> - -<entry key="general-instructions"> -<![CDATA[ -<h1>General Instructions</h1> -<p> - <b>Welcome</b>. You have already earned 5 dollars just for showing up at this experiment. -</p> -<p> -You can earn more, up to a maximum of about 40 dollars, by participating in this -experiment which will take about an hour to an hour and a half. The amount of money -you earn depends on your decisions as well as the decisions of other people in this room -over the course of the experiment. -</p> -<h2>How to participate</h2> -<hr> -<p> -You will appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img>. -You can move by pressing the four arrow keys on your keyboard. -</p> -<p> - You can move up, down, left, or right. You have to press a key for each and - every move of your yellow dot. As you move around you can collect green diamond - shaped tokens <img src="@CODEBASE_URL@/images/gem-token.gif"></img> and earn two - cents for each collected token. To collect a token, move your yellow dot over a - green token and <b>press the space bar</b>. Simply moving your avatar over a - token does NOT collect that token. -</p> - -<h2>Tokens</h2> -<hr> -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can re-appear on that empty cell. The rate at -which new tokens appear is dependent on the number of adjacent cells with tokens. -The more tokens in the eight cells that surround an empty cell, the faster a new -token will appear on that empty cell. In other words, <b>existing tokens can -generate new tokens</b>. To illustrate this, please refer to Image 1 and Image 2. -The middle cell in Image 1 denoted with an X has a greater chance of regeneration -than the middle cell in Image 2. When all neighboring cells are empty, there is -<b>no chance for regeneration</b>. -</p> -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> - <img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"></img> -</td> -<td align="center"> - <img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"></img> -</td> -</tr> -</table> - -<h2>Best Strategy</h2> -<hr> -<p> -The chance that a token will regenerate on an empty cell increases as there are -more tokens surrounding it. Therefore, you want to have as many tokens around an -empty cell as possible. However, you also need empty cells to benefit from this -regrowth. The best arrangement of tokens that maximizes overall regrowth is the -checkerboard diagram shown below. -<br> -<img src="@CODEBASE_URL@/images/foraging-checkerboard.png" alt="Checkerboard Resource"></img> -</p> -]]> -</entry> - -<entry key='trust-game-instructions'> -<![CDATA[ -<h1>Instructions</h1> -<hr> -<p> - You will now participate in an exercise where you will be matched with a random - person in your group. In this exercise there are two roles, Player 1 and Player 2. - Your job is to design strategies for both Player 1 and Player 2 roles. When you - are randomly paired with another member of your group you may be selected as - Player 1 <b>or</b> Player 2. The results of randomly pairing your strategies - with the other group member's strategies will be shown to you at the <b>end of - the experiment</b>. -</p> - -<h2>How to participate</h2> -<hr> -<ol> - <li>Player 1 will first receive an endowment of one dollar and has to decide <b>how much to keep</b>. The remaining amount is <b>sent to Player 2</b>. - <li>The amount Player 1 sends to Player 2 is tripled by the system and then - given to Player 2. Player 2 must then decide <b>how much to keep</b> and <b>how much to send back to Player 1</b>. -</ol> -<p> -For example, if Player 1 sends 0 cents to Player 2, Player 1 earns 1 dollar and -Player 2 earns 0 cents. However, if Player 1 sends 1 dollar to Player 2, 3 dollars -would be sent to Player 2. Player 2 then decides to return $1.75 back to Player 1. -In this case, Player 1 earns $1.75, and Player 2 earns $1.25. -</p> -<p> -Please fill in the following form to design your strategies as Player 1 or Player 2. -<br> -<b>If you have any questions, please raise your hand. Are there any questions?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may discuss any aspect of the experiment with the other participants in your group with two exceptions: -<ol> - <li>You <b>may not promise side-payments after the experiment is completed or threaten anyone with any consequence after the experiment is finished</b>.</li> - <li>You <b>may not reveal your actual identity</b></li> -</ol> -We are monitoring the chat traffic while you chat. If we detect any violation of the -rules we will have to stop the the experiment and remove the group where the offense -occurred from the room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> - -</properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 22:55:47
|
7 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/063ac976a32d/ changeset: 063ac976a32d user: alllee date: 2012-01-19 23:49:53 summary: adding the Point positions of where the client collected a token back to the ClientPositionUpdateEvent and ClientData object; token collected animation is now working again. affected #: 5 files diff -r 14f534bc057d65ba5827240335771a529746812b -r 063ac976a32debfdda2f4a971a72c54a4361794c src/main/java/edu/asu/commons/foraging/event/ClientPositionUpdateEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/ClientPositionUpdateEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/ClientPositionUpdateEvent.java @@ -26,6 +26,7 @@ private static final long serialVersionUID = -128693557750400520L; + private final Point[] collectedTokenPositions; private final Resource[] addedResources; private final Resource[] removedResources; // FIXME: merge these two using a Pair @@ -40,16 +41,15 @@ Resource[] addedResources, Resource[] removedResources, Map<Identifier, Integer> clientTokens, Map<Identifier, Point> clientPositions, -// List<Point> collectedTokens, long timeLeft) { super(data.getId()); this.addedResources = addedResources; this.removedResources = removedResources; this.clientTokens = clientTokens; this.clientPositions = clientPositions; -// this.collectedTokens = collectedTokens; this.timeLeft = timeLeft; this.latestSanctions = data.getLatestSanctions(); + this.collectedTokenPositions = data.getCollectedTokenPositions().toArray(new Point[0]); } public int getCurrentTokens() { @@ -91,4 +91,8 @@ public Map<Identifier, Integer> getClientTokens() { return clientTokens; } + + public Point[] getCollectedTokenPositions() { + return collectedTokenPositions; + } } diff -r 14f534bc057d65ba5827240335771a529746812b -r 063ac976a32debfdda2f4a971a72c54a4361794c src/main/java/edu/asu/commons/foraging/model/ClientData.java --- a/src/main/java/edu/asu/commons/foraging/model/ClientData.java +++ b/src/main/java/edu/asu/commons/foraging/model/ClientData.java @@ -69,6 +69,7 @@ private ForagingRule votedRule; private ArrayList<String> trustGameLog = new ArrayList<String>(); + private ArrayList<Point> collectedTokenPositions = new ArrayList<Point>(); // String fields to be set and formatted for use in templates. private String grandTotalIncome; @@ -181,8 +182,21 @@ } } - public void addToken() { + public void addToken(Point position) { addTokens(1); + synchronized (collectedTokenPositions) { + collectedTokenPositions.add(position); + } + } + + public void clearCollectedTokens() { + synchronized (collectedTokenPositions) { + collectedTokenPositions.clear(); + } + } + + public List<Point> getCollectedTokenPositions() { + return collectedTokenPositions; } public int applyMonitorTax() { diff -r 14f534bc057d65ba5827240335771a529746812b -r 063ac976a32debfdda2f4a971a72c54a4361794c src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java @@ -497,7 +497,7 @@ if (resourceDistribution.containsKey(position)) { getRemovedResources().add( resourceDistribution.remove(position) ); tokensCollectedDuringInterval++; - clientData.addToken(); + clientData.addToken(position); serverDataModel.getEventChannel().handle(new TokenCollectedEvent(clientData.getId(), position)); } } diff -r 14f534bc057d65ba5827240335771a529746812b -r 063ac976a32debfdda2f4a971a72c54a4361794c src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java @@ -22,6 +22,7 @@ import edu.asu.commons.event.EventChannel; import edu.asu.commons.event.EventTypeChannel; import edu.asu.commons.event.PersistableEvent; +import edu.asu.commons.foraging.conf.RoundConfiguration; import edu.asu.commons.foraging.event.AddClientEvent; import edu.asu.commons.foraging.event.ExplicitCollectionModeRequest; import edu.asu.commons.foraging.event.HarvestFruitRequest; @@ -62,7 +63,7 @@ private transient boolean dirty = false; - private final static String[] CHAT_HANDLES = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S" }; + // Maps client Identifiers to the GroupDataModel that the client belongs to @@ -164,7 +165,7 @@ public synchronized void addClientToGroup(ClientData clientData, GroupDataModel group) { group.addClient(clientData); clientsToGroups.put(clientData.getId(), group); - clientData.getId().setChatHandle(CHAT_HANDLES[group.size() - 1]); + clientData.getId().setChatHandle(RoundConfiguration.CHAT_HANDLES[group.size() - 1]); channel.handle(new AddClientEvent(clientData, group, clientData.getPosition())); } @@ -280,7 +281,7 @@ public GroupDataModel getGroup(Identifier id) { GroupDataModel group = clientsToGroups.get(id); if (group == null) { - throw new IllegalArgumentException("No group available for id:" + id); + logger.warning("No group available for id:" + id); } return group; } diff -r 14f534bc057d65ba5827240335771a529746812b -r 063ac976a32debfdda2f4a971a72c54a4361794c src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -102,7 +102,7 @@ private final Map<Identifier, ClientData> clients = new HashMap<Identifier, ClientData>(); public final static int SYNCHRONIZATION_FREQUENCY = 60; - public final static int SERVER_SLEEP_INTERVAL = 100; + public final static int SERVER_SLEEP_INTERVAL = 150; private Identifier facilitatorId; @@ -932,6 +932,7 @@ else { transmit(new ClientPositionUpdateEvent(data, addedResources, removedResources, clientTokens, clientPositions, currentRoundDuration.getTimeLeft())); + data.clearCollectedTokens(); } } } https://bitbucket.org/virtualcommons/foraging/changeset/d5fbb60b6f39/ changeset: d5fbb60b6f39 user: alllee date: 2012-01-19 23:50:25 summary: replacing IllegalArgumentException with just returning false no-op to be a little more forgiving on the client side during an experiment affected #: 1 file diff -r 063ac976a32debfdda2f4a971a72c54a4361794c -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af src/main/java/edu/asu/commons/foraging/ui/Circle.java --- a/src/main/java/edu/asu/commons/foraging/ui/Circle.java +++ b/src/main/java/edu/asu/commons/foraging/ui/Circle.java @@ -26,7 +26,7 @@ public boolean contains(Point point) { if (point == null) { - throw new IllegalArgumentException("Null point passed to Circle.contains()"); + return false; } return center.distance(point) <= radius; } https://bitbucket.org/virtualcommons/foraging/changeset/bc8abb843266/ changeset: bc8abb843266 user: alllee date: 2012-01-19 23:52:02 summary: refactored the way the field of vision is being rendered and clarified some of the logic within SubjectView/GridView (some of it fairly ancient). affected #: 5 files diff -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af -r bc8abb843266807220c76d7dba9a5a47f4e72e87 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -207,6 +207,7 @@ public void handle(ClientPositionUpdateEvent event) { if (isRoundInProgress()) { dataModel.update(event); + getGameWindow2D().collectTokens(event.getCollectedTokenPositions()); getGameWindow().update(event.getTimeLeft()); } } @@ -365,7 +366,7 @@ // moveClient(request); transmit(request); } - Utils.sleep(50); + Utils.sleep(100); Thread.yield(); } } diff -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af -r bc8abb843266807220c76d7dba9a5a47f4e72e87 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -41,22 +41,17 @@ */ public class RoundConfiguration extends ExperimentRoundParameters.Base<ServerConfiguration> { + private static final long serialVersionUID = 8575239803733029326L; + + public final static String[] CHAT_HANDLES = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S" }; + public final static double DEFAULT_REGROWTH_RATE = 0.01; + public final static int DEFAULT_ROUND_TIME = 5 * 60; + private static final double DEFAULT_PATCHY_BOTTOM_INITIAL_DISTRIBUTION = 0.25; - private static final double DEFAULT_PATCHY_TOP_INITIAL_DISTRIBUTION = 0.50; - private static final double DEFAULT_TOP_REGROWTH_RATE = 0.02; - - private final static long serialVersionUID = 8575239803733029326L; - - public final static double DEFAULT_REGROWTH_RATE = 0.01; - - public final static int DEFAULT_ROUND_TIME = 5 * 60; - private static final int DEFAULT_SANCTION_FLASH_DURATION = 3; - private static final double DEFAULT_TOKEN_MOVEMENT_PROBABILITY = 0.2d; - private static final double DEFAULT_TOKEN_BIRTH_PROBABILITY = 0.01d; private List<ForagingRule> selectedRules; @@ -300,20 +295,11 @@ */ public String getInstructions() { ST template = createStringTemplate(getProperty("instructions", getParentConfiguration().getSameRoundAsPreviousInstructions())); - // FIXME: this isn't ideal, figure out how to get any bean properties transparently accessible within a templatized instruction - // could do it via 1. reflection 2. annotations 3. ??? - template.add("resourceWidth", getResourceWidth()); - template.add("resourceDepth", getResourceDepth()); + // FIXME: probably should just lift these out into methods on RoundConfiguration + // and refer to them as self.durationInMinutes or self.dollarsPerTokenCurrencyString, etc. template.add("duration", inMinutes(getDuration()) + " minutes"); - template.add("roundNumber", getRoundNumber()); - template.add("clientsPerGroup", getClientsPerGroup()); - template.add("dollarsPerToken", NumberFormat.getCurrencyInstance().format(getDollarsPerToken())); + template.add("dollarsPerToken", toCurrencyString(getDollarsPerToken())); template.add("initialDistribution", NumberFormat.getPercentInstance().format(getInitialDistribution())); - template.add("sanctionCost", getSanctionCost()); - template.add("sanctionPenalty", getSanctionPenalty()); - if (selectedRules != null && ! selectedRules.isEmpty()) { - template.add("selectedRule", selectedRules.get(0)); - } return template.render(); } @@ -326,10 +312,7 @@ } public String getChatInstructions() { - ST st = createStringTemplate(getProperty("chat-instructions")); - st.add("chatDuration", inMinutes(getChatDuration()) + " minutes"); - st.add("clientsPerGroup", getClientsPerGroup()); - return st.render(); + return createStringTemplate(getProperty("chat-instructions")).render(); } public long inMinutes(Duration duration) { @@ -358,11 +341,11 @@ public String getQuizInstructions() { // FIXME: cache? ST template = createStringTemplate(getProperty("quiz-instructions")); - template.add("quizCorrectAnswerReward", asCurrency(getQuizCorrectAnswerReward())); + template.add("quizCorrectAnswerReward", toCurrencyString(getQuizCorrectAnswerReward())); return template.render(); } - public String asCurrency(double amount) { + public String toCurrencyString(double amount) { return NumberFormat.getCurrencyInstance().format(amount); } @@ -773,12 +756,16 @@ template.add("allCorrect", incorrectQuestionNumbers.isEmpty()); template.add("numberCorrect", numberCorrect); template.add("totalQuestions", totalQuestions); - template.add("totalQuizEarnings", NumberFormat.getCurrencyInstance().format(getQuizCorrectAnswerReward() * numberCorrect)); + template.add("totalQuizEarnings", toCurrencyString(getQuizCorrectAnswerReward() * numberCorrect)); for (String incorrectQuestionNumber : incorrectQuestionNumbers) { template.add("incorrect_" + incorrectQuestionNumber, String.format("Your answer, %s, was incorrect.", actualAnswers.get(incorrectQuestionNumber))); } return template.render(); } + + public List<ForagingRule> getSelectedRules() { + return selectedRules; + } public void setSelectedRules(List<ForagingRule> selectedRules) { this.selectedRules = selectedRules; @@ -830,4 +817,16 @@ public boolean shouldWaitForFacilitatorSignal() { return isPostRoundSanctioningEnabled() || (isTrustGameEnabled() && isLastRound()); } + + public String getLastChatHandle() { + return CHAT_HANDLES[getClientsPerGroup() - 1]; + } + + public String getChatDurationInMinutes() { + return inMinutes(getChatDuration()) + " minutes"; + } + + public String getDurationInMinutes() { + return inMinutes(getDuration()) + " minutes"; + } } diff -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af -r bc8abb843266807220c76d7dba9a5a47f4e72e87 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -241,8 +241,8 @@ * * @param position */ - public void collectToken(Point position) { - subjectView.collectToken(position); + public void collectTokens(Point ... positions) { + subjectView.collectTokens(positions); } private void startChatTimer() { diff -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af -r bc8abb843266807220c76d7dba9a5a47f4e72e87 src/main/java/edu/asu/commons/foraging/ui/GridView.java --- a/src/main/java/edu/asu/commons/foraging/ui/GridView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GridView.java @@ -7,6 +7,7 @@ import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; +import java.awt.RenderingHints; import java.awt.image.ImageObserver; import java.io.IOException; import java.util.Collection; @@ -34,8 +35,8 @@ */ protected Image tokenImage, otherSubjectImage, selfImage, selfExplicitCollectionModeImage, beingSanctionedImage, sanctioningImage, monitorImage; - protected Image scaledTokenImage, scaledOtherSubjectImage, scaledSelfImage, - scaledSelfExplicitCollectionModeImage, scaledBeingSanctionedImage, scaledSanctioningImage, scaledMonitorImage; + protected Image scaledTokenImage, scaledOtherSubjectImage, scaledSelfImage, + scaledSelfExplicitCollectionModeImage, scaledBeingSanctionedImage, scaledSanctioningImage, scaledMonitorImage; /** * Represents the width and height of a grid cell, respectively. @@ -52,8 +53,11 @@ // how big the entire screen is. protected Dimension screenSize; + + protected int actualWidth; + protected int actualHeight; - // the size of the actual resource board. + // the conceptual size of the resource grid (e.g., 13 x 13) protected Dimension boardSize; public GridView(Dimension screenSize) { @@ -72,9 +76,12 @@ // stretch board to the max dw = (availableWidth / boardSize.getWidth()); dh = (availableHeight / boardSize.getHeight()); - // ensure square proportions + // FIXME: this forces square proportions on all views. dw = dh = Math.min(dw, dh); + + actualWidth = actualHeight = (int) Math.min(availableWidth, availableHeight); + // centered on the screen so we divide by 2 to take into account both sides of the screen. xoffset = (int) Math.floor((availableWidth - (dw * boardSize.getWidth())) / 2); yoffset = (int) Math.floor((availableHeight - (dh * boardSize.getHeight())) / 2); @@ -84,8 +91,8 @@ setPreferredSize(screenSize); //FIXME: reduce code duplication // get scaled instances of the originals - int cellWidth = getCellWidth(); - int cellHeight = getCellHeight(); + int cellWidth = (int) dw; + int cellHeight = (int) dh; scaledTokenImage = tokenImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); scaledOtherSubjectImage = otherSubjectImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); scaledSelfImage = selfImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); @@ -93,6 +100,10 @@ scaledBeingSanctionedImage = beingSanctionedImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); scaledSanctioningImage = sanctioningImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); scaledMonitorImage = monitorImage.getScaledInstance(cellWidth, cellHeight, IMAGE_SCALING_STRATEGY); + System.err.println("cell width: " + dw); + System.err.println("cell height: " + dh); + System.err.println("x offset: " + xoffset); + System.err.println("y offset: " + yoffset); } /** @@ -160,7 +171,7 @@ protected void paintComponent(Graphics graphics) { Graphics2D graphics2D = (Graphics2D) graphics; -// graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // FIXME: can be made more efficient. // Could just update the parts that have changed (tokens removed, subjects moved) // paint the background @@ -228,14 +239,12 @@ protected abstract void paintSubjects(Graphics2D graphics2D); /** - * Called only when running, this method should be overidden for a custom + * Invoked via paintComponent, this method should be overidden for a custom * background. */ protected void paintBackground(Graphics2D graphics2D) { graphics2D.setColor(Color.BLACK); - graphics2D.fillRect(xoffset, yoffset, - (int) (boardSize.getWidth() * dw), - (int) (boardSize.getHeight() * dh)); + graphics2D.fillRect(xoffset, yoffset, actualWidth, actualHeight); } } diff -r d5fbb60b6f39fce93b418aaefc2ea037b87ce3af -r bc8abb843266807220c76d7dba9a5a47f4e72e87 src/main/java/edu/asu/commons/foraging/ui/SubjectView.java --- a/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java @@ -36,6 +36,8 @@ */ public class SubjectView extends GridView { + private static final long COLLECTED_TOKEN_ANIMATION_DURATION = 2000L; + private static final long serialVersionUID = 8215577330876498459L; private final ClientDataModel dataModel; @@ -57,9 +59,7 @@ private Circle viewSubjectsField; - private double fieldOfVisionYOffset; - - private double fieldOfVisionXOffset; + private double fieldOfVisionOffset; public SubjectView(Dimension screenSize, ClientDataModel dataModel) { super(screenSize); @@ -85,17 +85,20 @@ if (subjectFieldOfVision) { viewSubjectsRadius = configuration.getViewSubjectsRadius(); viewSubjectsField = new Circle(dataModel.getCurrentPosition(), viewSubjectsRadius); - // FIXME: get rid of these magic numbers and figure out how to adjust it properly. - fieldOfVisionXOffset = (dw / 3.0d); - fieldOfVisionYOffset = (dh / 3.0d); } } super.setup(configuration); + if (tokenFieldOfVision || subjectFieldOfVision) { + fieldOfVisionOffset = (dw / 2.0d); + System.err.println("field of vision offset: " + fieldOfVisionOffset); + } } - public void collectToken(Point p) { + public void collectTokens(Point ... positions) { synchronized (collectedTokens) { - collectedTokens.put(p, Duration.create(3000L)); + for (Point position: positions) { + collectedTokens.put(position, Duration.create(COLLECTED_TOKEN_ANIMATION_DURATION)); + } } } @@ -157,20 +160,16 @@ int radius = viewSubjectsRadius; viewSubjectsField.setCenter(currentPosition); Point topLeftCorner = new Point(currentPosition.x - radius, currentPosition.y - radius); - // for some reason - double x = scaleXDouble(topLeftCorner.x) + fieldOfVisionXOffset; - double y = scaleYDouble(topLeftCorner.y) + fieldOfVisionYOffset; - double diameter = radius * 2.0d; - diameter = Math.min(scaleXDouble(diameter), scaleYDouble(diameter)) + (dw * 0.85); + double x = scaleXDouble(topLeftCorner.x) + fieldOfVisionOffset; + double y = scaleYDouble(topLeftCorner.y) + fieldOfVisionOffset; + double diameter = (dw * radius * 2.0d) + fieldOfVisionOffset; Ellipse2D.Double circle = new Ellipse2D.Double(x, y, diameter, diameter); // clip the rendered part of the Field of vision circle that crosses the playing boundary graphics2D.setClip(circle); - // this is actually a bit too tall, fine-tune & investigate later Rectangle bounds = new Rectangle(getPreferredSize()); graphics2D.clip(bounds); Paint originalPaint = graphics2D.getPaint(); graphics2D.setPaint(FIELD_OF_VISION_COLOR); -// graphics2D.fillOval((int) x, (int) y, (int) diameter, (int) diameter); graphics2D.fill(circle); graphics2D.setPaint(originalPaint); } https://bitbucket.org/virtualcommons/foraging/changeset/ce3694b36bdb/ changeset: ce3694b36bdb user: alllee date: 2012-01-19 23:52:41 summary: removing old configuration files for the 2011 ASU pretest that are now wildly out of date affected #: 16 files diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round0.xml --- a/src/main/resources/configuration/asu/2011/pretest/round0.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">13</entry> -<entry key="resource-depth">13</entry> -<entry key="practice-round">true</entry> -<entry key="private-property">true</entry> -<entry key="duration">240</entry> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key='instructions'> -<![CDATA[ -<h2>Practice Round Instructions</h2> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. The -decisions you make in this round will NOT influence your earnings. At the beginning -of the practice round a quarter of the cells are occupied with green tokens. The -environment is a {resourceWidth} x {resourceDepth} grid of cells. -</p> -<p> -During this practice round, and <b>only during</b> this practice round, you are able -to reset the tokens displayed on the screen by pressing the <b>R</b> key. When you -press the <b>R</b> key you will reset the resource to its initial distribution, -randomly filling a quarter of the cells. -</p> -<p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<h2>Quiz</h2> -<hr> -<p> - In a moment, you will do a practice round of the token task. Before we go to - the practice round, answer the following questions to make sure you understand - the instructions. You will earn {quizCorrectAnswerReward} for each correct answer. -</p> -<br><br> -<form> -<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> -<input type="radio" name="q1" value="A">A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">B. When you have collected all tokens on the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">C. Tokens grow from the middle of the screen.<br> -<input type="radio" name="q1" value="D">D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> -<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> -<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<input type="submit" name="submit" value="Submit"><br> -</form> -]]> -</entry> -<entry key='quiz-results'> - <![CDATA[ - <h2>Quiz Results</h2> - <hr> - <p> - {if (allCorrect)} - You have answered all the questions correctly. For more details, see below. - {else} - At least one of your answers was incorrect. Questions you've answered - incorrectly are highlighted in red. Please see below for more details. - {endif} - </p> - <br><hr> -<form> -<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> - <b>{incorrect_q1} - In this question, "A", "B", and "D" are all true. "C" is false. Tokens only - regenerate when there are other tokens present in their immediately neighboring - cells. They do not spontaneously generate from the middle of the screen. - </b> -<br> -A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> -B. When you have collected all tokens on the screen, no new tokens will appear.<br> -C. Tokens grow from the middle of the screen.<br> -D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> -<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> - <b> - {incorrect_q2} - In this question, sequence "B" is not possible. Tokens cannot regenerate on an empty screen as shown in sequence B. - </b> - <br> -<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> -</form> - ]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round1.xml --- a/src/main/resources/configuration/asu/2011/pretest/round1.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<entry key='trust-game'>true</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. As in the practice round you can collect green tokens but now -you will earn <b>two cents</b> for each token collected. You <b>cannot</b> -reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become five times bigger. You will share this -larger environment with four other players in this room that have been randomly -selected. Each group's resource environment is distinct from the other groups. -</p> -<p> -Each of you has been assigned a number from 1 to 5. These numbers will remain the -same throughout the experiment but you will <b>not</b> be able to identify which -person in the room has been assigned which number, so your anonymity is guaranteed. -</p> - -<p> -The other four players will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. On the top left corner of the screen you can see -a clock that displays the remaining time in the round.</p> -<p>Since you can only see the resource within your vision you may neither see all -the other participants nor all the resource units. The figure below indicates the -vision range compared to the whole environment</p> -<img src="@CODEBASE_URL@/images/vision-range.jpg"> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -window. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round2.xml --- a/src/main/resources/configuration/asu/2011/pretest/round2.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - - -<!-- enable field of vision for tokens and subjects --> -<entry key='initial-distribution'>.25</entry> - -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round3.xml --- a/src/main/resources/configuration/asu/2011/pretest/round3.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<!-- enable field of vision for tokens and subjects --> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<!-- resource regrowth parameters --> -<entry key="initial-distribution">.25</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<hr> -<p> -Round 3 is the same as round 2. Except now the resources move. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round4.xml --- a/src/main/resources/configuration/asu/2011/pretest/round4.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<!-- have a trust game before this round begins --> -<entry key='trust-game'>true</entry> -<!-- enable field of vision for tokens and subjects --> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key='in-round-chat-enabled'>true</entry> -<entry key="initial-distribution">.25</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> - Round 4 is the same as the previous rounds with one exception. You will be able - to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type your message, and then hit the - enter key again. You must hit the enter key before every message you type, - otherwise control will return to the game screen where you can use the arrow - keys to move around. -</p> - -<p> -The length of this round is four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round5.xml --- a/src/main/resources/configuration/asu/2011/pretest/round5.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<!-- enable field of vision for tokens and subjects --> -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key="initial-distribution">.25</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> -<entry key="in-round-chat-enabled">true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 5 Instructions</h3> -<hr> -<p> -Round 5 is the same as round 4.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/round6.xml --- a/src/main/resources/configuration/asu/2011/pretest/round6.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key="initial-distribution">.25</entry> -<!-- in round chat enabled --> -<entry key="in-round-chat-enabled">true</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> -<entry key='trust-game'>true</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Round 6 Instructions</h3> -<hr> -<p> -Round 6 is the same as round 5.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry> -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> - -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/pretest/server.xml --- a/src/main/resources/configuration/asu/2011/pretest/server.xml +++ /dev/null @@ -1,181 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="hostname">@SERVER_ADDRESS@</entry> -<entry key="port">@PORT_NUMBER@</entry> -<entry key="round0">round0.xml</entry> -<entry key="round1">round1.xml</entry> -<entry key="round2">round2.xml</entry> -<entry key="round3">round3.xml</entry> -<entry key="round4">round4.xml</entry> -<entry key="round5">round5.xml</entry> -<entry key="round6">round6.xml</entry> -<entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">7</entry> -<entry key="facilitator-instructions"> -<![CDATA[ -<p> - This facilitator interface allows you to control the experiment. In general you - will be following a sequence similar to this: - <ol> - <li>Show instructions</li> - <li>Start round</li> - <li>After round is over - <ol> - <li>show trust game if necessary</li> - <li>start standalone chat round if necessary</li> - </ol> - </li> - <li>Goto 1.</li> - </ol> -</p> -]]> -</entry> - -<entry key='field-of-vision-instructions'> -<![CDATA[ -Your vision is limited in this experiment. The area that is visible to you will be -shaded. -]]> -</entry> - -<entry key="welcome-instructions"> -<![CDATA[ -<h1>Welcome</h1> -<hr> -<p> -Welcome to the experiment. The experiment will begin shortly after everyone has been -assigned a station. -<br><br> -Please <b>wait quietly</b> and <b>do not close this window, open any other applications, or communicate with any of the other participants</b>. -</p> -]]> -</entry> - -<entry key="general-instructions"> -<![CDATA[ -<h1>General Instructions</h1> -<p> - <b>Welcome</b>. You have already earned 5 dollars just for showing up at this experiment. -</p> -<p> -You can earn more, up to a maximum of about 40 dollars, by participating in this -experiment which will take about an hour to an hour and a half. The amount of money -you earn depends on your decisions AND the decisions of other people in this room -over the course of the experiment. -</p> -<h2>How to participate</h2> -<hr> -<p> -You will appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img>. -You can move by pressing the four arrow keys on your keyboard. -</p> -<p> - You can move up, down, left, or right. You have to press a key for each and - every move of your yellow dot. As you move around you can collect green diamond - shaped tokens <img src="@CODEBASE_URL@/images/gem-token.gif"></img> and earn two - cents for each collected token. To collect a token, move your yellow dot over a - green token and <b>press the space bar</b>. Simply moving your avatar over a - token does NOT collect that token. -</p> - -<h2>Tokens</h2> -<hr> -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can re-appear on that empty cell. The rate at -which new tokens appear is dependent on the number of adjacent cells with tokens. -The more tokens in the eight cells that surround an empty cell, the faster a new -token will appear on that empty cell. In other words, <b>existing tokens can -generate new tokens</b>. To illustrate this, please refer to Image 1 and Image 2. -The middle cell in Image 1 denoted with an X has a greater chance of regeneration -than the middle cell in Image 2. When all neighboring cells are empty, there is -<b>no chance for regeneration</b>. -</p> -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> - <img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"></img> -</td> -<td align="center"> - <img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"></img> -</td> -</tr> -</table> - -<h2>Best Strategy</h2> -<hr> -<p> -The chance that a token will regenerate on an empty cell increases as there are -more tokens surrounding it. Therefore, you want to have as many tokens around an -empty cell as possible. However, you also need empty cells to benefit from this -regrowth. The best arrangement of tokens that maximizes overall regrowth is the -checkerboard diagram shown below. -<br> -<img src="@CODEBASE_URL@/images/foraging-checkerboard.png" alt="Checkerboard Resource"></img> -</p> -]]> -</entry> - -<entry key='trust-game-instructions'> -<![CDATA[ -<h1>Instructions</h1> -<hr> -<p> - You will now participate in an exercise where you will be matched with a random - person in your group. In this exercise there are two roles, Player 1 and Player 2. - Your job is to design strategies for both Player 1 and Player 2 roles. When you - are randomly paired with another member of your group you may be selected as - Player 1 <b>or</b> Player 2. The results of randomly pairing your strategies - with the other group member's strategies will be shown to you at the <b>end of - the experiment</b>. -</p> - -<h2>How to participate</h2> -<hr> -<ol> - <li>Player 1 will first receive an endowment of one dollar and has to decide <b>how much to keep</b>. The remaining amount is <b>sent to Player 2</b>. - <li>The amount Player 1 sends to Player 2 is tripled by the system and then - given to Player 2. Player 2 must then decide <b>how much to keep</b> and <b>how much to send back to Player 1</b>. -</ol> -<p> -For example, if Player 1 sends 0 cents to Player 2, Player 1 earns 1 dollar and -Player 2 earns 0 cents. However, if Player 1 sends 1 dollar to Player 2, 3 dollars -would be sent to Player 2. Player 2 then decides to return $1.75 back to Player 1. -In this case, Player 1 earns $1.75, and Player 2 earns $1.25. -</p> -<p> -Please fill in the following form to design your strategies as Player 1 or Player 2. -<br> -<b>If you have any questions, please raise your hand. Are there any questions?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may discuss any aspect of the experiment with the other participants in your group with two exceptions: -<ol> - <li>You <b>may not promise side-payments after the experiment is completed or threaten anyone with any consequence after the experiment is finished</b>.</li> - <li>You <b>may not reveal your actual identity</b></li> -</ol> -We are monitoring the chat traffic while you chat. If we detect any violation of the -rules we will have to stop the the experiment and remove the group where the offense -occurred from the room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> - -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/stationary-limitedvision/round0.xml --- a/src/main/resources/configuration/asu/2011/stationary-limitedvision/round0.xml +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">13</entry> -<entry key="resource-depth">13</entry> -<entry key="practice-round">true</entry> -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key='instructions'> -<![CDATA[ -<h2>Practice Round Instructions</h2> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. The -decisions you make in this round will NOT influence your earnings. At the beginning -of the practice round a quarter of the cells are occupied with green tokens. The -environment is a {resourceWidth} x {resourceDepth} grid of cells. -</p> -<p> -During this practice round, and <b>only during</b> this practice round, you are able -to reset the tokens displayed on the screen by pressing the <b>R</b> key. When you -press the <b>R</b> key you will reset the resource to its initial distribution, -randomly filling a quarter of the cells. -</p> -<p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<h2>Quiz</h2> -<hr> -<p> - In a moment, you will do a practice round of the token task. Before we go to - the practice round, answer the following questions to make sure you understand - the instructions. You will earn {quizCorrectAnswerReward} for each correct answer. -</p> -<br><br> -<form> -<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> -<input type="radio" name="q1" value="A">A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">B. When you have collected all tokens on the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">C. Tokens grow from the middle of the screen.<br> -<input type="radio" name="q1" value="D">D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> -<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> -<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<input type="submit" name="submit" value="Submit"><br> -</form> -]]> -</entry> -<entry key='quiz-results'> - <![CDATA[ - <h2>Quiz Results</h2> - <hr> - <p> - {if (allCorrect)} - You have answered all the questions correctly. For more details, see below. - {else} - At least one of your answers was incorrect. Questions you've answered - incorrectly are highlighted in red. Please see below for more details. - {endif} - </p> - <br><hr> -<form> -<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> - <b>{incorrect_q1} - In this question, "A", "B", and "D" are all true. "C" is false. Tokens only - regenerate when there are other tokens present in their immediately neighboring - cells. They do not spontaneously generate from the middle of the screen. - </b> -<br> -A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> -B. When you have collected all tokens on the screen, no new tokens will appear.<br> -C. Tokens grow from the middle of the screen.<br> -D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> -<br><br> -<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> - <b> - {incorrect_q2} - In this question, sequence "B" is not possible. Tokens cannot regenerate on an empty screen as shown in sequence B. - </b> - <br> -<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> -</form> - ]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/stationary-limitedvision/round1.xml --- a/src/main/resources/configuration/asu/2011/stationary-limitedvision/round1.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> -<entry key='in-round-chat-enabled'>true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. As in the practice round you can collect green tokens but now -you will earn <b>two cents</b> for each token collected. You <b>cannot</b> -reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become five times bigger. You will share this -larger environment with four other players in this room that have been randomly -selected. Each group's resource environment is distinct from the other groups. -</p> -<p> -Each of you has been assigned a number from 1 to 5. These numbers will remain the -same throughout the experiment but you will <b>not</b> be able to identify which -person in the room has been assigned which number, so your anonymity is guaranteed. -</p> - -<p> -The other four players will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. On the top left corner of the screen you can see -a clock that displays the remaining time in the round.</p> -<p>Since you can only see the resource within your vision you may neither see all -the other participants nor all the resource units. The figure below indicates the -vision range compared to the whole environment</p> -<img src="@CODEBASE_URL@/images/vision-range.jpg"> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> -<entry key='trust-game-instructions'> -<![CDATA[ -<h3>Task</h3> -<p> -You will be matched with another person in your group, but you will not know who -that person is. And that person will not know who you are. You make decisions for -the case you are drawn to be player 1 and the case you will be player 2. The -results of the decisions are given to you at the end of the whole experiment. -</p> - -<p> -The person drawn to be player 1 has the following decision to make. You will receive -an endowment of one dollar and decide how much to keep and how much to send to -another person in your group. -</p> - -<p> -The amount you send to the other person will be tripled and then given to the person -in your group with whom you have been matched. That person will decide how much to -keep and how much to send back to you. For example, if you send 0 extra credit -points to the other person, 0 extra credit points will be sent to the other person. -However, if you write 3 extra credit points on the form, 9 extra credit points will -be sent to the person. The other person would then decide how much to return to -you. -</p> - -<p> -Player 2 has the following decision to make. You have to chose for each of the 4 -possible cases how much to receive from player 1 how much to keep and how much to -send back to player 1. -We ask you to fill in the tables for player 1 as well as for player 2, and we will -drawn whether you are player 1 or 2 after you have made the decisions. -</p> - -<p> -Are there any questions? If you have a question, raise your hand and I will try to -answer it. -</p> -]]> -</entry> -</properties> diff -r bc8abb843266807220c76d7dba9a5a47f4e72e87 -r ce3694b36bdb2b724769a5723b8bf698d2920198 src/main/resources/configuration/asu/2011/stationary-limitedvision/round2.xml --- a/src/main/resources/configuration/asu/2011/stationary-limitedvision/round2.xml +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - - -<!-- enable field of vision for tokens and subjects --> -<entry key='initial-distribution'>.25</entry> - -<entry key='tokens-field-of-vision'>true</entry> -<entry key='subjects-field-of-vision'>true</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> -<entry key='in-round-chat-enabled'>true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can chat with the other participants in your group during this round. -You may communicate about any aspect of the experiment that you would like to -discuss with other participants with whom you have been matched. You may not promise -them side-payments after the experiment is completed or threaten them with any -consequence after the experiment is finished. We are monitoring the chat traffic -while you chat. If we see that somebody reveals his or her identity, we have to stop -the experiment and remove the whole group from which this person is a member out of -this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the chat -box. You can send a chat message by typing into the textfield and pressing the -enter key. -</p> -]]> -</entry> -<entry key='trust-game-instructions'> -<![CDATA[ -<h3>Task</h3> -<p> -You will be matched with another person in your group, but you will not know who -that person is. And that person will not know who you are. You make decisions for -the case you are drawn to be player 1 and the case you will be player 2. The -results of the decisions are given to you at the end of the whole experiment. -</p> - -<p> -The person drawn to be player 1 has the following decision to make. You will receive -an endowment of one dollar and decide how much to keep and how much to send to -another pe... [truncated message content] |
From: Bitbucket <com...@bi...> - 2012-01-19 20:26:19
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/14f534bc057d/ changeset: 14f534bc057d user: alllee date: 2012-01-19 21:26:20 summary: updating stockholm round 1 instructions affected #: 2 files diff -r 7ab598202be85606715f5811530a0763b4b0ec8f -r 14f534bc057d65ba5827240335771a529746812b src/main/resources/configuration/stockholm/censored-chat/README.txt --- /dev/null +++ b/src/main/resources/configuration/stockholm/censored-chat/README.txt @@ -0,0 +1,9 @@ +Censored chat treatment for researchers in Stockholm + +Stationary resource +Full vision + +Practice Round +Round 1-3 +Round 4-6, censored communication + diff -r 7ab598202be85606715f5811530a0763b4b0ec8f -r 14f534bc057d65ba5827240335771a529746812b src/main/resources/configuration/stockholm/censored-chat/round1.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round1.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round1.xml @@ -16,39 +16,53 @@ <entry key="instructions"><![CDATA[ -<h3>Round 1 Instructions</h3> +<h1>Round {roundNumber} Instructions</h1><hr><p> -This is the first round of the experiment. The length of the round is 4 -minutes. As in the practice round you can collect green tokens but now -you will earn <b>two cents</b> for each token collected. You <b>cannot</b> -reset the distribution of green tokens. + This is the first round of the experiment. The length of the round is + {duration}. As in the practice round you can collect green tokens but now + you will earn <b>{dollarsPerToken}</b> for each token collected. You + <b>cannot</b> reset the distribution of green tokens. +</p> +<h3>Groups</h3> +<hr> +<p> +In this round the renewable resource will become five times bigger. You will share +this larger environment with other randomly selected participants in this room. +Each participant in the room has been randomly assigned to one of several +equal-sized {clientsPerGroup} person groups and everyone in your group has been +randomly assigned a number from 1 to {clientsPerGroup}. You will stay in the same +group for the entire experiment, and each person's number from 1 to +{clientsPerGroup} will remain the same throughout the experiment. The other members +of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> +with a white number embedded in the dot. </p><p> -In this round the renewable resource will become five times bigger. You will share this -larger environment with four other players in this room that have been randomly -selected. Each group's resource environment is distinct from the other groups. + Your vision will be limited in this experiment and you might not see all the + other participants or all the resource units depending on your position and the + position of the other members of your group. The figure below indicates the + vision range compared to the whole environment. </p> -<p> -Each of you has been assigned a number from 1 to 5. These numbers will remain the -same throughout the experiment but you will <b>not</b> be able to identify which -person in the room has been assigned which number, so your anonymity is guaranteed. -</p> - -<p> -The other four players will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. On the top left corner of the screen you can see -a clock that displays the remaining time in the round.</p> -<p>Since you can only see the resource within your vision you may neither see all -the other participants nor all the resource units. The figure below indicates the -vision range compared to the whole environment</p><img src="@CODEBASE_URL@/images/vision-range.jpg"><p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> + In each round of the token task, you can see how many tokens each player has + collected at the top right corner of the screen. On the top left corner of the + screen you will see the remaining time in the round. </p> +<h3>Anonymity</h3> +<hr> +<p> + Because group membership was randomly assigned by the computer, neither you nor + the experimenter will be able to identify which person in the room has been + assigned to a particular group or number within a group. Your anonymity is + guaranteed. +</p> +<h3>Tokens</h3> +<hr> + <p> + Each group has its own set of token resources. + </p> +<p><b>Do you have any questions so far?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it.</p> ]]></entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 17:46:52
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/1fc647aadcf9/ changeset: 1fc647aadcf9 user: alllee date: 2012-01-19 17:57:39 summary: minor housekeeping affected #: 212 files Diff too large to display. https://bitbucket.org/virtualcommons/foraging/changeset/04e6e2e4a098/ changeset: 04e6e2e4a098 user: alllee date: 2012-01-19 18:46:52 summary: updating & cleaning up configurations affected #: 13 files diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -326,10 +326,10 @@ } public String getChatInstructions() { - ST template = createStringTemplate(getProperty("chat-instructions")); - template.add("chatDuration", inMinutes(getChatDuration()) + " minutes"); - template.add("clientsPerGroup", getClientsPerGroup()); - return template.render(); + ST st = createStringTemplate(getProperty("chat-instructions")); + st.add("chatDuration", inMinutes(getChatDuration()) + " minutes"); + st.add("clientsPerGroup", getClientsPerGroup()); + return st.render(); } public long inMinutes(Duration duration) { diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/asu/2011/t1/round6.xml --- a/src/main/resources/configuration/asu/2011/t1/round6.xml +++ b/src/main/resources/configuration/asu/2011/t1/round6.xml @@ -15,31 +15,4 @@ <entry key='always-explicit'>true</entry><entry key='max-cell-occupancy'>1</entry><entry key='trust-game'>true</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<h2>Survey</h2> -<hr> -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<h2>Payments</h2> -<hr> - <p>NOTE: Your computer number is <b>{id}</b></p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number, <b>{id}</b>, is -called, and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> - - - -]]> -</entry></properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round0.xml --- a/src/main/resources/configuration/iu/round0.xml +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML experiment round configuration</comment> -<entry key="resource-width">13</entry> -<entry key="resource-depth">13</entry> -<entry key="practice-round">true</entry> -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key='regrowth-rate'>.01</entry> -<entry key='initial-distribution'>.25</entry> -<entry key='always-explicit'>true</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>General Instructions</h3> -<p> -You appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif">, -and your other group members appear as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif">. -You move by pressing the four arrow keys to the right of your keyboard. You -can move either up, down, left, or right. You have to press a key for every -move of your yellow dot. In this experiment you can collect green diamond -shaped tokens -<img src="@CODEBASE_URL@/images/gem-token.gif"> and you will -earn two cents for each collected token. To collect a token, simply move your -yellow dot over a green token and press the <b>space bar</b>. If you move -over a token without pressing the <b>space bar</> you will NOT collect that -token. -</p> - -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can once again appear on that empty cell. -However, the rate at which new tokens will appear depends on the number of -adjacent cells that still have tokens. The more tokens in the 8 cells around -an empty cel, the faster a new token will appear on that empty cell. Tokens -generate new tokens. Thus the middle cell in Image 1 denoted with X will be -regenerated at a faster rate than the middle cell in Image 2. When all -neighboring cells are empty, there is no renewal. - -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> -</td> -<td align="center"> -<img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> -</td> -</tr> -</table> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -The decisions you make in this round will NOT influence your earnings. At the -At the beginning of the practice round half of the cells are occupied -with green tokens. The environment is a 13 x 13 grid of cells. -</p> -<p> -When you push the <b>R</b> key you will reset the distribution of -the tokens to randomly occupying half of the cells with green tokens. -</p> - -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<p> -Before we begin the practice round you need to answer the following questions -correctly. You can only continue when you have answered all questions -correctly. If an error is made you will need to answer the questions again. -</p> -<br> -<form> -Which of the statements is incorrect? <br> -<input type="radio" name="q1" value="A">Your decisions of where to collect tokens affect the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">When you have collected all tokens on -the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">Tokens grow from the middle of the -screen.<br> -<input type="radio" name="q1" value="D">In order to collect a token you need -to press the space bar while your avatar is on a cell with a token.<br> -<br><br> - -Which sequence of situations is not possible? <br> -<img src="@CODEBASE_URL@/images/question2.jpg"><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<br> -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> -<entry key="welcome-instructions"> -<![CDATA[ -<h3>Welcome</h3> -<p> -Welcome. You have already earned 5 dollars for showing up at this experiment. -You can earn more, up to a maximum of 40 dollars, by participating in this -experiment, which will take about an hour. The amount of money you earn -depends on your decisions as well as the decisions of your group members -during the four rounds of the experiment. -</p> -]]> -</entry> - -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round1.xml --- a/src/main/resources/configuration/iu/round1.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. Like in the practice round you can collect green tokens. This time -you earn <b>two cents</b> for each token collected. This time you -<b>cannot</b> reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become five times bigger. You -will share this larger environment with four other players in this room. -Each of you has been randomly assigned to one of several equal-sized -groups. Each of the groups is collecting tokens from an identical, but -separate resource. -</p> -<p> -Each of you has been assigned a number from 1 to 5. The other four players -will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round2.xml --- a/src/main/resources/configuration/iu/round2.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round3.xml --- a/src/main/resources/configuration/iu/round3.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<!-- resource regrowth parameters --> -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<!-- -<entry key="patchy">true</entry> -<entry key="top-initial-distribution">0.50</entry> -<entry key="top-rate">0.02</entry> -<entry key="bottom-initial-distribution">0.25</entry> -<entry key="bottom-rate">0.01</entry> ---> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<hr> -<p> -Round 3 is the same as round 2. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round4.xml --- a/src/main/resources/configuration/iu/round4.xml +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="sanction-type">real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<entry key='quiz'>true</entry> -<entry key='q1'>1</entry> -<entry key='q2'>2</entry> -<entry key='q3'>1</entry> -<entry key='q4'>1</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> -Round 4 is the same as the previous two rounds with two exceptions. -</p> -<p> -Before the next round starts you can anonymously communicate by text messages -for four minutes with the other participants in your group. You can use this -opportunity to discuss the experiment and coordinate your actions to improve -your earnings. You may not promise them side-payments after the experiment is -completed or make any threats. You are also not allowed to reveal your real -identity. We are monitoring the chat traffic while you chat. -</p> -<p> -During the next round you have the option to reduce the earnings of another -participant at a cost to your own earnings. -</p> -<ul> -<li>If you press the numeric key 1-5 corresponding to another participant, you -will reduce the number of tokens they have collected in this round by two -tokens. This will also reduce your own token amount by one token. The decision -whether or when to use this option is up to you. -<li>When you reduce the number of tokens of another participant, they will -receive a message stating that you have reduced their tokens. Likewise, if -another participant reduces your number of tokens, you will also receive a -message. These messages will be displayed on the bottom of your screen. -<li>If your tokens are being reduced or you are reducing another participant's -tokens, you will receive some visual cues. When your tokens are being reduced -your yellow dot will turn red briefly with a blue background. The participant -currently reducing your tokens will turn purple with a white background. -<li>You may reduce the earnings of other participants as long as there are -tokens remaining on the screen and while both you and the other participant -have a positive number of tokens collected during the round. <b>Each time</b> -you press the numeric key corresponding to another participant your token -amount is reduced by <b>one</b>, and their token amount is reduced by -<b>two</b>. -</ul> -<p> -The length of this round is four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we see that somebody reveals his or her identity, we have to stop the -experiment and remove the whole group from which this person is a member out -of this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the -chat box. You can send a chat message by typing into the textfield at the -bottom of the screen and clicking the "send" button with your mouse or -pressing the "enter" key on your keyboard. -</p> -]]> -</entry> - -<entry key='private-chat-instructions'> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, 4, or 5) before typing your message in -the chat box and sending it. By default you are communicating with all -members of your group. -]]> -</entry> - - -<entry key="quiz-instructions"> -<![CDATA[ -<p>Before the next round begins you must complete the quiz below. You can -only continue when you have answered all questions correctly. If an error is -made you will need to answer the questions again. -</p> - -<form> -Each time I press the numeric keys between 1-5 my tokens will be reduced -by:<br> -<input type="radio" name="q1" value="0">0 tokens<br> -<input type="radio" name="q1" value="1">1 token<br> -<input type="radio" name="q1" value="2">2 tokens<br> -<input type="radio" name="q1" value="4">4 tokens<br> -<br><br> - -Each time I press the numeric keys between 1-5 the number of tokens of the -corresponding participant is reduced by:<br> -<input type="radio" name="q2" value="0">0 tokens<br> -<input type="radio" name="q2" value="1">1 token<br> -<input type="radio" name="q2" value="2">2 tokens<br> -<input type="radio" name="q2" value="4">4 tokens<br> -<br><br> - -The background of your avatar turns blue. What does this represent?<br> -<input type="radio" name="q3" value="0">You collected a token<br> -<input type="radio" name="q3" value="1">Another participant is subtracting two tokens from you<br> -<input type="radio" name="q3" value="2">You are subtracting two tokens from another participant<br> -<input type="radio" name="q3" value="3">You are moving too fast<br> -<br><br> - -Every time I press the numeric keys between 1-5:<br> -<input type="radio" name="q4" value="0">Two tokens are subtracted from my tokens collected this round<br> -<input type="radio" name="q4" value="1">One token is subtracted from my tokens collected this round<br> -<input type="radio" name="q4" value="2">The background of my avatar turns blue momentarily<br> -<input type="radio" name="q4" value="3">My avatar is paused for two seconds<br> - -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round5.xml --- a/src/main/resources/configuration/iu/round5.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="sanction-type">real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> - -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 5 Instructions</h3> -<hr> -<p> -Round 5 is the same as round 4.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we see that somebody reveals his or her identity, we have to stop the -experiment and remove the whole group from which this person is a member out -of this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the -chat box. You can send a chat message by typing into the textfield at the -bottom of the screen and clicking the "send" button with your mouse or -pressing the "enter" key on your keyboard. -</p> -]]> -</entry> - -<entry key='private-chat-instructions'> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, 4, or 5) before typing your message in -the chat box and sending it. By default you are communicating with all -members of your group. -]]> -</entry> - -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/round6.xml --- a/src/main/resources/configuration/iu/round6.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="resource-depth">29</entry> -<entry key="resource-width">29</entry> -<entry key="duration">240</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<entry key='always-explicit'>true</entry> -<entry key='max-cell-occupancy'>1</entry> - -<entry key="sanction-type">real-time</entry> -<entry key="sanction-cost">1</entry> -<entry key="sanction-multiplier">2</entry> - -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 6 Instructions</h3> -<hr> -<p> -Round 6 is the same as round 5.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we detect that somebody has revealed their identity, we will have to stop the -experiment and remove that person's entire group from the experiment. -</p> -<p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the -chat box. You can send a chat message by typing into the textfield at the -bottom of the screen and clicking the "send" button with your mouse or -pressing the "enter" key on your keyboard. </p> -]]> -</entry> - -<entry key="private-chat-instructions"> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, or 4) before typing your message in the -chat box and sending it. By default you are communicating with all members of -your group. -]]> -</entry> - -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/iu/server.xml --- a/src/main/resources/configuration/iu/server.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="hostname">@SERVER_ADDRESS@</entry> -<entry key="port">@PORT_NUMBER@</entry> -<entry key="round0">round0.xml</entry> -<entry key="round1">round1.xml</entry> -<entry key="round2">round2.xml</entry> -<entry key="round3">round3.xml</entry> -<entry key="round4">round4.xml</entry> -<entry key="round5">round5.xml</entry> -<entry key="round6">round6.xml</entry> -<entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">7</entry> -<entry key="facilitator-instructions"> -<![CDATA[ -<h3>Facilitator Instructions</h3> -<p> -Welcome to the facilitator interface. This interface allows you to control -the experiment. You may only modify configuration parameters <b>before</b> -you start the experiment by selecting the Configuration menu. When all the -participants are ready to begin the experiment, you can start the experiment -by selecting Experiment -> Start. After a round has been completed you -will be able to view the statistics for all of the participants. You can -begin the next round by selecting Round -> Start. -</p> -]]> -</entry> -</properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/stockholm/censored-chat/round5.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round5.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round5.xml @@ -25,22 +25,4 @@ <!-- enable censored chat session before this round --><entry key='censored-chat-enabled'>true</entry><entry key='chat-enabled'>true</entry> - -<entry key="chat-enabled">true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 5 Instructions</h3> -<hr> -<p> -Round 5 is the same as round 4.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry></properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/stockholm/censored-chat/round6.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round6.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round6.xml @@ -23,39 +23,4 @@ <!-- before this round begins, we have a chat session --><entry key='censored-chat-enabled'>true</entry><entry key='chat-enabled'>true</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 6 Instructions</h3> -<hr> -<p> -Round 6 is the same as round 5.</p> -<p> -The length of this round is again four minutes. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry></properties> diff -r 1fc647aadcf9314ba46a520dce9ced122bbc1872 -r 04e6e2e4a098c021214addd78250121992ff3d42 src/main/resources/configuration/stockholm/censored-chat/server.xml --- a/src/main/resources/configuration/stockholm/censored-chat/server.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/server.xml @@ -12,20 +12,26 @@ <entry key="round5">round5.xml</entry><entry key="round6">round6.xml</entry><entry key='show-up-payment'>10.0</entry> -<entry key='show-up-payment'>0.02</entry> +<entry key='dollars-per-token'>0.02</entry><entry key="wait-for-participants">true</entry><entry key="number-of-rounds">7</entry><entry key="facilitator-instructions"><![CDATA[ <h3>Facilitator Instructions</h3><p> -Welcome to the facilitator interface. This interface allows you to control -the experiment. You may only modify configuration parameters <b>before</b> -you start the experiment by selecting the Configuration menu. When all the -participants are ready to begin the experiment, you can start the experiment -by selecting Experiment -> Start. After a round has been completed you -will be able to view the statistics for all of the participants. You can -begin the next round by selecting Round -> Start. + This facilitator interface allows you to control the experiment. In general you + will be following a sequence similar to this: + <ol> + <li>Show instructions</li> + <li>Start round</li> + <li>After round is over + <ol> + <li>show trust game if necessary</li> + <li>start standalone chat round if necessary</li> + </ol> + </li> + <li>Goto 1.</li> + </ol></p> ]]></entry> @@ -42,19 +48,19 @@ <entry key="chat-instructions"><![CDATA[ <p> - You can now chat with the other participants in your group for {chatDuration} minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If we -detect any violation of these rules, we will stop the experiment and remove the -offending group from the room. + You can now chat with the other participants in your group for {chatDuration} + minutes total. During the chat round, you may communicate about any aspect of + the experiment that you would like to discuss with other participants with whom + you have been matched. You may not promise them side-payments after the + experiment is completed or threaten them with any consequence after the + experiment is finished. We are monitoring the chat traffic while you chat. If we + detect any violation of these rules, we will stop the experiment and remove the + offending group from the room. </p><p> -You will see other participants labeled as "1", "2","3", "4", or "5" in the -chat box. You can send a chat message by typing into the textfield at the -bottom of the screen and pressing the "enter" key on your keyboard. + You will see other participants labeled from 1 to {clientsPerGroup} in the chat + box. You can send a chat message by typing into the textfield at the bottom of + the screen and pressing the "enter" key on your keyboard. </p><p> NOTE: Your messages must first be approved before they will be relayed to the @@ -72,46 +78,58 @@ <entry key="welcome-instructions"><![CDATA[ -<h3>Welcome to the experiment. The experiment will begin shortly after everyone has been -assigned a station.</h3> +<h1>Welcome</h1> +<hr><p> -Please <b>wait quietly</b> and <b>do not close this window or open any other applications</b>. +Welcome to the experiment. The experiment will begin shortly after everyone has been +assigned a station. +<br><br> +Please <b>wait quietly</b> and <b>do not close this window, open any other applications, or communicate with any of the other participants</b>. </p> ]]></entry><entry key="general-instructions"><![CDATA[ -<h3>General Instructions</h3> +<h1>General Instructions</h1> +<hr><p> -Welcome. You have already earned 5 dollars by showing up at this experiment. You can -earn more, up to a maximum of 40 dollars, by participating in this experiment, which -will take about an hour to an hour and a half. The amount of money you earn depends -on your decisions as well as the decisions of other people in this room during the -six rounds of the experiment. + <b>Welcome</b>. You have already earned {showUpPayment} dollars just for showing up at this experiment. </p><p> -You appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif">. -You move by pressing the four arrow keys on your keyboard. You can move up, down, -left, or right. You have to press a key for each and every move of your yellow dot. -In this experiment you can collect green diamond shaped tokens -<img src="@CODEBASE_URL@/images/gem-token.gif"> and earn two cents for each collected token. -To collect a token, move your yellow dot over a green token and press the <b>space -bar</b>. If you move over a token without pressing the <b>space bar</> you do NOT -collect that token. +You can earn more, up to a maximum of about 40 dollars, by participating in this +experiment which will take about an hour to an hour and a half. The amount of money +you earn depends on your decisions AND the decisions of other people in this room +over the course of the experiment. +</p> +<h2>How to participate</h2> +<hr> +<p> +You will appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img>. +You can move by pressing the four arrow keys on your keyboard. +</p> +<p> + You can move up, down, left, or right. You have to press a key for each and + every move of your yellow dot. As you move around you can collect green diamond + shaped tokens <img src="@CODEBASE_URL@/images/gem-token.gif"></img> and earn two + cents for each collected token. To collect a token, move your yellow dot over a + green token and <b>press the space bar</b>. Simply moving your avatar over a + token does NOT collect that token. </p> +<h2>Tokens</h2> +<hr><p> The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can re-appear on that empty cell. -However, the rate at which new tokens will appear depends on the number of -adjacent cells with tokens. The more tokens in the eight cells around -an empty cell, the faster a new token will appear on that empty cell. In other -words, <b>existing tokens can generate new tokens</b>. To illustrate this, please -refer to Image 1 and Image 2. The middle cell in Image 1 denoted with an X has -a greater chance of regeneration than the middle cell in Image 2. When all -neighboring cells are empty, there is <b>no chance for regeneration</b>. - +collected a green token, a new token can re-appear on that empty cell. The rate at +which new tokens appear is dependent on the number of adjacent cells with tokens. +The more tokens in the eight cells that surround an empty cell, the faster a new +token will appear on that empty cell. In other words, <b>existing tokens can +generate new tokens</b>. To illustrate this, please refer to Image 1 and Image 2. +The middle cell in Image 1 denoted with an X has a greater chance of regeneration +than the middle cell in Image 2. When all neighboring cells are empty, there is +<b>no chance for regeneration</b>. +</p><table width="100%"><tr><td align="center"><b>Image 1</b></td> @@ -119,15 +137,144 @@ </tr><tr><td align="center"> -<img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> + <img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"></td><td align="center"> -<img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> + <img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"></td></tr></table> + +<h2>Best Strategy</h2> +<hr> +<p> +The chance that a token will regenerate on an empty cell increases as there are +more tokens surrounding it. Therefore, you want to have as many tokens around an +empty cell as possible. However, you also need empty cells to benefit from this +regrowth. The best arrangement of tokens that maximizes overall regrowth is the +checkerboard diagram shown below. +<br> +<img src="@CODEBASE_URL@/images/foraging-checkerboard.png" alt="Checkerboard Resource"> +</p> ]]></entry> +<entry key='trust-game-instructions'> +<![CDATA[ +<h1>Instructions</h1> +<hr> +<p> + You will now participate in an exercise where you will be matched with a random + person in your group. In this exercise there are two roles, Player 1 and Player 2. + Your job is to design strategies for both Player 1 and Player 2 roles. When you + are randomly paired with another member of your group you may be selected as + Player 1 <b>or</b> Player 2. The results of randomly pairing your strategies + with the other group member's strategies will be shown to you at the <b>end of + the experiment</b>. +</p> +<h2>How to participate</h2> +<hr> +<ol> + <li>Player 1 will first receive an endowment of one dollar and has to decide <b>how much to keep</b>. The remaining amount is <b>sent to Player 2</b>. + <li>The amount Player 1 sends to Player 2 is tripled by the system and then + given to Player 2. Player 2 must then decide <b>how much to keep</b> and <b>how much to send back to Player 1</b>. +</ol> +<p> +For example, if Player 1 sends 0 cents to Player 2, Player 1 earns 1 dollar and +Player 2 earns 0 cents. However, if Player 1 sends 1 dollar to Player 2, 3 dollars +would be sent to Player 2. Player 2 then decides to return $1.75 back to Player 1. +In this case, Player 1 earns $1.75, and Player 2 earns $1.25. +</p> +<p> +Please fill in the following form to design your strategies as Player 1 or Player 2. +<br> +<b>If you have any questions, please raise your hand. Are there any questions?</b> +</p> +]]> +</entry> + +<entry key="chat-instructions"> +<![CDATA[ +<p> +You can chat with the other participants in your group during this round. +You may discuss any aspect of the experiment with the other participants in your group with two exceptions: +<ol> + <li>You <b>may not promise side-payments after the experiment is completed or threaten anyone with any consequence after the experiment is finished</b>.</li> + <li>You <b>may not reveal your actual identity</b></li> +</ol> +<p> +We are monitoring the chat traffic while you chat. If we detect any violation of the +rules we will have to stop the experiment and remove the offending group from the +room. +</p> +<p> + You will see other participants labeled from 1 to {clientsPerGroup} in the chat + window. You can send a chat message by typing into the textfield and pressing + the enter key. +</p> +]]> +</entry> +<entry key="sameRoundAsPreviousInstructions"> +<![CDATA[ +<h3>Round {roundNumber} Instructions</h3> +<hr> +<p>Round {roundNumber} is the same as the previous round.</p> +<p>The length of this round is {duration}.</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry> +<entry key='facilitator-debriefing'> +<![CDATA[ +<h1>Round {self.roundNumber} results</h1> +<hr> +<table border=1 cellspacing=3 cellpadding=3> +<tr> +<th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Trust game earnings</th><th>Total income</th> +</tr> +{clientDataList: {data | +<tr><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> +}} +</table> +]]> +</entry> +<entry key='client-debriefing'> +<![CDATA[ +<h1>{if (self.practiceRound)}Practice Round{else}Round {self.roundNumber}{endif} Results</h1> +<hr> +<ul> +<li>Tokens collected in this round: {clientData.currentTokens}</li> +<li>Income from tokens collected: {clientData.currentIncome}</li> +<li>Quiz earnings: {clientData.quizEarnings}</li> +<li>Show up payment: {showUpPayment}</li> +</ul> +{if (showExitInstructions && !clientData.trustGameLog.empty) } +<h2>Trust Game Earnings</h2> +<hr> +<ul> +{clientData.trustGameLog: {trustGameLog| +<li>Trust Game #{i}: {trustGameLog}</li> +}} +</ul> +Your total trust game earnings: <b>{clientData.trustGameEarnings}</b>. +{endif} +<h2>Total Income</h2> +<hr> +<p> +Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. +</p> +{if (showExitInstructions)} +<h2>Exit Survey</h2> +<hr> +<p> +This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. +</p> +<h2>Payment</h2> +<hr> +<p> +When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +</p> +{endif} +]]> +</entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-19 16:57:13
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/869d00fdf846/ changeset: 869d00fdf846 user: alllee date: 2012-01-19 17:57:02 summary: removing outdated configurations. at some point should recreate configurations to replicate experiments run in the Science paper. affected #: 81 files diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round0.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round0.xml +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">14</entry> -<entry key="resource-depth">14</entry> - -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key='regrowth-rate'>.01</entry> -<entry key='initial-distribution'>.25</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key="practice-round">true</entry> -<entry key="instructions"> -<![CDATA[ -<h3>General Instructions</h3> -<p> -You appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif">, -and your other group members appear as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif">. -You move by pressing the four arrow keys to the right of your keyboard. You -can move either up, down, left, or right. You have to press a key for every -move of your yellow dot. In this experiment you can collect green diamond -shaped tokens -<img src="@CODEBASE_URL@/images/gem-token.gif"> and you will -earn two cents for each collected token. To collect a token, simply move your -yellow dot over a green token and press the <b>space bar</b>. If you move -over a token without pressing the <b>space bar</> you will NOT collect that -token. -</p> - -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can once again appear on that empty cell. -However, the rate at which new tokens will appear depends on the number of -adjacent cells that still have tokens. The more tokens in the 8 cells around -an empty cell, the faster a new token will appear on that empty cell. In -other words, the presence of tokens will generate new tokens over time. Thus -the middle cell in Image 1 denoted with X will be regenerated at a faster rate -than the middle cell in Image 2. When all neighboring cells are empty, there -is no renewal. - -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> -</td> -<td align="center"> -<img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> -</td> -</tr> -</table> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -The decisions you make in this round will NOT influence your earnings. At the -beginning of the practice round half of the cells are occupied with green -tokens. The environment is a 14 x 14 grid of cells. -</p> -<p> -When you push the <b>R</b> key you will reset the distribution of -the tokens to randomly occupying half of the cells with green tokens. -</p> - -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<p> -Before we begin the practice round you need to answer the following questions -correctly. You can only continue when you have answered all questions -correctly. If an error is made you will need to answer the questions again. -</p> -<br> -<form> -Which of the statements is incorrect? <br> -<input type="radio" name="q1" value="A">Your decisions of where to collect tokens affect the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">When you have collected all tokens on -the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">Tokens grow from the middle of the -screen.<br> -<input type="radio" name="q1" value="D">In order to collect a token you need -to press the space bar while your avatar is on a cell with a token.<br> -<br><br> - -Which sequence of situations is not possible? <br> -<img src="@CODEBASE_URL@/images/question2.jpg"><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<br><br> - -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> -<entry key="welcome-instructions"> -<![CDATA[ -<h3>Welcome</h3> -<p> -Welcome. You have already earned 5 dollars for showing up at this experiment. -You can earn more, up to a maximum of 40 dollars, by participating in this -experiment, which will take about an hour. The amount of money you earn -depends on your decisions as well as the decisions of your group members -during the four rounds of the experiment. -</p> -]]> -</entry> - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round1.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round1.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - - -<!-- -<entry key="patchy">true</entry> -<entry key="top-initial-distribution">0.50</entry> -<entry key="top-rate">0.02</entry> -<entry key="bottom-initial-distribution">0.25</entry> -<entry key="bottom-rate">0.01</entry> ---> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. Like in the practice round you can collect green tokens. This time -you earn <b>two cents</b> for each token collected. This time you -<b>cannot</b> reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become four times bigger. You will -share this larger environment with four other players in this room. Each of -you has been randomly assigned to one of several equal-sized groups. Each of -the groups is collecting tokens from an identical, but separate resource. -</p> -<p> -Each of you has been assigned a number from 1 to 4. The other three players -will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round2.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round2.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. However, before the next round starts you -will be given the opportunity to anonymously communicate by text messages for -four minutes with the other participants in your group. You can use this -opportunity to discuss the experiment and coordinate your actions to improve -your earnings. You may not promise them side-payments after the experiment is -completed or make any threats. You are also not allowed to reveal your real -identity. We are monitoring the chat traffic while you chat. -</p> - -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we see that somebody reveals his or her identity, we have to stop the -experiment and remove the whole group from which this person is a member out -of this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", or "4" in the chat -box. You can send a chat message by typing into the textfield at the bottom -of the screen and then clicking the "send" button with your mouse or pressing -the "enter" key on your keyboard. </p> -]]> -</entry> - -<entry key="private-chat-instructions"> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, or 4) before typing your message in the -chat box and sending it. By default you are communicating with all members of -your group. -]]> -</entry> - - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round3.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round3.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">true</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">240</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">abstract</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<p> -Round 3 is another practice round. This time you will be placed in a 3-D -world where you can collect tokens by harvesting pillars and rings at the top -of the pillars. -</p> -<p> -The world consists of pillars which grow slowly over time. When a pillar -becomes large enough a yellow component will appear at its top. You can collect -this part from a pillar or you can collect the pillar itself. The older the pillar -the more tokens you collect by harvesting it. A pillar which is one minute old -leads to 5 tokens, while a pillar that is four minutes old gives you 25 tokens. -After 4 minutes the pillar will not grow any further. If a pillar is harvested, it -will take some time before a new pillar appears. A pillar will be crowned with a yellow -component when it reaches an age of 5 minutes. You can collect this yellow component, -which generates 10 tokens per harvest. When you have collected the yellow part, a new part -will be added as illustrated in the figure below. The pillars can generate yellow parts indefinitely. -</p> -<table width="100%"> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/abstract.jpg"></td> -</tr> -</table> -You will share the environment with three other participants. You will appear on -the screen as an avatar represented as a ball. -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Harvesting a purple pillar:</b> Harvesting a pillar is a two step process. -First you need to select the pillar you wish to harvest. You can do this by standing -next to the pillar and pressing the key <b>Q</b> key. You will see the selected pillar -changing its color to green. Then you can harvest the selected pillar by pressing the -<b>E</b> key. You will see that the avatar bumps against the selected pillar. The -bigger the pillar the more effort the avatar needs to make to harvest the pillar. When -the pillar is harvested, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting yellow components:</b> Collecting yellow component of a pillar is also a two step process. -First you need to select the pillar you wish collect component from. You can do -this by standing next to the pillar and pressing the key <b>Q</b>. You will see -the selected pillar changing its color to green. Then you can collect the yellow component at the top of the pillar -by pressing the key <b>X</b>. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -You will share the environment with three other participants. Make sure you -try out the chat option, the harvesting of a pillars and the collection of yellow components. -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round4.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/round4.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">false</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">900</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">abstract</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> -The actual round will now begin. The duration of this round is 15 minutes. -For review, here is a list of important actions and respective keys: -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Harvesting a purple pillar:</b> Harvesting a pillar is a two step process. -First you need to select the pillar you wish to harvest. You can do this by standing -next to the pillar and pressing the key <b>Q</b> key. You will see the selected pillar -changing its color to green. Then you can harvest the selected pillar by pressing the -<b>E</b> key. You will see that the avatar bumps against the selected pillar. The -bigger the pillar the more effort the avatar needs to make to harvest the pillar. When -the pillar is harvested, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting yellow components:</b> Collecting yellow component of a pillar is also a two step process. -First you need to select the pillar you wish collect component from. You can do -this by standing next to the pillar and pressing the key <b>Q</b>. You will see -the selected pillar changing its color to green. Then you can collect the yellow component at the top of the pillar -by pressing the key <b>X</b>. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> - - -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry> - - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-abstract/server.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-abstract/server.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="hostname">@SERVER_ADDRESS@</entry> -<entry key="port">@PORT_NUMBER@</entry> -<entry key="round0">round0.xml</entry> -<entry key="round1">round1.xml</entry> -<entry key="round2">round2.xml</entry> -<entry key="round3">round3.xml</entry> -<entry key="round4">round4.xml</entry> -<entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">5</entry> -<entry key="facilitator-instructions"> -<![CDATA[ -<h3>Facilitator Instructions</h3> -<p> -Welcome to the facilitator interface. This interface allows you to control -the experiment. You may only modify configuration parameters <b>before</b> -you start the experiment by selecting the Configuration menu. When all the -participants are ready to begin the experiment, you can start the experiment -by selecting Experiment -> Start. After a round has been completed you -will be able to view the statistics for all of the participants. You can -begin the next round by selecting Round -> Start. -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round0.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round0.xml +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">14</entry> -<entry key="resource-depth">14</entry> - -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key='regrowth-rate'>.01</entry> -<entry key='initial-distribution'>.25</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key="practice-round">true</entry> -<entry key="instructions"> -<![CDATA[ -<h3>General Instructions</h3> -<p> -You appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif">, -and your other group members appear as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif">. -You move by pressing the four arrow keys to the right of your keyboard. You -can move either up, down, left, or right. You have to press a key for every -move of your yellow dot. In this experiment you can collect green diamond -shaped tokens -<img src="@CODEBASE_URL@/images/gem-token.gif"> and you will -earn two cents for each collected token. To collect a token, simply move your -yellow dot over a green token and press the <b>space bar</b>. If you move -over a token without pressing the <b>space bar</> you will NOT collect that -token. -</p> - -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can once again appear on that empty cell. -However, the rate at which new tokens will appear depends on the number of -adjacent cells that still have tokens. The more tokens in the 8 cells around -an empty cell, the faster a new token will appear on that empty cell. In -other words, the presence of tokens will generate new tokens over time. Thus -the middle cell in Image 1 denoted with X will be regenerated at a faster rate -than the middle cell in Image 2. When all neighboring cells are empty, there -is no renewal. - -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> -</td> -<td align="center"> -<img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> -</td> -</tr> -</table> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -The decisions you make in this round will NOT influence your earnings. At the -beginning of the practice round half of the cells are occupied with green -tokens. The environment is a 14 x 14 grid of cells. -</p> -<p> -When you push the <b>R</b> key you will reset the distribution of -the tokens to randomly occupying half of the cells with green tokens. -</p> - -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<p> -Before we begin the practice round you need to answer the following questions -correctly. You can only continue when you have answered all questions -correctly. If an error is made you will need to answer the questions again. -</p> -<br> -<form> -Which of the statements is incorrect? <br> -<input type="radio" name="q1" value="A">Your decisions of where to collect tokens affect the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">When you have collected all tokens on -the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">Tokens grow from the middle of the -screen.<br> -<input type="radio" name="q1" value="D">In order to collect a token you need -to press the space bar while your avatar is on a cell with a token.<br> -<br><br> - -Which sequence of situations is not possible? <br> -<img src="@CODEBASE_URL@/images/question2.jpg"><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<br><br> - -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> -<entry key="welcome-instructions"> -<![CDATA[ -<h3>Welcome</h3> -<p> -Welcome. You have already earned 5 dollars for showing up at this experiment. -You can earn more, up to a maximum of 40 dollars, by participating in this -experiment, which will take about an hour. The amount of money you earn -depends on your decisions as well as the decisions of your group members -during the four rounds of the experiment. -</p> -]]> -</entry> - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round1.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round1.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - - -<!-- -<entry key="patchy">true</entry> -<entry key="top-initial-distribution">0.50</entry> -<entry key="top-rate">0.02</entry> -<entry key="bottom-initial-distribution">0.25</entry> -<entry key="bottom-rate">0.01</entry> ---> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<hr> -<p> -This is the first round of the experiment. The length of the round is 4 -minutes. Like in the practice round you can collect green tokens. This time -you earn <b>two cents</b> for each token collected. This time you -<b>cannot</b> reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become four times bigger. You will -share this larger environment with four other players in this room. Each of -you has been randomly assigned to one of several equal-sized groups. Each of -the groups is collecting tokens from an identical, but separate resource. -</p> -<p> -Each of you has been assigned a number from 1 to 4. The other three players -will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round2.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round2.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -Round 2 is the same as round 1. However, before the next round starts you -will be given the opportunity to anonymously communicate by text messages for -four minutes with the other participants in your group. You can use this -opportunity to discuss the experiment and coordinate your actions to improve -your earnings. You may not promise them side-payments after the experiment is -completed or make any threats. You are also not allowed to reveal your real -identity. We are monitoring the chat traffic while you chat. -</p> - -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we see that somebody reveals his or her identity, we have to stop the -experiment and remove the whole group from which this person is a member out -of this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", or "4" in the chat -box. You can send a chat message by typing into the textfield at the bottom -of the screen and then clicking the "send" button with your mouse or pressing -the "enter" key on your keyboard. </p> -]]> -</entry> - -<entry key="private-chat-instructions"> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, or 4) before typing your message in the -chat box and sending it. By default you are communicating with all members of -your group. -]]> -</entry> - - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round3.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round3.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">true</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">240</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">forestry</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<p> -Round 3 is another practice round where you will be able to collect tokens by -harvesting trees and fruit in a 3D representation of a forest. -</p> -<p> -The forest consists of trees which are growing slowly over time. When a tree -is big enough it will generate fruit. You can collect fruit from a tree and -you can cut down a tree. The older the tree the more tokens you collect by -harvesting it. A tree which is one minute old leads to 5 tokens, while a tree -that is four minutes old gives you 25 tokens. After 4 minutes the tree will -not grow any further. If a tree is cut down, it takes some time before a new -seedling generates a new start for a tree to grow. A tree will generate fruits -at age of 5 minutes. You can collect fruits, which generates 10 tokens per -harvest. When you have harvested fruit, new fruit will be added as illustrated -in the figure below. The tree can generate fruit indefinitely. -<table width="100%"> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/trees.jpg"></td> -</tr> -</table> -You will share the forest with three other participants. You will appear on -the screen as an avatar. -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Cutting a tree:</b> Cutting a tree is a two step process. -First you need to select the tree you wish to cut. You can do this by standing -next to the tree and pressing the <b>Q</b> key. You will see the selected tree -changing its color to blue. Then you can cut the selected tree by pressing the -<b>E</b> key. You will see that the avatar moves its axe to cut the tree. The -bigger the tree the more effort the avatar needs to make to cut the tree. When -the tree is cut, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting fruits:</b> Collecting fruits is also a two step process. -First you need to select the tree you wish collect fruits from. You can do -this by standing next to the tree and pressing the key <b>Q</b>. You will see -the selected tree changing its color to blue. Then you can collect the fruits -by pressing the key <b>X</b>. You will see that the fruits are falling down, -representing the fruit harvest. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -You will share the environment with three other participants. Make sure you -try out the chat option, the cutting of a tree and the collection of fruit. -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round4.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/round4.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">false</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">900</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">forestry</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> -The actual round will now begin. The duration of this round is 15 minutes. -For review, here is a list of important actions and respective keys: -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Cutting a tree:</b> Cutting a tree is a two step process. -First you need to select the tree you wish to cut. You can do this by standing -next to the tree and pressing the <b>Q</b> key. You will see the selected tree -changing its color to blue. Then you can cut the selected tree by pressing the -<b>E</b> key. You will see that the avatar moves its axe to cut the tree. The -bigger the tree the move effort the avatar needs to make to cut the tree. When -the tree is cut, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting fruits:</b> Collecting fruits is also a two step process. -First you need to select the tree you wish collect fruits from. You can do -this by standing next to the tree and pressing the key <b>Q</b>. You will see -the selected tree changing its color to blue. Then you can collect the fruits -by pressing the key <b>X</b>. You will see that the fruits are falling down, -representing the fruit harvest. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> - -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry> - - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/2d-forestry/server.xml --- a/src/main/resources/configuration/asu-experiments/defunct/2d-forestry/server.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="hostname">@SERVER_ADDRESS@</entry> -<entry key="port">@PORT_NUMBER@</entry> -<entry key="round0">round0.xml</entry> -<entry key="round1">round1.xml</entry> -<entry key="round2">round2.xml</entry> -<entry key="round3">round3.xml</entry> -<entry key="round4">round4.xml</entry> -<entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">5</entry> -<entry key="facilitator-instructions"> -<![CDATA[ -<h3>Facilitator Instructions</h3> -<p> -Welcome to the facilitator interface. This interface allows you to control -the experiment. You may only modify configuration parameters <b>before</b> -you start the experiment by selecting the Configuration menu. When all the -participants are ready to begin the experiment, you can start the experiment -by selecting Experiment -> Start. After a round has been completed you -will be able to view the statistics for all of the participants. You can -begin the next round by selecting Round -> Start. -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round0.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round0.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">true</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">240</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">abstract</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 1 Instructions</h3> -<p> -This is a practice round where you will be placed in a 3-D -world and can collect tokens by harvesting pillars and rings at the top -of the pillars. -</p> -<p> -The world consists of pillars which grow slowly over time. When a pillar -becomes large enough a yellow component will appear at its top. You can collect -this part from a pillar or you can collect the pillar itself. The older the pillar -the more tokens you collect by harvesting it. A pillar which is one minute old -leads to 5 tokens, while a pillar that is four minutes old gives you 25 tokens. -After 4 minutes the pillar will not grow any further. If a pillar is harvested, it -will take some time before a new pillar appears. A pillar will be crowned with a yellow -component when it reaches an age of 5 minutes. You can collect this yellow component, -which generates 10 tokens per harvest. When you have collected the yellow part, a new part -will be added as illustrated in the figure below. The pillars can generate yellow parts indefinitely. -</p> -<table width="100%"> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/abstract.jpg"></td> -</tr> -</table> -You will share the environment with three other participants. You will appear on -the screen as an avatar represented as a ball. -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Harvesting a purple pillar:</b> Harvesting a pillar is a two step process. -First you need to select the pillar you wish to harvest. You can do this by standing -next to the pillar and pressing the key <b>Q</b> key. You will see the selected pillar -changing its color to green. Then you can harvest the selected pillar by pressing the -<b>E</b> key. You will see that the avatar bumps against the selected pillar. The -bigger the pillar the more effort the avatar needs to make to harvest the pillar. When -the pillar is harvested, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting yellow components:</b> Collecting yellow component of a pillar is also a two step process. -First you need to select the pillar you wish collect component from. You can do -this by standing next to the pillar and pressing the key <b>Q</b>. You will see -the selected pillar changing its color to green. Then you can collect the yellow component at the top of the pillar -by pressing the key <b>X</b>. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -You will share the environment with three other participants. Make sure you -try out the chat option, the harvesting of a pillars and the collection of yellow components. -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> - -<entry key="welcome-instructions"> -<![CDATA[ -<h3>Welcome</h3> -<p> -Welcome. You have already earned 5 dollars for showing up at this experiment. -You can earn more, up to a maximum of 40 dollars, by participating in this -experiment, which will take about an hour. The amount of money you earn -depends on your decisions as well as the decisions of your group members -during the four rounds of the experiment. -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round1.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round1.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="practice-round">false</entry> -<entry key='resource-width'>8</entry> -<entry key='resource-depth'>8</entry> -<entry key='resource-scale'>32</entry> -<entry key="duration">900</entry> -<entry key="initial-distribution">.25</entry> -<entry key="private-property">false</entry> -<entry key="clients-per-group">4</entry> -<entry key="quiz-enabled">false</entry> -<entry key="chat-radius">64</entry> -<entry key="seconds-per-year">30</entry> -<entry key="regrowth-rate">.01</entry> -<entry key="tokens-per-fruits">10</entry> -<entry key="experiment-type">abstract</entry> -<entry key="maximum-resource-age">10</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 2 Instructions</h3> -<hr> -<p> -The actual round will now begin. The duration of this round is 15 minutes. -For review, here is a list of important actions and respective keys: -</p> -<p> -<b>Moving your avatar:</b> You can move your avatar by pressing the <b>W</b>, -<b>A</b>, <b>S</b>, <b>D</b> keys or via the arrow keys. <b>W</b> or the -<b>Up</b> arrow key will move your avatar forward while <b>S</b> or the -<b>Down</b> arrow key will move it backward. <b>A</b> or the <b>Left</b> arrow -key will rotate the avatar to its left while <b>D</b> or the <b>Right</b> -arrow key will rotate it to its right. -</p> -<p> -<b>Harvesting a purple pillar:</b> Harvesting a pillar is a two step process. -First you need to select the pillar you wish to harvest. You can do this by standing -next to the pillar and pressing the key <b>Q</b> key. You will see the selected pillar -changing its color to green. Then you can harvest the selected pillar by pressing the -<b>E</b> key. You will see that the avatar bumps against the selected pillar. The -bigger the pillar the more effort the avatar needs to make to harvest the pillar. When -the pillar is harvested, you will see tokens added to your total at the top of the -screen. -</p> -<p> -<b>Collecting yellow components:</b> Collecting yellow component of a pillar is also a two step process. -First you need to select the pillar you wish collect component from. You can do -this by standing next to the pillar and pressing the key <b>Q</b>. You will see -the selected pillar changing its color to green. Then you can collect the yellow component at the top of the pillar -by pressing the key <b>X</b>. On the top of the screen you will see that -tokens are added to your total. -</p> -<p> -<b>Chatting with other players:</b> A chat box is present at the bottom of the -screen. When another player is in the neighborhood, you can click on that -avatar using the left mouse button to start a chat. You will see the character -associated with the selected avatar (<i>A</i>, <i>B</i>, <i>C</i> or <i>D</i>) -appearing in the chat box indicating that you can send messages to that -player. -</p> - - -]]> -</entry> - - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round2.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round2.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="resource-width">14</entry> -<entry key="resource-depth">14</entry> - -<entry key="private-property">true</entry> -<entry key="duration">240</entry> - -<entry key='regrowth-rate'>.01</entry> -<entry key='initial-distribution'>.25</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="quiz">true</entry> -<entry key="q1">C</entry> -<entry key="q2">B</entry> - -<entry key="practice-round">true</entry> -<entry key="instructions"> -<![CDATA[ -<h3>Round 3 Instructions</h3> -<p> -You will now appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif">, -and your other group members appear as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif">. -You move by pressing the four arrow keys to the right of your keyboard. You -can move either up, down, left, or right. You have to press a key for every -move of your yellow dot. In this experiment you can collect green diamond -shaped tokens -<img src="@CODEBASE_URL@/images/gem-token.gif"> and you will -earn two cents for each collected token. To collect a token, simply move your -yellow dot over a green token and press the <b>space bar</b>. If you move -over a token without pressing the <b>space bar</> you will NOT collect that -token. -</p> - -<p> -The tokens that you collect have the potential to regenerate. After you have -collected a green token, a new token can once again appear on that empty cell. -However, the rate at which new tokens will appear depends on the number of -adjacent cells that still have tokens. The more tokens in the 8 cells around -an empty cell, the faster a new token will appear on that empty cell. In -other words, the presence of tokens will generate new tokens over time. Thus -the middle cell in Image 1 denoted with X will be regenerated at a faster rate -than the middle cell in Image 2. When all neighboring cells are empty, there -is no renewal. - -<table width="100%"> -<tr> -<td align="center"><b>Image 1</b></td> -<td align="center"><b>Image 2</b></td> -</tr> -<tr> -<td align="center"> -<img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> -</td> -<td align="center"> -<img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> -</td> -</tr> -</table> -<hr> -<h3>Practice Round Instructions</h3> -<hr> -<p> -You will now have four minutes to practice with the experimental environment. -The decisions you make in this round will NOT influence your earnings. At the -beginning of the practice round half of the cells are occupied with green -tokens. The environment is a 14 x 14 grid of cells. -</p> -<p> -When you push the <b>R</b> key you will reset the distribution of -the tokens to randomly occupying half of the cells with green tokens. -</p> - -<p><center><b>Please do not communicate with any other participant.</b></center></p> -<p>If you have any questions please raise your hand. <b>Do you have any -questions so far?</b></p> -]]> -</entry> - -<entry key="quiz-instructions"> -<![CDATA[ -<p> -Before we begin the practice round you need to answer the following questions -correctly. You can only continue when you have answered all questions -correctly. If an error is made you will need to answer the questions again. -</p> -<br> -<form> -Which of the statements is incorrect? <br> -<input type="radio" name="q1" value="A">Your decisions of where to collect tokens affect the regeneration of tokens.<br> -<input type="radio" name="q1" value="B">When you have collected all tokens on -the screen, no new tokens will appear.<br> -<input type="radio" name="q1" value="C">Tokens grow from the middle of the -screen.<br> -<input type="radio" name="q1" value="D">In order to collect a token you need -to press the space bar while your avatar is on a cell with a token.<br> -<br><br> - -Which sequence of situations is not possible? <br> -<img src="@CODEBASE_URL@/images/question2.jpg"><br> -<input type="radio" name="q2" value="A">A<br> -<input type="radio" name="q2" value="B">B<br> -<input type="radio" name="q2" value="C">C<br> -<br><br> - -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round3.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round3.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> -<entry key='always-explicit'>true</entry> -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> -<!-- -<entry key="patchy">true</entry> -<entry key="top-initial-distribution">0.50</entry> -<entry key="top-rate">0.02</entry> -<entry key="bottom-initial-distribution">0.25</entry> -<entry key="bottom-rate">0.01</entry> ---> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 4 Instructions</h3> -<hr> -<p> -The length of the round is 4 minutes. Like in the practice round you can collect green tokens. This time -you earn <b>two cents</b> for each token collected. This time you -<b>cannot</b> reset the distribution of green tokens. -</p> -<p> -In this round the renewable resource will become four times bigger. You will -share this larger environment with four other players in this room. Each of -you has been randomly assigned to one of several equal-sized groups. Each of -the groups is collecting tokens from an identical, but separate resource. -</p> -<p> -Each of you has been assigned a number from 1 to 4. The other three players -will appear on the screen as blue dots -<img src="@CODEBASE_URL@/images/gem-other.gif"> with a white -number embedded in the dot. On the top right corner of the screen you can see -how many tokens each player has collected. -</p> -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round4.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d/round4.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> -<properties> -<comment>Foraging XML-ized experiment round configuration</comment> -<entry key="display-group-tokens">true</entry> -<entry key="clients-per-group">4</entry> -<entry key="duration">240</entry> -<entry key="resource-depth">28</entry> -<entry key="resource-width">28</entry> - -<entry key='always-explicit'>true</entry> - -<entry key="initial-distribution">.25</entry> -<entry key="regrowth-rate">0.01</entry> - -<!-- before this round begins, we have a chat session --> -<entry key="chat-enabled">true</entry> -<entry key="chat-duration">240</entry> - -<entry key="instructions"> -<![CDATA[ -<h3>Round 5 Instructions</h3> -<hr> -<p> -This round is same as the previous round. However, before the next round starts you -will be given the opportunity to anonymously communicate by text messages for -four minutes with the other participants in your group. You can use this -opportunity to discuss the experiment and coordinate your actions to improve -your earnings. You may not promise them side-payments after the experiment is -completed or make any threats. You are also not allowed to reveal your real -identity. We are monitoring the chat traffic while you chat. -</p> - -<p> -If you have any questions please raise your hand. <b>Do you have any -questions so far?</b> -</p> -]]> -</entry> - -<entry key="chat-instructions"> -<![CDATA[ -<p> -You can now chat with the other participants in your group for 4 minutes -total. During the chat round, you may communicate about any aspect of the -experiment that you would like to discuss with other participants with whom -you have been matched. You may not promise them side-payments after the -experiment is completed or threaten them with any consequence after the -experiment is finished. We are monitoring the chat traffic while you chat. If -we see that somebody reveals his or her identity, we have to stop the -experiment and remove the whole group from which this person is a member out -of this room. -</p> -<p> -You will see other participants labeled as "1", "2","3", or "4" in the chat -box. You can send a chat message by typing into the textfield at the bottom -of the screen and then clicking the "send" button with your mouse or pressing -the "enter" key on your keyboard. </p> -]]> -</entry> - -<entry key="private-chat-instructions"> -<![CDATA[ -You may send private messages to a specific participant by clicking on the -appropriately labeled button (1, 2, 3, or 4) before typing your message in the -chat box and sending it. By default you are communicating with all members of -your group. -]]> -</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number is called, -and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> -]]> -</entry> - -</properties> diff -r aff5fedb6cb23aa21d41ec70a79a08bcd3daef1a -r 869d00fdf8464cb863bcf6168ceae0750182fdf2 src/main/resources/configuration/asu-experiments/defunct/abstract-2d/server.xml --- a/src/main/resources/configuration/asu-experiments/defunct/abstract-2d... [truncated message content] |
From: Bitbucket <com...@bi...> - 2012-01-18 23:53:19
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/d597c5c143af/ changeset: d597c5c143af user: alllee date: 2012-01-19 00:53:21 summary: more minor tweaks to facilitator debriefing affected #: 4 files diff -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 -r d597c5c143afb22abd1c457e850da5c52a3b1f81 src/main/resources/configuration/asu-experiments/2011/t1/server.xml --- a/src/main/resources/configuration/asu-experiments/2011/t1/server.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t1/server.xml @@ -190,7 +190,7 @@ </entry><entry key='facilitator-debriefing'><![CDATA[ -<h1>Round {self.roundNumber} results</h1> +<h3>Round {self.roundNumber} results</h3><hr><table border=1 cellspacing=3 cellpadding=3><tr> diff -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 -r d597c5c143afb22abd1c457e850da5c52a3b1f81 src/main/resources/configuration/asu-experiments/2011/t2/server.xml --- a/src/main/resources/configuration/asu-experiments/2011/t2/server.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t2/server.xml @@ -190,7 +190,7 @@ </entry><entry key='facilitator-debriefing'><![CDATA[ -<h1>Round {self.roundNumber} results</h1> +<h3>Round {self.roundNumber} results</h3><hr><table border=1 cellspacing=3 cellpadding=3><tr> diff -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 -r d597c5c143afb22abd1c457e850da5c52a3b1f81 src/main/resources/web/client.jnlp --- a/src/main/resources/web/client.jnlp +++ b/src/main/resources/web/client.jnlp @@ -3,7 +3,7 @@ <jnlp spec="1.6+" codebase="@CODEBASE_URL@" href="client.jnlp"><information><title>Virtual Commons Experiment</title> - <vendor>The Virtual Commons, Center for the Study of Institutional Diversity, School of Human Evolution and Social Change, Dr. Marco Janssen, Allen Lee, Deepali Bhagvat</vendor> + <vendor>The Virtual Commons, a software initiative led by the Center for the Study of Institutional Diversity at Arizona State University</vendor><homepage href="http://commons.asu.edu"/><description>An experiment brought to you courtesy of The Virtual Commons - http://commons.asu.edu</description></information> diff -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 -r d597c5c143afb22abd1c457e850da5c52a3b1f81 src/main/resources/web/facilitator.jnlp --- a/src/main/resources/web/facilitator.jnlp +++ b/src/main/resources/web/facilitator.jnlp @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- JNLP File for CSAN 2D Facilitator --> +<!-- JNLP File for foraging facilitator --><jnlp spec="1.6+" codebase="@CODEBASE_URL@" href="facilitator.jnlp"><information><title>Virtual Commons Experiment</title> - <vendor>The Virtual Commons, Center for the Study of Institutional Diversity, School of Human Evolution and Social Change, Dr. Marco Janssen, Allen Lee, Deepali Bhagvat</vendor> + <vendor>The Virtual Commons, a software initiative led by the Center for the Study of Institutional Diversity at Arizona State University</vendor><homepage href="http://commons.asu.edu"/><description>Foraging 2D facilitator interface to control the Foraging 2D experiment.</description><icon href="commons.gif"/> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 23:44:20
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/0dd69e7eea4b/ changeset: 0dd69e7eea4b user: alllee date: 2012-01-19 00:44:13 summary: minor tweaks / hygiene to facilitator information editor pane and debriefing formatting affected #: 3 files diff -r ea241bd8ccffe289873bcbf7291e06676cbff636 -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java @@ -267,7 +267,7 @@ JLabel messagePanelLabel = new JLabel("System messages"); messagePanelLabel.setFont(UserInterfaceUtils.DEFAULT_PLAIN_FONT); messagePanel.add(messagePanelLabel, BorderLayout.NORTH); - Dimension minimumSize = new Dimension(600, 200); + Dimension minimumSize = new Dimension(600, 50); messagePanel.setMinimumSize(minimumSize); informationScrollPane.setMinimumSize(minimumSize); messageEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); @@ -275,7 +275,7 @@ messagePanel.add(messageScrollPane, BorderLayout.CENTER); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, informationScrollPane, messagePanel); add(splitPane, BorderLayout.CENTER); - double proportion = 0.6d; + double proportion = 0.7d; splitPane.setDividerLocation(proportion); splitPane.setResizeWeight(proportion); // add censored chat component if necessary @@ -341,17 +341,16 @@ boolean showInstructionsNext = true; if (upcomingRound.isTrustGameEnabled()) { showTrustGameMenuItem.setEnabled(true); - instructionsBuilder.append("<h2>TRUST GAME: Run a trust game next. Click on the Round menu and select Show Trust Game</h2>"); + addMessage("TRUST GAME: Run a trust game next. Click on the Round menu and select Show Trust Game<"); showInstructionsNext = false; } if (upcomingRound.isChatRoundEnabled()) { startChatMenuItem.setEnabled(true); - instructionsBuilder - .append("<h2>COMMUNICATION ROUND: There is a communication round configured to run at the end of this round. Click on the Round menu and select Start Chat Round</h2>"); + addMessage("COMMUNICATION ROUND: There is a communication round configured to run at the end of this round. Click on the Round menu and select Start Chat Round"); showInstructionsNext = false; } if (showInstructionsNext) { - instructionsBuilder.append("<h2>SHOW INSTRUCTIONS: Click on the Round menu and select Show instructions when ready.</h2>"); + addMessage("SHOW INSTRUCTIONS: Click on the Round menu and select Show instructions when ready."); } } informationEditorPane.setText(instructionsBuilder.toString()); diff -r ea241bd8ccffe289873bcbf7291e06676cbff636 -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 src/main/resources/configuration/asu-experiments/2011/t1/server.xml --- a/src/main/resources/configuration/asu-experiments/2011/t1/server.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t1/server.xml @@ -197,7 +197,7 @@ <th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Trust game earnings</th><th>Total income</th></tr> {clientDataList: {data | -<tr><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> +<tr align="RIGHT"><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> }} </table> ]]> @@ -239,9 +239,6 @@ When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. </p> {endif} - - - ]]></entry></properties> diff -r ea241bd8ccffe289873bcbf7291e06676cbff636 -r 0dd69e7eea4b7a7396df447911c26a48240b59c7 src/main/resources/configuration/asu-experiments/2011/t2/server.xml --- a/src/main/resources/configuration/asu-experiments/2011/t2/server.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t2/server.xml @@ -197,7 +197,7 @@ <th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Trust game earnings</th><th>Total income</th></tr> {clientDataList: {data | -<tr><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> +<tr align="RIGHT"><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> }} </table> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 23:22:49
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/ea241bd8ccff/ changeset: ea241bd8ccff user: alllee date: 2012-01-19 00:22:42 summary: trying to get rich text selection to the clipboard working (otherwise Word shows "<html>..blah</html>" after a copy / paste from the facilitator). affected #: 1 file diff -r e25bcc7305e4797fb15f0dd12acea4c82030786d -r ea241bd8ccffe289873bcbf7291e06676cbff636 src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java @@ -2,10 +2,18 @@ import java.awt.BorderLayout; import java.awt.Dimension; -import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.io.StringReader; +import java.util.Arrays; import java.util.Map; import java.util.TreeSet; @@ -42,7 +50,7 @@ private static final long serialVersionUID = -9067316316468488000L; private Facilitator facilitator; - + private FacilitatorChatPanel facilitatorChatPanel; private JScrollPane informationScrollPane; @@ -50,11 +58,11 @@ private JEditorPane informationEditorPane; private JLabel timeLeftLabel; - + private JMenuItem copyToClipboardMenuItem; private JMenuItem showInstructionsMenuItem; - + private JMenuItem startRoundMenuItem; private JMenuItem stopRoundMenuItem; @@ -66,7 +74,7 @@ private JMenuItem startChatMenuItem; private JMenuItem showTrustGameMenuItem; @SuppressWarnings("unused") - private JMenuItem showVotingInstructionsMenuItem; + private JMenuItem showVotingInstructionsMenuItem; @SuppressWarnings("unused") private JMenuItem showVoteScreenMenuItem; @SuppressWarnings("unused") @@ -77,7 +85,7 @@ private StringBuilder instructionsBuilder; private int completedQuizzes; private int completedTrustGames; - + private ClipboardService clipboardService; public FacilitatorWindow(Dimension dimension, Facilitator facilitator) { @@ -86,24 +94,24 @@ createMenu(); // FIXME: only applicable for standalone java app version - also // seems to be causing a NPE for some reason - // centerOnScreen(); - // frame.setVisible(true); + // centerOnScreen(); + // frame.setVisible(true); } - + public void initializeReplay() { throw new UnsupportedOperationException("Replay currently unimplemented."); } - + public void initializeReplayRound() { throw new UnsupportedOperationException("Replay currently unimplemented."); } /* - * This method gets called after the end of each round + * This method gets called after the end of each round */ public void displayInstructions() { - -// repaint(); + + // repaint(); } /* @@ -111,26 +119,26 @@ */ public void displayGame() { startChatMenuItem.setEnabled(false); - showInstructionsMenuItem.setEnabled(false); + showInstructionsMenuItem.setEnabled(false); startRoundMenuItem.setEnabled(false); stopRoundMenuItem.setEnabled(true); } private JMenuBar createMenu() { menuBar = new JMenuBar(); - //Round menu + // Round menu JMenu menu = new JMenu("Round"); menu.setMnemonic(KeyEvent.VK_R); startChatMenuItem = new JMenuItem("Start chat"); startChatMenuItem.setEnabled(true); startChatMenuItem.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - facilitator.sendBeginChatRoundRequest(); - } + public void actionPerformed(ActionEvent e) { + facilitator.sendBeginChatRoundRequest(); + } }); menu.add(startChatMenuItem); - + showInstructionsMenuItem = new JMenuItem("Show Instructions"); showInstructionsMenuItem.setMnemonic(KeyEvent.VK_I); showInstructionsMenuItem.addActionListener(new ActionListener() { @@ -141,17 +149,15 @@ } }); menu.add(showInstructionsMenuItem); - + showTrustGameMenuItem = new JMenuItem("Show Trust Game"); showTrustGameMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - facilitator.sendShowTrustGameRequest(); + facilitator.sendShowTrustGameRequest(); } }); menu.add(showTrustGameMenuItem); - - startRoundMenuItem = new JMenuItem("Start"); startRoundMenuItem.setMnemonic(KeyEvent.VK_T); startRoundMenuItem.setEnabled(false); @@ -172,10 +178,10 @@ }); menu.add(stopRoundMenuItem); menuBar.add(menu); - + // voting menu menu = new JMenu("Voting"); - + showVotingInstructionsMenuItem = createMenuItem(menu, "Show voting instructions", new ActionListener() { public void actionPerformed(ActionEvent e) { facilitator.sendShowVotingInstructionsRequest(); @@ -187,7 +193,7 @@ } }); menuBar.add(menu); - + // survey menu menu = new JMenu("Survey"); showSurveyInstructionsMenuItem = createMenuItem(menu, "Show survey instructions", new ActionListener() { @@ -197,7 +203,7 @@ }); menuBar.add(menu); - //Configuration menu + // Configuration menu menu = new JMenu("Configuration"); menu.setMnemonic(KeyEvent.VK_C); @@ -209,14 +215,14 @@ } }); menu.add(menuItem); - + copyToClipboardMenuItem = createMenuItem(menu, "Copy to clipboard", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - String text = messageEditorPane.getSelectedText(); + String text = informationEditorPane.getSelectedText(); if (text == null || text.trim().isEmpty()) { addMessage("No text selected, copying all text in the editor pane to the clipboard."); - text = messageEditorPane.getText(); + text = informationEditorPane.getText(); if (text == null || text.trim().isEmpty()) { // if text is still empty, give up JOptionPane.showMessageDialog(FacilitatorWindow.this, "Unable to find any text to copy to the clipboard."); @@ -225,16 +231,17 @@ } ClipboardService service = getClipboardService(); if (service != null) { - service.setContents(new StringSelection(text)); + HtmlSelection selection = new HtmlSelection(text); + service.setContents(selection); } } }); - + menuBar.add(menu); return menuBar; } - + private JMenuItem createMenuItem(JMenu menu, String name, ActionListener listener) { JMenuItem menuItem = new JMenuItem(name); menuItem.addActionListener(listener); @@ -245,14 +252,13 @@ public JMenuBar getMenuBar() { return menuBar; } + private void initGuiComponents() { setLayout(new BorderLayout(3, 3)); - // setBackground(Color.WHITE); + // setBackground(Color.WHITE); informationEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); - - informationScrollPane = new JScrollPane(informationEditorPane); setInstructions(facilitator.getServerConfiguration().getFacilitatorInstructions()); @@ -294,7 +300,7 @@ timeLeftLabel.setText("Time left: " + (timeLeft / 1000)); repaint(); } - + // FIXME: get rid of duplication here & displayDebriefing.. public void updateDebriefing(FacilitatorSanctionUpdateEvent event) { Map<Identifier, ClientData> clientDataMap = event.getClientDataMap(); @@ -305,34 +311,34 @@ for (Identifier clientId : orderedSet) { ClientData data = clientDataMap.get(clientId); buffer.append(String.format( - "<tr><td>%s</td>" + + "<tr><td>%s</td>" + "<td align='center'>%d</td>" + "<td align='center'>$%3.2f</td>" + "<td align='center'>$%3.2f</td></tr>", - clientId.toString(), - data.getCurrentTokens(), - getIncome(data.getCurrentTokens()), - getIncome(data.getTotalTokens()))); + clientId.toString(), + data.getCurrentTokens(), + getIncome(data.getCurrentTokens()), + getIncome(data.getTotalTokens()))); } buffer.append("</tbody></table><hr>"); if (event.isLastRound()) { buffer.append("<h2><font color='blue'>The experiment is over. Please prepare payments.</font></h2>"); - } + } informationEditorPane.setText(buffer.toString()); } public void displayDebriefing(ServerDataModel serverDataModel) { - RoundConfiguration roundConfiguration = serverDataModel.getRoundConfiguration(); - System.err.println("Displaying debriefing: " + roundConfiguration); - instructionsBuilder = new StringBuilder(roundConfiguration.generateFacilitatorDebriefing(serverDataModel)); + RoundConfiguration roundConfiguration = serverDataModel.getRoundConfiguration(); + System.err.println("Displaying debriefing: " + roundConfiguration); + instructionsBuilder = new StringBuilder(roundConfiguration.generateFacilitatorDebriefing(serverDataModel)); showInstructionsMenuItem.setEnabled(true); stopRoundMenuItem.setEnabled(false); if (serverDataModel.isLastRound()) { - instructionsBuilder.append(facilitator.getServerConfiguration().getFinalRoundFacilitatorInstructions()); + instructionsBuilder.append(facilitator.getServerConfiguration().getFinalRoundFacilitatorInstructions()); } else { - RoundConfiguration upcomingRound = roundConfiguration.nextRound(); - boolean showInstructionsNext = true; + RoundConfiguration upcomingRound = roundConfiguration.nextRound(); + boolean showInstructionsNext = true; if (upcomingRound.isTrustGameEnabled()) { showTrustGameMenuItem.setEnabled(true); instructionsBuilder.append("<h2>TRUST GAME: Run a trust game next. Click on the Round menu and select Show Trust Game</h2>"); @@ -340,7 +346,8 @@ } if (upcomingRound.isChatRoundEnabled()) { startChatMenuItem.setEnabled(true); - instructionsBuilder.append("<h2>COMMUNICATION ROUND: There is a communication round configured to run at the end of this round. Click on the Round menu and select Start Chat Round</h2>"); + instructionsBuilder + .append("<h2>COMMUNICATION ROUND: There is a communication round configured to run at the end of this round. Click on the Round menu and select Start Chat Round</h2>"); showInstructionsNext = false; } if (showInstructionsNext) { @@ -359,63 +366,106 @@ } public void endRound(FacilitatorEndRoundEvent endRoundEvent) { - System.out.println("Ending round: " + endRoundEvent); - ServerDataModel serverDataModel = endRoundEvent.getServerDataModel(); + System.out.println("Ending round: " + endRoundEvent); + ServerDataModel serverDataModel = endRoundEvent.getServerDataModel(); displayDebriefing(serverDataModel); completedQuizzes = 0; completedTrustGames = 0; } - + public void setRoundConfiguration(RoundConfiguration roundConfiguration) { } public void configureForReplay() { - //Enable the replay menus + // Enable the replay menus loadExperimentMenuItem.setEnabled(true); - //Disable all other menus + // Disable all other menus startRoundMenuItem.setEnabled(false); stopRoundMenuItem.setEnabled(false); } - + public void addMessage(String message) { try { messageEditorPane.getDocument().insertString(0, "-----\n" + message + "\n", null); + } catch (BadLocationException exception) { + exception.printStackTrace(); } - catch (BadLocationException exception) { - exception.printStackTrace(); - } } public void quizCompleted(QuizCompletedEvent event) { completedQuizzes++; addMessage(String.format("%d completed quizzes (%s)", completedQuizzes, event)); } - + public void trustGameSubmitted(TrustGameSubmissionEvent event) { completedTrustGames++; addMessage(String.format("%d completed trust games (%s)", completedTrustGames, event)); } - public void updateTrustGame(TrustGameResultsFacilitatorEvent event) { - addMessage("Received new trust game payment data, recalculating debriefing."); - displayDebriefing(event.getServerDataModel()); - for (String result: event.getTrustGameLog()) { - addMessage(result); - } - } - - public ClipboardService getClipboardService() { - if (clipboardService == null) { - try { + public void updateTrustGame(TrustGameResultsFacilitatorEvent event) { + addMessage("Received new trust game payment data, recalculating debriefing."); + displayDebriefing(event.getServerDataModel()); + for (String result : event.getTrustGameLog()) { + addMessage(result); + } + } + + public ClipboardService getClipboardService() { + if (clipboardService == null) { + try { clipboardService = (ClipboardService) ServiceManager.lookup(JAVAX_JNLP_CLIPBOARD_SERVICE); } catch (UnavailableServiceException e) { e.printStackTrace(); addMessage("Unable to load the ClipboardService for all your clipboard needs. Sorry!"); } - } - return clipboardService; - } + } + return clipboardService; + } + + private static class HtmlSelection implements Transferable { + + private static DataFlavor[] htmlFlavors = new DataFlavor[3]; + private final String html; + static { + try { + htmlFlavors[0] = new DataFlavor("text/html;class=java.lang.String"); + htmlFlavors[1] = new DataFlavor("text/html;class=java.io.Reader"); + htmlFlavors[2] = new DataFlavor("text/html;charset=unicode;class=java.io.InputStream"); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + } + + public HtmlSelection(String html) { + this.html = html; + } + + @Override + public DataFlavor[] getTransferDataFlavors() { + return htmlFlavors; + } + + @Override + public boolean isDataFlavorSupported(DataFlavor flavor) { + return Arrays.asList(htmlFlavors).contains(flavor); + } + + @Override + public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { + if (String.class.equals(flavor.getRepresentationClass())) { + return html; + } + else if (Reader.class.equals(flavor.getRepresentationClass())) { + return new StringReader(html); + } + else if (InputStream.class.equals(flavor.getRepresentationClass())) { + return new ByteArrayInputStream(html.getBytes()); + } + throw new UnsupportedFlavorException(flavor); + } + + } } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 22:54:32
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/e25bcc7305e4/ changeset: e25bcc7305e4 user: alllee date: 2012-01-18 23:54:33 summary: adding java webstart jar to archiva + maven + ivy affected #: 2 files diff -r dedeb04ed68a6ce4641e9860951306965ecb5450 -r e25bcc7305e4797fb15f0dd12acea4c82030786d ivy.xml --- a/ivy.xml +++ b/ivy.xml @@ -8,6 +8,7 @@ <dependency org="edu.asu.commons" name="csidex" rev="0.2-SNAPSHOT" /><dependency org="net.java.dev.jogl" name="jogl" rev="1.1.1-rc6"/><dependency org="javax.media" name="jmf" rev="2.1.1e"/> + <dependency org="javax.jnlp" name="javaws" rev="1.6.0_30"/><dependency org="org.antlr" name="stringtemplate" rev="4.0.2" conf="*->*,!sources,!javadoc"/></dependencies></ivy-module> diff -r dedeb04ed68a6ce4641e9860951306965ecb5450 -r e25bcc7305e4797fb15f0dd12acea4c82030786d pom.xml --- a/pom.xml +++ b/pom.xml @@ -73,6 +73,11 @@ </repositories><dependencies><dependency> + <groupId>javax.jnlp</groupId> + <artifactId>javaws</artifactId> + <version>1.6.0_30</version> + </dependency> + <dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.5</version> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 22:37:21
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/fc33ae308d09/ changeset: fc33ae308d09 user: alllee date: 2012-01-18 23:36:07 summary: adding readme to each configuration directory. it might be good to have this be a machine-readable file as well affected #: 1 file diff -r 6ccfea8f99a7cd31491a0589e8c0bacc3e4db4bf -r fc33ae308d097ed59292b5f09582100c578bd43a src/main/resources/configuration/asu-experiments/2011/t1/README.txt --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t1/README.txt @@ -0,0 +1,13 @@ +Fall 2011/Spring 2012 Foraging experiments, Treatment 1 + +Stationary resource +Full vision + +Practice Round +Trust Game +Round 1-3 +Trust Game +Round 4-6, in-round communication +Trust Game +Survey + https://bitbucket.org/virtualcommons/foraging/changeset/dedeb04ed68a/ changeset: dedeb04ed68a user: alllee date: 2012-01-18 23:37:14 summary: adding javax.jnlp.ClipboardService support so we can transfer the facilitator debriefings to the system clipboard (ostensibly a text editor keeping track of payments etc). fixes issue 32 affected #: 1 file diff -r fc33ae308d097ed59292b5f09582100c578bd43a -r dedeb04ed68a6ce4641e9860951306965ecb5450 src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java @@ -2,17 +2,22 @@ import java.awt.BorderLayout; import java.awt.Dimension; +import java.awt.datatransfer.StringSelection; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.util.Map; import java.util.TreeSet; +import javax.jnlp.ClipboardService; +import javax.jnlp.ServiceManager; +import javax.jnlp.UnavailableServiceException; import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -30,9 +35,9 @@ import edu.asu.commons.ui.HtmlEditorPane; import edu.asu.commons.ui.UserInterfaceUtils; +public class FacilitatorWindow extends JPanel { - -public class FacilitatorWindow extends JPanel { + private static final String JAVAX_JNLP_CLIPBOARD_SERVICE = "javax.jnlp.ClipboardService"; private static final long serialVersionUID = -9067316316468488000L; @@ -45,6 +50,8 @@ private JEditorPane informationEditorPane; private JLabel timeLeftLabel; + + private JMenuItem copyToClipboardMenuItem; private JMenuItem showInstructionsMenuItem; @@ -56,8 +63,6 @@ private JMenuBar menuBar; - private int completedQuizzes; - private JMenuItem startChatMenuItem; private JMenuItem showTrustGameMenuItem; @SuppressWarnings("unused") @@ -70,8 +75,10 @@ private HtmlEditorPane messageEditorPane; private StringBuilder instructionsBuilder; - + private int completedQuizzes; private int completedTrustGames; + + private ClipboardService clipboardService; public FacilitatorWindow(Dimension dimension, Facilitator facilitator) { this.facilitator = facilitator; @@ -80,7 +87,7 @@ // FIXME: only applicable for standalone java app version - also // seems to be causing a NPE for some reason // centerOnScreen(); - // frame.setVisible(true); + // frame.setVisible(true); } public void initializeReplay() { @@ -202,6 +209,27 @@ } }); menu.add(menuItem); + + copyToClipboardMenuItem = createMenuItem(menu, "Copy to clipboard", new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String text = messageEditorPane.getSelectedText(); + if (text == null || text.trim().isEmpty()) { + addMessage("No text selected, copying all text in the editor pane to the clipboard."); + text = messageEditorPane.getText(); + if (text == null || text.trim().isEmpty()) { + // if text is still empty, give up + JOptionPane.showMessageDialog(FacilitatorWindow.this, "Unable to find any text to copy to the clipboard."); + return; + } + } + ClipboardService service = getClipboardService(); + if (service != null) { + service.setContents(new StringSelection(text)); + } + } + }); + menuBar.add(menu); return menuBar; @@ -377,5 +405,17 @@ addMessage(result); } } + + public ClipboardService getClipboardService() { + if (clipboardService == null) { + try { + clipboardService = (ClipboardService) ServiceManager.lookup(JAVAX_JNLP_CLIPBOARD_SERVICE); + } catch (UnavailableServiceException e) { + e.printStackTrace(); + addMessage("Unable to load the ClipboardService for all your clipboard needs. Sorry!"); + } + } + return clipboardService; + } } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 21:54:15
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/6ccfea8f99a7/ changeset: 6ccfea8f99a7 user: alllee date: 2012-01-18 22:54:17 summary: errant entry close tag affected #: 2 files diff -r b4bf8539edffa681ac99aba2b8c1402671d44590 -r 6ccfea8f99a7cd31491a0589e8c0bacc3e4db4bf src/main/resources/configuration/asu-experiments/2011/t2/round6.xml --- a/src/main/resources/configuration/asu-experiments/2011/t2/round6.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round6.xml @@ -11,5 +11,4 @@ <entry key='always-explicit'>true</entry><entry key='max-cell-occupancy'>1</entry><entry key='trust-game'>true</entry> -</entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 21:17:51
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b4bf8539edff/ changeset: b4bf8539edff user: alllee date: 2012-01-18 22:17:52 summary: adding second treatment configuration for asu experiments affected #: 10 files diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -244,6 +244,7 @@ } SocketIdentifier clientSocketId = (SocketIdentifier) clientData.getId(); clientSocketId.setStationNumber(request.getStationNumber()); + sendFacilitatorMessage(String.format("Updating %s with station number %s", clientSocketId, request.getStationNumber())); } }); // client handlers diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/README.txt --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/README.txt @@ -0,0 +1,13 @@ +Fall 2011/Spring 2012 Foraging experiments, Treatment 2 + +Stationary resource +Full vision + +Practice Round +Trust Game +Round 1-3, in-round communication +Trust Game +Round 4-6 +Trust Game +Survey + diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round0.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round0.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="resource-width">13</entry> +<entry key="resource-depth">13</entry> +<entry key="practice-round">true</entry> +<entry key="private-property">true</entry> +<entry key="duration">240</entry> + +<entry key="quiz">true</entry> +<entry key="q1">C</entry> +<entry key="q2">B</entry> + +<entry key='instructions'> +<![CDATA[ +<h2>Practice Round Instructions</h2> +<hr> +<p> + Once everyone has finished the quiz, we will start a practice round of the token + task. +</p> +<p> +During the practice round, you will have {duration} to practice with the +experimental environment. The decisions you make in this round will NOT influence +your earnings. At the beginning of the practice round {initialDistribution} of the +cells are occupied with green tokens. The environment is a {resourceWidth} x +{resourceDepth} grid of cells. +</p> +<p> +During this practice round, and <b>only during</b> this practice round, you are able +to reset the tokens displayed on the screen by pressing the <b>R</b> key. When you +press the <b>R</b> key you will reset the distribution of the tokens to randomly occupying +{initialDistribution} of the cells with tokens. +</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry> + +<entry key="quiz-instructions"> +<![CDATA[ +<h2>Quiz</h2> +<hr> +<p> + In a moment, you will do a practice round of the token task. Before we go to + the practice round, answer the following questions to make sure you understand + the instructions. You will earn {quizCorrectAnswerReward} for each correct answer. +</p> +<br><br> +<form> +<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> +<input type="radio" name="q1" value="A">A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> +<input type="radio" name="q1" value="B">B. When you have collected all tokens on the screen, no new tokens will appear.<br> +<input type="radio" name="q1" value="C">C. Tokens grow from the middle of the screen.<br> +<input type="radio" name="q1" value="D">D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> +<br><br> +<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> +<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> +<input type="radio" name="q2" value="A">A<br> +<input type="radio" name="q2" value="B">B<br> +<input type="radio" name="q2" value="C">C<br> +<input type="submit" name="submit" value="Submit"><br> +</form> +]]> +</entry> +<entry key='quiz-results'> + <![CDATA[ + <h2>Quiz Results</h2> + <hr> + <p> + {if (allCorrect)} + You have answered all the questions correctly and earned <b>{totalQuizEarnings}</b>. + {else} + You answered {numberCorrect} out of {totalQuestions} questions correctly and earned <b>{totalQuizEarnings}</b>. Questions you've answered + incorrectly are highlighted in red. Please see below for more details. + {endif} + </p> + <br><hr> +<form> +<span class='q1'>Q1. Which of these statements is NOT correct?</span><br> + <b>{incorrect_q1} + In this question, "A", "B", and "D" are all true. "C" is false. Tokens only + regenerate when there are other tokens present in their immediately neighboring + cells. They do not spontaneously generate from the middle of the screen. + </b> +<br> +A. Your decisions of where to collect tokens affects the regeneration of tokens.<br> +B. When you have collected all tokens on the screen, no new tokens will appear.<br> +C. Tokens grow from the middle of the screen.<br> +D. To collect a token you need to press the space bar while your yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img> is on a cell with a token.<br> +<br> +<span class='q2'>Q2. Which sequence of situations is not possible?</span><br> + <b> + {incorrect_q2} + In this question, sequence "B" is not possible. Tokens cannot regenerate on an empty screen as shown in sequence B. + </b> + <br> +<img src="@CODEBASE_URL@/images/question2.jpg"></img><br> +</form> + ]]> +</entry> +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round1.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round1.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="duration">240</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> + +<entry key='trust-game'>true</entry> +<entry key='in-round-chat-enabled'>true</entry> +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> + +<entry key="instructions"> +<![CDATA[ +<h1>Round {roundNumber} Instructions</h1> +<hr> +<p> + This is the first round of the experiment. The length of the round is + {duration}. As in the practice round you can collect green tokens but now + you will earn <b>{dollarsPerToken}</b> for each token collected. You + <b>cannot</b> reset the distribution of green tokens. +</p> +<h3>Groups</h3> +<hr> +<p> +In this round the renewable resource will become five times bigger. You will share +this larger environment with four other random players in this room. Each +participant in the room has been randomly assigned to one of several equal-sized +{clientsPerGroup} person groups and everyone in your group has been randomly +assigned a number from 1 to {clientsPerGroup}. You will stay in the same group for +the entire experiment, and each person's number from 1 to {clientsPerGroup} will +remain the same throughout the experiment. The other members of your group will +appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> +with a white number embedded in the dot. +</p> +<p> + In each round of the token task, you can see how many tokens each player has + collected at the top right corner of the screen. On the top left corner of the + screen you will see the remaining time in the round. +</p> +<h3>In round chat</h3> +<hr> + <p> + You will be able to communicate with the other participants in your group + <b>during</b> the round. To communicate, hit the enter key, type your + message, and then hit the enter key again. You must hit the enter key + before every message you type, otherwise control will return to the game + screen where you can use the arrow keys to move around. + </p> + +<h3>Anonymity</h3> +<hr> +<p> + Because group membership was randomly assigned by the computer, neither you nor + the experimenter will be able to identify which person in the room has been + assigned to a particular group or number within a group. Your anonymity is + guaranteed. +</p> +<h3>Tokens</h3> +<hr> + <p> + Each group has its own set of token resources. + </p> +<p><b>Do you have any questions so far?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry> +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round2.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round2.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="duration">240</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> +<entry key='in-round-chat-enabled'>true</entry> +<entry key='initial-distribution'>.25</entry> + +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> + +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round3.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round3.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="duration">240</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> +<entry key='in-round-chat-enabled'>true</entry> +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> + +<!-- resource regrowth parameters --> +<entry key="initial-distribution">.25</entry> + + +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round4.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round4.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> +<entry key="duration">240</entry> + +<!-- have a trust game before this round begins --> +<entry key='trust-game'>true</entry> +<!-- enable field of vision for tokens and subjects --> + +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> + +<entry key="initial-distribution">.25</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round {roundNumber} Instructions</h3> +<hr> +<p> + This round is the same as the previous rounds with one exception. You will no + longer able to communicate with the other participants in your group + <b>during</b> the round. +</p> + +<p> + The length of this round is {duration}. +</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry> +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round5.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round5.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> +<entry key="duration">240</entry> + +<entry key="initial-distribution">.25</entry> + +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> + +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/round6.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/round6.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Foraging XML-ized experiment round configuration</comment> +<entry key="display-group-tokens">true</entry> +<entry key="clients-per-group">5</entry> +<entry key="resource-depth">29</entry> +<entry key="resource-width">29</entry> +<entry key="duration">240</entry> +<entry key="initial-distribution">.25</entry> +<entry key='always-explicit'>true</entry> +<entry key='max-cell-occupancy'>1</entry> +<entry key='trust-game'>true</entry> +</entry> +</properties> diff -r d165de49851eed09b332995cee27fd1e45a23fdf -r b4bf8539edffa681ac99aba2b8c1402671d44590 src/main/resources/configuration/asu-experiments/2011/t2/server.xml --- /dev/null +++ b/src/main/resources/configuration/asu-experiments/2011/t2/server.xml @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Costly Sanctioning XML-ized experiment round configuration</comment> +<entry key="hostname">@SERVER_ADDRESS@</entry> +<entry key="port">@PORT_NUMBER@</entry> +<entry key="round0">round0.xml</entry> +<entry key="round1">round1.xml</entry> +<entry key="round2">round2.xml</entry> +<entry key="round3">round3.xml</entry> +<entry key="round4">round4.xml</entry> +<entry key="round5">round5.xml</entry> +<entry key="round6">round6.xml</entry> +<entry key="wait-for-participants">true</entry> +<entry key="number-of-rounds">7</entry> +<entry key="facilitator-instructions"> +<![CDATA[ +<p> + This facilitator interface allows you to control the experiment. In general you + will be following a sequence similar to this: + <ol> + <li>Show instructions</li> + <li>Start round</li> + <li>After round is over + <ol> + <li>show trust game if necessary</li> + <li>start standalone chat round if necessary</li> + </ol> + </li> + <li>Goto 1.</li> + </ol> +</p> +]]> +</entry> + +<entry key='field-of-vision-instructions'> +<![CDATA[ +Your vision is limited in this experiment. The area that is visible to you will be +shaded. +]]> +</entry> + +<entry key="welcome-instructions"> +<![CDATA[ +<h1>Welcome</h1> +<hr> +<p> +Welcome to the experiment. The experiment will begin shortly after everyone has been +assigned a station. +<br><br> +Please <b>wait quietly</b> and <b>do not close this window, open any other applications, or communicate with any of the other participants</b>. +</p> +]]> +</entry> + +<entry key="general-instructions"> +<![CDATA[ +<h1>General Instructions</h1> +<hr> +<p> + <b>Welcome</b>. You have already earned {showUpPayment} dollars just for showing up at this experiment. +</p> +<p> +You can earn more, up to a maximum of about 40 dollars, by participating in this +experiment which will take about an hour to an hour and a half. The amount of money +you earn depends on your decisions AND the decisions of other people in this room +over the course of the experiment. +</p> +<h2>How to participate</h2> +<hr> +<p> +You will appear on the screen as a yellow dot <img src="@CODEBASE_URL@/images/gem-self.gif"></img>. +You can move by pressing the four arrow keys on your keyboard. +</p> +<p> + You can move up, down, left, or right. You have to press a key for each and + every move of your yellow dot. As you move around you can collect green diamond + shaped tokens <img src="@CODEBASE_URL@/images/gem-token.gif"></img> and earn two + cents for each collected token. To collect a token, move your yellow dot over a + green token and <b>press the space bar</b>. Simply moving your avatar over a + token does NOT collect that token. +</p> + +<h2>Tokens</h2> +<hr> +<p> +The tokens that you collect have the potential to regenerate. After you have +collected a green token, a new token can re-appear on that empty cell. The rate at +which new tokens appear is dependent on the number of adjacent cells with tokens. +The more tokens in the eight cells that surround an empty cell, the faster a new +token will appear on that empty cell. In other words, <b>existing tokens can +generate new tokens</b>. To illustrate this, please refer to Image 1 and Image 2. +The middle cell in Image 1 denoted with an X has a greater chance of regeneration +than the middle cell in Image 2. When all neighboring cells are empty, there is +<b>no chance for regeneration</b>. +</p> +<table width="100%"> +<tr> +<td align="center"><b>Image 1</b></td> +<td align="center"><b>Image 2</b></td> +</tr> +<tr> +<td align="center"> + <img src="@CODEBASE_URL@/images/8neighbors.jpg" alt="image 1"> +</td> +<td align="center"> + <img src="@CODEBASE_URL@/images/5neighbors.jpg" alt="image 2"> +</td> +</tr> +</table> + +<h2>Best Strategy</h2> +<hr> +<p> +The chance that a token will regenerate on an empty cell increases as there are +more tokens surrounding it. Therefore, you want to have as many tokens around an +empty cell as possible. However, you also need empty cells to benefit from this +regrowth. The best arrangement of tokens that maximizes overall regrowth is the +checkerboard diagram shown below. +<br> +<img src="@CODEBASE_URL@/images/foraging-checkerboard.png" alt="Checkerboard Resource"> +</p> +]]> +</entry> + +<entry key='trust-game-instructions'> +<![CDATA[ +<h1>Instructions</h1> +<hr> +<p> + You will now participate in an exercise where you will be matched with a random + person in your group. In this exercise there are two roles, Player 1 and Player 2. + Your job is to design strategies for both Player 1 and Player 2 roles. When you + are randomly paired with another member of your group you may be selected as + Player 1 <b>or</b> Player 2. The results of randomly pairing your strategies + with the other group member's strategies will be shown to you at the <b>end of + the experiment</b>. +</p> + +<h2>How to participate</h2> +<hr> +<ol> + <li>Player 1 will first receive an endowment of one dollar and has to decide <b>how much to keep</b>. The remaining amount is <b>sent to Player 2</b>. + <li>The amount Player 1 sends to Player 2 is tripled by the system and then + given to Player 2. Player 2 must then decide <b>how much to keep</b> and <b>how much to send back to Player 1</b>. +</ol> +<p> +For example, if Player 1 sends 0 cents to Player 2, Player 1 earns 1 dollar and +Player 2 earns 0 cents. However, if Player 1 sends 1 dollar to Player 2, 3 dollars +would be sent to Player 2. Player 2 then decides to return $1.75 back to Player 1. +In this case, Player 1 earns $1.75, and Player 2 earns $1.25. +</p> +<p> +Please fill in the following form to design your strategies as Player 1 or Player 2. +<br> +<b>If you have any questions, please raise your hand. Are there any questions?</b> +</p> +]]> +</entry> + +<entry key="chat-instructions"> +<![CDATA[ +<p> +You can chat with the other participants in your group during this round. +You may discuss any aspect of the experiment with the other participants in your group with two exceptions: +<ol> + <li>You <b>may not promise side-payments after the experiment is completed or threaten anyone with any consequence after the experiment is finished</b>.</li> + <li>You <b>may not reveal your actual identity</b></li> +</ol> +<p> +We are monitoring the chat traffic while you chat. If we detect any violation of the +rules we will have to stop the experiment and remove the offending group from the +room. +</p> +<p> + You will see other participants labeled from 1 to {clientsPerGroup} in the chat + window. You can send a chat message by typing into the textfield and pressing + the enter key. +</p> +]]> +</entry> +<entry key="sameRoundAsPreviousInstructions"> +<![CDATA[ +<h3>Round {roundNumber} Instructions</h3> +<hr> +<p>Round {roundNumber} is the same as the previous round.</p> +<p>The length of this round is {duration}.</p> +<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> +]]> +</entry> +<entry key='facilitator-debriefing'> +<![CDATA[ +<h1>Round {self.roundNumber} results</h1> +<hr> +<table border=1 cellspacing=3 cellpadding=3> +<tr> +<th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Trust game earnings</th><th>Total income</th> +</tr> +{clientDataList: {data | +<tr><td>{data.id}</td><td>{data.currentTokens}</td><td>{data.currentIncome}</td><td>{data.quizEarnings}</td><td>{data.trustGameEarnings}</td><td>{data.grandTotalIncome}</td></tr> +}} +</table> +]]> +</entry> +<entry key='client-debriefing'> +<![CDATA[ +<h1>{if (self.practiceRound)}Practice Round{else}Round {self.roundNumber}{endif} Results</h1> +<hr> +<ul> +<li>Tokens collected in this round: {clientData.currentTokens}</li> +<li>Income from tokens collected: {clientData.currentIncome}</li> +<li>Quiz earnings: {clientData.quizEarnings}</li> +<li>Show up payment: {showUpPayment}</li> +</ul> +{if (showExitInstructions && !clientData.trustGameLog.empty) } +<h2>Trust Game Earnings</h2> +<hr> +<ul> +{clientData.trustGameLog: {trustGameLog| +<li>Trust Game #{i}: {trustGameLog}</li> +}} +</ul> +Your total trust game earnings: <b>{clientData.trustGameEarnings}</b>. +{endif} +<h2>Total Income</h2> +<hr> +<p> +Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. +</p> +{if (showExitInstructions)} +<h2>Exit Survey</h2> +<hr> +<p> +This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. +</p> +<h2>Payment</h2> +<hr> +<p> +When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +</p> +{endif} + + + +]]> +</entry> +</properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 07:30:43
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/3e948e3eaf1f/ changeset: 3e948e3eaf1f user: alllee date: 2012-01-18 08:30:26 summary: properly removing disconnected client from ServerDataModel when a DisconnectionRequest is received affected #: 2 files diff -r dc73c421dba8635ec6390ca8e0e759010c2f20ea -r 3e948e3eaf1f89f685521ffc72a72a7159461fee src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java @@ -142,7 +142,9 @@ public synchronized void removeClient(Identifier id) { GroupDataModel groupDataModel = clientsToGroups.remove(id); - groupDataModel.removeClient(id); + if (groupDataModel != null) { + groupDataModel.removeClient(id); + } } public synchronized void addClient(ClientData clientData) { diff -r dc73c421dba8635ec6390ca8e0e759010c2f20ea -r 3e948e3eaf1f89f685521ffc72a72a7159461fee src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -270,8 +270,10 @@ @Override public void handle(DisconnectionRequest event) { synchronized (clients) { - logger.warning("Disconnecting client, removing " + event.getId() + " from clients " + clients.keySet()); - clients.remove(event.getId()); + Identifier id = event.getId(); + logger.warning("Disconnecting client, removing " + id + " from clients " + clients.keySet()); + clients.remove(id); + serverDataModel.removeClient(id); } } }); Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-18 06:57:16
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/dc73c421dba8/ changeset: dc73c421dba8 user: alllee date: 2012-01-18 07:56:57 summary: fixing typo in exit instructions and minor consistency improvements to trust game logs affected #: 2 files diff -r 76a83f604c36c1be32ec01fadb580963db558250 -r dc73c421dba8635ec6390ca8e0e759010c2f20ea src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java @@ -436,26 +436,26 @@ playerOneEarnings += amountReturnedToPlayerOne; } StringBuilder builder = new StringBuilder(); - String playerOneLog = String.format("Player 1 kept %s, sent %s, and received %s back from Player 2 for a total earnings of %s", + String playerOneLog = String.format(" Player 1 kept %s, sent %s, and received %s back from Player 2 for a total earnings of %s", CURRENCY_FORMATTER.format(playerOneAmountToKeep), CURRENCY_FORMATTER.format(amountSent), CURRENCY_FORMATTER.format(amountReturnedToPlayerOne), CURRENCY_FORMATTER.format(playerOneEarnings)); - playerOne.logTrustGame("You were player one. " + playerOneLog); + playerOne.logTrustGame("You were Player 1." + playerOneLog); playerOne.addTrustGameEarnings(playerOneEarnings); builder.append(playerOne).append(playerOneLog).append("\n"); if (shouldLogPlayerTwo(playerOne, playerTwo)) { - String playerTwoLog = String.format("Player 2 received %s from Player 1 and sent back %s for a total earnings of %s", + String playerTwoLog = String.format(" Player 2 received %s from Player 1 and sent back %s for a total earnings of %s", CURRENCY_FORMATTER.format(totalAmountSent), CURRENCY_FORMATTER.format(totalAmountSent - playerTwoEarnings), CURRENCY_FORMATTER.format(playerTwoEarnings)); - playerTwo.logTrustGame("You were player two. " + playerTwoLog); + playerTwo.logTrustGame("You were Player 2." + playerTwoLog); playerTwo.addTrustGameEarnings(playerTwoEarnings); builder.append(playerTwo).append(playerTwoLog).append("\n"); } else { builder.append( - String.format("Player 2: (%s) already participated in the trust game and was only used as a strategy to respond to Player 1.", + String.format("%s already participated in the trust game and was only used as a Player 2 strategy to respond to Player 1.", playerTwo)); } result.setPlayerOneEarnings(playerOneEarnings); diff -r 76a83f604c36c1be32ec01fadb580963db558250 -r dc73c421dba8635ec6390ca8e0e759010c2f20ea src/main/resources/configuration/asu-experiments/2011/t1/server.xml --- a/src/main/resources/configuration/asu-experiments/2011/t1/server.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t1/server.xml @@ -225,19 +225,18 @@ <h2>Total Income</h2><hr><p> -Your <b>total income across all rounds</b> is <b>{clientData.grandTotalIncome}</b>. +Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. </p> {if (showExitInstructions)} <h2>Exit Survey</h2><hr><p> -This was the last round, but not the end of the experiment. We ask that you pease carefully fill out a brief survey as we prepare your payments. +This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. </p><h2>Payment</h2><hr> -<p>NOTE: Your computer number is <b>{clientData.id}</b></p><p> -When the payments are ready we will call you one by one and pay you in private. Please wait until your computer number, <b>{clientData.id}</b>, is called before you come up and turn in your survey. Please answer the survey carefully and thank you for participating. +When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. </p> {endif} Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |