[virtualcommons-svn] commit/foraging: alllee: merging with default to fix critical bug with iu trea
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-01-31 00:00:43
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/1dfe234f4660/ changeset: 1dfe234f4660 branch: stable user: alllee date: 2012-01-31 01:00:32 summary: merging with default to fix critical bug with iu treatment where the selected rules were not being persisted properly and so in the event of a tiebreaker it would not be clear which strategy won. affected #: 7 files diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 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 @@ -170,8 +170,8 @@ addEventProcessor(new EventTypeProcessor<RuleSelectedUpdateEvent>(RuleSelectedUpdateEvent.class) { @Override public void handle(RuleSelectedUpdateEvent event) { - dataModel.setSelectedRules(event.getSelectedRules()); - getGameWindow2D().showVotingResults(event.getSelectedRules(), event.getVotingResults()); + dataModel.setSelectedRules(event.getSelectedStrategies()); + getGameWindow2D().showVotingResults(event.getSelectedStrategies(), event.getVotingResults()); } }); addEventProcessor(new EventTypeProcessor<ShowVoteScreenRequest>(ShowVoteScreenRequest.class) { diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 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 @@ -21,28 +21,23 @@ public class RuleSelectedUpdateEvent extends AbstractPersistableEvent { private static final long serialVersionUID = 4360213814026474451L; - private final List<ForagingStrategy> selectedRules; + private final List<ForagingStrategy> selectedStrategies; private final Map<ForagingStrategy, Integer> votingResults; - public RuleSelectedUpdateEvent(Identifier id, List<ForagingStrategy> selectedRules, Map<ForagingStrategy, Integer> votingResults) { - super(id, selectedRules.toString()); - this.selectedRules = selectedRules; + public RuleSelectedUpdateEvent(Identifier id, List<ForagingStrategy> selectedStrategies, Map<ForagingStrategy, Integer> votingResults) { + super(id, String.format("Strategies (first is tiebreaker): %s, All nominations: %s", selectedStrategies, votingResults)); + this.selectedStrategies = selectedStrategies; this.votingResults = votingResults; } public ForagingStrategy getSelectedRule() { - return selectedRules.get(0); + return selectedStrategies.get(0); } - public List<ForagingStrategy> getSelectedRules() { - return selectedRules; + public List<ForagingStrategy> getSelectedStrategies() { + return selectedStrategies; } - @Override - public String toString() { - return String.format("Selected first rule from %s", selectedRules); - } - public Map<ForagingStrategy, Integer> getVotingResults() { return votingResults; } diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 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 @@ -397,9 +397,10 @@ sendFacilitatorMessage(String.format( "%s selected [%s] from all rules (%s)", group, selectedRules, votingResults)); + transmit(new RuleSelectedUpdateEvent(id, selectedRules, votingResults)); } - + store(new RuleSelectedUpdateEvent(facilitatorId, selectedRules, votingResults)); } } } diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/asu/2011/t4/round6.xml --- a/src/main/resources/configuration/asu/2011/t4/round6.xml +++ b/src/main/resources/configuration/asu/2011/t4/round6.xml @@ -16,31 +16,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 b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 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,7 +16,7 @@ <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 @@ -30,10 +30,10 @@ 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 +equal-sized {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 -{clientsPerGroup} will remain the same throughout the experiment. The other members +{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. </p> diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/stockholm/censored-chat/round4.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round4.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round4.xml @@ -54,7 +54,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also @@ -114,7 +114,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 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 @@ -213,17 +213,17 @@ room. </p><p> - You will see other participants labeled from 1 to {clientsPerGroup} in the chat + You will see other participants labeled from A to {self.lastChatHandle} 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"> +<entry key="same-as-previous-round-instructions"><![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. |