Allow a rejection response for /start
#244
Replies: 4 comments 3 replies
-
I like this idea! I wonder what should happen if a snake opts out? The easiest answer is for them to probably be marked as a lose immediately? This would have the least changes to things like matchmaking. More questions:
|
Beta Was this translation helpful? Give feedback.
-
Whatever solution does end up getting chosen for this, I feel that snakes who opt out should not receive a penalty for doing so (if there are worries of abuse or intentionally dodging certain opponents, perhaps the initial /start call should be anonymised?) Perhaps as an alternative to rejecting specific games, we could include a field in the response of / or as a separate endpoint where snakes can provide specific ruleset restrictions they'd like to play with? |
Beta Was this translation helpful? Give feedback.
-
I think it is a must-have feature. I have a few thoughts on possible implementation:
For the first implementation declining game could be treated as a technical loss (with a corresponding message, like |
Beta Was this translation helpful? Give feedback.
-
We could use any of these responses:
Both are related to option when snake can't handle the game (like if snake server is overloaded with concurrent games). |
Beta Was this translation helpful? Give feedback.
-
Some bots won't understand all rulesets, and these bots should have a way of opting out of games they don't understand.
As such, I propose handling the response from
/start
(which currently, according to the docs, is ignored), such that 201 ('created') or 202 ('accepted') is returned on games the bot wishes to play, and 204 ('no content'), 406 ('not acceptable'), 422 ('unprocessable entity'), 501 ('not implemented'), or 503 ('service unavailable') are returned for games the bot does not wish to play (which of these responses to use specifically, I'm not sure - I'd probably choose 201/501, but that's a design decision for after the feature is accepted really).I can see this being particularly useful for ML snakes, which may not be able to understand e.g. games of sizes differing from that on which they were trained - and as such would not produce useful output for such games - as they could simply opt to not play those games instead.
Beta Was this translation helpful? Give feedback.
All reactions