Package edu.wisc.game.sql
Class ReplayedEpisode
java.lang.Object
edu.wisc.game.sql.Episode
edu.wisc.game.sql.ReplayedEpisode
public class ReplayedEpisode extends Episode
Built on top of an Episode object, a ReplayedEpisode is created during
the analysis of transcripts, in order to recreate the episode's events
step by step. This is primarily needed so that we can compute the p0(D)
value for each move of the episode.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReplayedEpisode.RandomPlayer
The possible random player models.Nested classes/interfaces inherited from class edu.wisc.game.sql.Episode
Episode.CODE, Episode.Display, Episode.FINISH_CODE, Episode.Move, Episode.OutputMode, Episode.Pick
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ReplayedEpisode(String _episodeId, ParaSet _para, Game game, ReplayedEpisode.RandomPlayer _randomPlayerModel)
Creates an Episode in order to replay an old recorded Game (with a known rule set and a known initial board) properties of the initial board). -
Method Summary
Modifier and Type Method Description int
accept(Episode.Pick pick)
One normally should not use this method directly; use doPick() or doMove() instead.double
computeP0(Episode.Pick nextMove, int code)
Computes the probability of success for a random pick or random move made by a frugal player.Methods inherited from class edu.wisc.game.sql.Episode
doHtmlDisplay, doMove, doPick, getCurrentBoard, getEpisodeId, getNPiecesStart, getStartTime, getVersion, graphicDisplay, graphicDisplay, graphicDisplayAscii, mkDisplay0, onBoard, playGame, randomWord, report, setEpisodeId, setNPiecesStart, setStartTime
-
Constructor Details
-
ReplayedEpisode
public ReplayedEpisode(String _episodeId, ParaSet _para, Game game, ReplayedEpisode.RandomPlayer _randomPlayerModel)Creates an Episode in order to replay an old recorded Game (with a known rule set and a known initial board) properties of the initial board).
-
-
Method Details
-
computeP0
Computes the probability of success for a random pick or random move made by a frugal player. A call to this method should precede a call to accept(). As of 2021-09-18, the approach is that "P0 for a pick" is only used for successful picks (i.e. when there is incontrovertible evidence that the player wanted to do a pick). For failed picks, we use the "P0 for a move", since it's believed that the player most likely intended to attempt a move, but the GUI converts an move attempt on an immovable piece to a failed pick.- Parameters:
nextMove
- The pick/move attempt the value of p0 before which (for which) we want to compute. This pick or move has been read from the transcript, and contains the success code, which we can use to interpret what the random player may have wanted here. The nextMove.code field is not set yet, because it will only be set during an actual replay (the Episode.accept() call).code
- The historical acceptance code for this attempt, as read from the transcript
-
accept
Description copied from class:Episode
One normally should not use this method directly; use doPick() or doMove() instead.
-