Package edu.wisc.game.sql
Class ReplayedEpisode
java.lang.Object
edu.wisc.game.sql.Episode
edu.wisc.game.sql.ReplayedEpisode
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 ClassesModifier and TypeClassDescriptionstatic enum
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
ConstructorsConstructorDescriptionReplayedEpisode
(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). -
Method Summary
Modifier and TypeMethodDescriptionint
accept
(Episode.Pick pick) In addition to the normal "accept" stuff, either erases or augments the player's knowledge of the current board's properties.double
computeP0
(Episode.Pick nextMove, int code) Computes the probability of success for a random pick or random move made by a frugal player.boolean
We tell the player where all movable pieces are, unless the para set mandates "free" mode.Methods inherited from class edu.wisc.game.sql.Episode
doMove, doPick, getCurrentBoard, getEpisodeId, getLastMovePos, getNPiecesStart, getPieces, getStartTime, getVersion, graphicDisplay, graphicDisplay, graphicDisplayAscii, mkDisplay0, onBoard, playGame, positionsOfMoveablePieces, 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).
-
-
Method Details
-
weShowAllMovables
public boolean weShowAllMovables()We tell the player where all movable pieces are, unless the para set mandates "free" mode.- Overrides:
weShowAllMovables
in classEpisode
-
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 a 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
In addition to the normal "accept" stuff, either erases or augments the player's knowledge of the current board's properties. (Depending on whether the board has changed or not).
-