[virtualcommons-svn] commit/foraging: 7 new changesets
Status: Beta
Brought to you by:
alllee
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] |