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

Bots should be able to issue challenges #4771

Closed
captncraig opened this issue Dec 11, 2018 · 2 comments
Closed

Bots should be able to issue challenges #4771

captncraig opened this issue Dec 11, 2018 · 2 comments

Comments

@captncraig
Copy link

I am trying to use the bot api to integrate a pair of custom physical chess boards so that they can always play against each other. The bot api is the only (legitimate) way I can use to play with them on lichess. The idea is that I and another user will pretty much always have a correspondence game going. There are a couple of drawbacks:

  1. We are restricted to bot accounts, even though we are exclusively making unassisted human moves. I kinda understand this restriction in the context of stopping cheating, but it still feels bad sometimes.
  2. We cannot make new games without going onto the website in a browser. Ideally the board would simply rematch and you can reset and play a new game. The board is raspberry pi based, and designed to run independently without needing user interaction if possible.

My proposal is to dd an api route for a bot issue to issue a challenge. I can forsee a variety of reasons this could be undesirable:

  • Bots spamming human users with unwanted game requests.
  • Bot users playing each other at high frequency using server resources.

A couple of simple restrictions could help:

  • Bot accounts can only challenge accounts that have explicitly followed them. Absolutely cannot send unsolicited challenges to anybody.
  • Aggressively rate limit bot vs bot challenges. Allow bots to challenge other bots, but not at a frequency beyond what you expect a human v human game to take. This could allow bots to form cliques and test against each other, but not at a volume to severely tax lichess resources. Something like 1 challenge per bot every 5 minutes might be perfectly reasonable.

Again, my intention is to simply use the bot api to facilitate human vs human games with an alternate client. I do not want to get into reverse engineering websockets and trying to fight anti-cheat mechanisms, and would really like to use the official api if at all possible.

Currently fics is our best option, but lichess has so many more features for looking back at games, analysis and so forth. Is there any possibility to make this work?

@ornicar
Copy link
Collaborator

ornicar commented Dec 11, 2018

Feature request accepted.

@ornicar
Copy link
Collaborator

ornicar commented Dec 11, 2018

https://lichess.org/api#operation/challengeCreate

It's not on prod yet, but you can try it out on https://listage.ovh.

It's an OAuth endpoint that is not restricted to bots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants