Package edu.wisc.game.sql

## Class MlcEntry

- java.lang.Object
- - edu.wisc.game.sql.MlcEntry

-     @Entity
      public class MlcEntry
      extends Object

  An MlcEntry contains the data for a (participant, ruleset, run) tuple. The data is condensed from the appropriate lines of a CSV file submitted by an MLC participant.

  An MlcEntry has the "learned" boolean field, which indicates whether the participant (an ML algo) has demonstrated its mastering of the rule set (in this run, at any rate) by ending the run with a required number of error-free episodes.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MlcEntry​(String _nickname, String _ruleSetName, int _runNo, Date _uploadTime)` | Creates an entry with zeros for all aggregated statistics.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `addEpisode​(int episodeNo, int number_of_pieces, int number_of_moves, double move_acc, boolean if_clear, StringBuffer errmsg)` | Updates the aggregate statistics stored in this MlcEntry based on one more episode in the run.
    `boolean` | `addEpisode2​(int episodeNo, int number_of_moves, int number_of_errors, boolean if_clear, StringBuffer errmsg)` |
    `int` | `getEndStreakEpisodes()` |
    `int` | `getEndStreakMoves()` |
    `int` | `getEpisodesUntilLearned()` |
    `int` | `getErrorsUntilLearned()` |
    `boolean` | `getLearned()` |
    `int` | `getMovesUntilLearned()` |
    `String` | `getNickname()` |
    `String` | `getRuleSetName()` |
    `int` | `getRunNo()` |
    `int` | `getTotalEpisodes()` |
    `int` | `getTotalErrors()` |
    `int` | `getTotalMoves()` |
    `Date` | `getUploadTime()` |
    `boolean` | `matches​(String _nickname, String _ruleSetName, int _runNo)` |
    `void` | `setEndStreakEpisodes​(int _endStreakEpisodes)` |
    `void` | `setEndStreakMoves​(int _endStreakMoves)` |
    `void` | `setEpisodesUntilLearned​(int _episodesUntilLearned)` |
    `void` | `setErrorsUntilLearned​(int _errorsUntilLearned)` |
    `void` | `setLearned​(boolean _learned)` |
    `void` | `setMovesUntilLearned​(int _movesUntilLearned)` |
    `void` | `setNickname​(String _nickname)` |
    `void` | `setRuleSetName​(String _ruleSetName)` |
    `void` | `setRunNo​(int _runNo)` |
    `void` | `setTotalEpisodes​(int _totalEpisodes)` |
    `void` | `setTotalErrors​(int _totalErrors)` |
    `void` | `setTotalMoves​(int _totalMoves)` |
    `void` | `setUploadTime​(Date _uploadTime)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MlcEntry

          public MlcEntry​(String _nickname,
                          String _ruleSetName,
                          int _runNo,
                          Date _uploadTime)

      Creates an entry with zeros for all aggregated statistics.

  - ### Method Detail

    - #### getUploadTime

          public Date getUploadTime()

    - #### setUploadTime

          public void setUploadTime​(Date _uploadTime)

    - #### getNickname

          public String getNickname()

    - #### setNickname

          public void setNickname​(String _nickname)

    - #### getRuleSetName

          public String getRuleSetName()

    - #### setRuleSetName

          public void setRuleSetName​(String _ruleSetName)

    - #### getRunNo

          public int getRunNo()

    - #### setRunNo

          public void setRunNo​(int _runNo)

    - #### getLearned

          public boolean getLearned()

    - #### setLearned

          public void setLearned​(boolean _learned)

    - #### getEpisodesUntilLearned

          public int getEpisodesUntilLearned()

    - #### setEpisodesUntilLearned

          public void setEpisodesUntilLearned​(int _episodesUntilLearned)

    - #### getMovesUntilLearned

          public int getMovesUntilLearned()

    - #### setMovesUntilLearned

          public void setMovesUntilLearned​(int _movesUntilLearned)

    - #### getErrorsUntilLearned

          public int getErrorsUntilLearned()

    - #### setErrorsUntilLearned

          public void setErrorsUntilLearned​(int _errorsUntilLearned)

    - #### getTotalMoves

          public int getTotalMoves()

    - #### setTotalMoves

          public void setTotalMoves​(int _totalMoves)

    - #### getTotalErrors

          public int getTotalErrors()

    - #### setTotalErrors

          public void setTotalErrors​(int _totalErrors)

    - #### getTotalEpisodes

          public int getTotalEpisodes()

    - #### setTotalEpisodes

          public void setTotalEpisodes​(int _totalEpisodes)

    - #### getEndStreakMoves

          public int getEndStreakMoves()

    - #### setEndStreakMoves

          public void setEndStreakMoves​(int _endStreakMoves)

    - #### getEndStreakEpisodes

          public int getEndStreakEpisodes()

    - #### setEndStreakEpisodes

          public void setEndStreakEpisodes​(int _endStreakEpisodes)

    - #### matches

          public boolean matches​(String _nickname,
                                 String _ruleSetName,
                                 int _runNo)

    - #### addEpisode

          public boolean addEpisode​(int episodeNo,
                                    int number_of_pieces,
                                    int number_of_moves,
                                    double move_acc,
                                    boolean if_clear,
                                    StringBuffer errmsg)

      Updates the aggregate statistics stored in this MlcEntry based on one more episode in the run. This includes determining if learning success has been achieved.
      Parameters:
        `errmsg` - An empty StringBuffer, to which an error message can be appended if needed.
      Returns:
        true on success, false on error

    - #### addEpisode2

          public boolean addEpisode2​(int episodeNo,
                                     int number_of_moves,
                                     int number_of_errors,
                                     boolean if_clear,
                                     StringBuffer errmsg)