-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added scoreboard_rules to contest_endpoint. #192
base: master
Are you sure you want to change the base?
Conversation
This change address issue icpc#150. It allows describing some small modifications to how the scoreboard is calculated, so downstream clients can do it consistently themselves if needed.
@@ -770,6 +770,65 @@ The `countdown_pause_time` may be changed to indicate the approximate delay unti | |||
Countdown is resumed by setting a new `start_time` and resetting | |||
`countdown_pause_time` to `null`. | |||
|
|||
In most cases downstream clients should use `/scoreboard` endpoint to get standings. If for some reason, it's not suitable, one | |||
can use `scoreboard_rules` property to ensure that calculated scoreboard would be the same, or at least report potential | |||
diverges. Scoreboard rule object must have a `string` property named `kind` and any additional properties, describing settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if this was worded to caution against calculating your own scoreboard stronger. I.e. you should not calculate your own scoreboard unless you have to, and then a list of reasonable reasons why you might have to (such as resolving, or calculating hypothetical future states and such)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I love the choice of "kind". Would something like "ruleset" be better maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe name
to make it clear that these are unique things. As in: you shouldn't just take an existing one like icpc
and change/extend it, unless you're the "owner" of these rules. But ruleset
also sounds good. Or ruleset_name
? :-P
|
||
`ICPC` kind is set of scoreboard calculation rules, where each problem is either solved or not, teams | ||
are sorted based on number of solved problems, and penalty time as a tiebreaker. Can be used only with `pass-fail` | ||
`scoreboard_type`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a reference here to the CCS SR (or the other way around, or both).
Also, (but that's kinda the same thing), an update of the Contest API section of the CCS SR is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed thus, but adding it here...
The fact that ICPC
can only be used with pass-fail
(and that I think that will be true for many other kinds) is an argument for moving scoreboard_type
into scoreboard_rules
.
|
||
##### ICPC scoreboard rules | ||
|
||
`ICPC` kind is set of scoreboard calculation rules, where each problem is either solved or not, teams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely subjective, but I think icpc
should be lowercased here.
`penalty_mode` describes how times of submissions results in final penalty: | ||
* `sum` means that penalty time is the sum of submission times | ||
* `last` means that penalty time is the time of the last submission | ||
* `ignore` means that times are not used in penalty calculation, only wrong attempts matter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really "ICPC" if you use last
or ignore
?
I'm not arguing that we should drop this, but rather that this "kind" is larger than just "ICPC" if we include these.
|
||
`IOI` kind is set of scoreboard calculation rules, where on each problem you get some score, and | ||
your rank is defined with total score for all problems, potentially using some time-based tie-break. | ||
Can be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoudln't this have:
Can be used only with
pass-fail
scoreboard_type
.
Penalty time properties have the same meaning as in ICPC rules above, except having different defaults. | ||
They are only useful in case if `use_time_tiebreak` is true. | ||
|
||
The default values correspond to most classic IOI rules, used in most of the IOI school competitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop "school"?
| kind | string | Should be eqaul to ICPC | ||
| penalty\_time\_per\_wrong\_submission | RELTIME | Penalty time team gets for a wrong submission on a problem solved after that. Defaults to `00:20:00`. | ||
| penalty\_mode | string | One of values: `sum`, `last`, `ignore`. Defaults to `sum` | ||
| penalty\_precision | RELTIME | Precision of penatly calculation. Typically 1 minute or 1 second. Defatuls to `00:01:00`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error. penatly -> penalty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also eqaul
-> equal
.
| use\_time\_tiebreak | boolean | If time tiebreak is used, or teams with same score just divide a rank. Defaults to `false` | ||
| penalty\_time\_per\_wrong\_submission | RELTIME ? | Penalty time team gets for a wrong submission on a problem solved after that. Defaults to `00:00:00`. | ||
| penalty\_mode | string ? | One of values: `sum`, `last`, `ignore`. Defaults to `last` | ||
| penalty\_precision | RELTIME ? | Precision of penatly calculation. Typically 1 minute or 1 second. Defatuls to `00:00:01`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error. Defatuls -> Defaults
This change address issue #150.
It allows describing some small modifications to how the scoreboard is calculated, so downstream clients can do it consistently themselves if needed.