net.commerce.zocalo.experiment
Class JudgingSession
java.lang.Object
net.commerce.zocalo.experiment.Session
net.commerce.zocalo.experiment.JudgingSession
public class JudgingSession
- extends Session
supports experiments in which one set of subjects doesn't trade,
and is responsible for guessing the value of the traded commodity
on the basis of the trading history.
Field Summary |
static java.util.TimerTask |
DEAD_TASK
|
Constructor Summary |
JudgingSession(java.util.Properties props,
org.mortbay.cometd.AbstractBayeux bayeux)
|
Methods inherited from class net.commerce.zocalo.experiment.Session |
aboveThresholdMessage, accrueDividendsAndBonuses, appendToErrorMessage, basicRoleForSession, belowThresholdMessage, buildDormantArray, calculateEarnings, calculateScores, cannotStartRoundMessage, closeSessionAppenders, endSession, endTrading, endTradingLabel, eventOutcome, findSessionReplaceRoundString, getChartScale, getClaim, getCommonMessageLabel, getCurrentRound, getDividend, getDividend, getEarningsHint, getErrorMessage, getLogoPath, getMajorUnit, getMarket, getMessageLabel, getMinorUnit, getPayDividend, getPhase, getPlayer, getPriceHint, getPrivateDividend, getRemainingDividend, getRoundLabel, getRoundLabelOrDefault, getShareLimit, getSharesLabel, getShowEarnings, getTradeHistory, getTrader, getTraders, getUserOrNull, ifScoring, ifTrading, initialTraderTickets, isCarryForward, lastRound, lastTradeValue, logCommonMessages, logEvent, logFileLinks, logParameterCombinations, logTransitionEvent, make, marketIsActive, marketPrice, maxPrice, message, message, playerNameIterator, playerNameSortedIterator, privateDividendsInUse, provideCash, recordScoreExplanation, renderScore, replaceRoundString, reservesAreRequired, rounds, sessionEndTradingAdaptor, sessionLogger, setPhase, startNextRound, startNextRound, startNextTimedRound, startRoundActionLabel, startRoundText, startRoundTransitionLabel, startSession, startSession, stateSpecificTraderButtons, stateSpecificTraderHtml, stopRoundActionLabel, timeLimit, timeRemaining, webAction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEAD_TASK
public static java.util.TimerTask DEAD_TASK
JudgingSession
public JudgingSession(java.util.Properties props,
org.mortbay.cometd.AbstractBayeux bayeux)
initializeRoles
protected java.util.HashMap<java.lang.String,Role> initializeRoles(java.util.Properties props)
- Overrides:
initializeRoles
in class Session
logSessionInitialization
protected void logSessionInitialization()
- Overrides:
logSessionInitialization
in class Session
initialManipulatorTickets
public Quantity initialManipulatorTickets()
endowedRoles
protected java.lang.String[] endowedRoles()
- Overrides:
endowedRoles
in class Session
cuttingOffJudges
public boolean cuttingOffJudges()
nonTradersPresent
public static boolean nonTradersPresent(java.util.Properties props)
bookFundingRequired
protected Quantity bookFundingRequired(java.util.Properties props)
- Overrides:
bookFundingRequired
in class Session
getJudgeOrNull
public Judge getJudgeOrNull(java.lang.String userName)
ifJudging
public void ifJudging(JudgingStatusAdaptor ifJudging)
throws ScoreException
- Throws:
ScoreException
endScoringPhase
public void endScoringPhase()
throws ScoreException
- Throws:
ScoreException
calculateScores
protected void calculateScores(Price average)
throws ScoreException
- Overrides:
calculateScores
in class Session
- Throws:
ScoreException
judgedValue
public Price judgedValue(int round)
throws ScoreException
- Throws:
ScoreException
getMedianJudgedValue
public Price getMedianJudgedValue(int round)
throws ScoreException
- Throws:
ScoreException
getJudgingTarget
public Quantity getJudgingTarget(int round)
throws ScoreException
- Throws:
ScoreException
experimenterButtons
public java.lang.String[] experimenterButtons()
- Overrides:
experimenterButtons
in class Session
showEarningsSummary
public java.lang.String showEarningsSummary(java.lang.String userName)
- Overrides:
showEarningsSummary
in class Session
stateSpecificDisplay
public java.lang.String stateSpecificDisplay()
- Overrides:
stateSpecificDisplay
in class Session
getEstimatesHtml
public java.lang.String getEstimatesHtml()
judgeInputChoiceList
public java.lang.String judgeInputChoiceList()
judgeRewardsTable
public java.lang.String judgeRewardsTable()
getSliderLabelStepSize
public int getSliderLabelStepSize()
getSliderInputStepSize
public int getSliderInputStepSize()
getEstimateSliderLabel
public java.lang.String getEstimateSliderLabel()
getSliderFeedbackLabel
public java.lang.String getSliderFeedbackLabel()