Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions on things to validate #24

Open
jonahgreenthal opened this issue Mar 9, 2016 · 3 comments

Comments

@jonahgreenthal
Copy link
Contributor

commented Mar 9, 2016

Here is what I suggest validating. This is based heavily on what NAQT validates.

General error-checking:

  • No team plays more than one non-tiebreaker game per round
  • No team name is repeated
  • No player name is repeated on the same team

Game error-checking:

  • No team plays a game against itself
  • Forfeit games have no data other than the teams (with winner and loser) and the forfeit status; no points or player results etc.
  • Round number is specified and positive (this was checked for "nonnegative" but should really be positive)
  • There is only a tie if the scoring rules allow ties
  • TUH is a nonnegative integer (and see below about sanity-checking) (this was checked for "nonnegative" but should really be positive)
  • Total powers + tossups (across both teams) is ≤ TUH
  • Total interrupts (across both teams) is ≤ TUH

Team-in-game error-checking:

  • No player appears more than once in the same game
  • All scores and score components are only present if appropriate to the scoring rules. For instance, if the scoring rules say there aren't bouncebacks, there shouldn't be any bounceback points recorded.
  • All scores and score components are within appropriate ranges configured according to the scoring rules. For instance, bonus points must be nonnegative [#22] and must be ≤ ((team powers + tossups) * maximum value of one bonus).
  • All scores and score components are divisible by appropriate divisors. For instance, bonus points would never be non-divisible-by-5 in any common modern format, and in most must be divisible by 10.
  • Tossups without bonuses is a nonnegative integer
  • Total powers + tossups + interrupts is ≤ game TUH

Player-in-game error-checking:

  • Each player TUH is a nonnegative integer (and shouldn't usually be 0; see #20 for why it could be)
  • Each player TUH is ≤ game TUH
  • Total player TUH on each side is ≤ (game TUH * number of players active at a time)
  • Powers is a nonnegative integer, and is 0 if the scoring rules don't include powers
  • Tossups is a nonnegative integer
  • Interrupts is a nonnegative integer, and is 0 if the scoring rules don't include interrupts
  • Powers + tossups + interrupts is ≤ player TUH

Sanity checks: These shouldn't generate an error, just a warning

  • Warn if game TUH falls outside some reasonable range (configurable according to scoring rules; for untimed 20/20 games it would be 20–~22, for NAQT games it would be ~15–~27)
  • Warn if game TUH is different from the vast majority of games in the tournament and it's not an overtime game. This doesn't apply in timed formats (because the "vast majority" criterion won't be satisfied), but in untimed 20/20, someone could fat-finger 22 for TUH when it should really be 20.
  • Warn if game combined score falls outside some reasonable range (likewise configurable; for untimed 20/20 it would be 900 if powers, 800 if not; for NAQT it would be 1080). This is only a sanity check because it gets a whole lot more complicated when you account for overtime.
  • Warn if a team's roster's size is at least the number of players active in a game at a time on each side, but the team TUH is less than (players active * game TUH). For instance, if the scoring rules say there are 4 players on each side (as usual) and the team has 4 players on its roster but only uses 3 players in the game, that should be a warning.
  • Warn if player TUH is 0
  • For what it's worth, the notion of non-error sanity checks is new to NAQT's system and there are probably a bunch that I haven't thought of yet. Feel free to suggest some to us (me)!
@jonahgreenthal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 27, 2017

As of November 18, 2017, this one is definitely unsolved: "Total player TUH on each side is ≤ (game TUH * number of players active at a time)". (Are any of the unchecked issues supposedly solved?)

@jonahgreenthal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 27, 2017

As of November 18, 2017, this one is also definitely unsolved: "No team plays more than one non-tiebreaker game per round"

@jonahgreenthal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 27, 2017

As of November 11, 2017, bouncebacks are not validated correctly; c.f. game_SJcvpoVJG in https://stats.neg5.org/t/SJqi1Q9RZ/collins-hill-ms-2017/team-standings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.