Package edu.wisc.game.tools
Class AnalyzeTranscripts
java.lang.Object
edu.wisc.game.tools.AnalyzeTranscripts
- Direct Known Subclasses:
MwByHuman
Methods for the statistical analysis of game transcripts.
For documentation, including usage, see analyze-transcripts.html
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected void
analyzePlayerRecord
(String playerId, Vector<edu.wisc.game.tools.EpisodeHandle> v) Reads one player's transcript, and prepares a complete report for that player.protected edu.wisc.game.tools.AnalyzeTranscripts.P0andR
computeP0andR
(Vector<TranscriptManager.ReadTranscriptData.Entry[]> subsections, ParaSet para, String ruleSetName, Vector<Board> boardHistory) Reconstructs and replays the historical episode, computing p0 for every pick or move attempt.static void
The main() method processes the command line arguments, allowing a large variety of ways to specify the set of players whose data are to be analyzed.protected void
saveAnyData
(Vector<TranscriptManager.ReadTranscriptData.Entry[]> section, Vector<edu.wisc.game.tools.EpisodeHandle> includedEpisodes) Saves the data for a single (player, ruleSet) pair.
-
Field Details
-
quiet
protected boolean quiet
-
-
Method Details
-
main
The main() method processes the command line arguments, allowing a large variety of ways to specify the set of players whose data are to be analyzed.- Throws:
Exception
-
saveAnyData
protected void saveAnyData(Vector<TranscriptManager.ReadTranscriptData.Entry[]> section, Vector<edu.wisc.game.tools.EpisodeHandle> includedEpisodes) throws IOException, IllegalInputException, RuleParseException Saves the data for a single (player, ruleSet) pair. This method can only be called if base!=null.- Parameters:
section
- A vector of arrays, each array representing the recorded moves for one episode.includedEpisodes
- All non-empty episodes played by this player in this rule set- Throws:
IOException
IllegalInputException
RuleParseException
-
computeP0andR
protected edu.wisc.game.tools.AnalyzeTranscripts.P0andR computeP0andR(Vector<TranscriptManager.ReadTranscriptData.Entry[]> subsections, ParaSet para, String ruleSetName, Vector<Board> boardHistory) throws IOException, IllegalInputException, RuleParseException Reconstructs and replays the historical episode, computing p0 for every pick or move attempt.- Parameters:
subsections
- A (preprocessed) transcript by a player, which covers an entire series of episodes.para
- The parameter set that was in effect for this series.boardHistory
- An output parameter. If not null, we will save the board before each move to that vector. The number of entries put into this vector will be equal to the number of values put into the return value (p0)- Returns:
- An array containing p0 values for each move.
- Throws:
IOException
IllegalInputException
RuleParseException
-
analyzePlayerRecord
protected void analyzePlayerRecord(String playerId, Vector<edu.wisc.game.tools.EpisodeHandle> v) throws IOException, IllegalInputException, RuleParseException Reads one player's transcript, and prepares a complete report for that player.- Parameters:
playerId
- The player whose record we want to analyzev
- The list of episodes played by this player- Throws:
IOException
IllegalInputException
RuleParseException
-