Блог пользователя Bruteforceman

Автор Bruteforceman, история, 2 года назад, По-английски

Hi, I made a duel bot where you can challenge other users in a OI styled duel. It is sort of like a combination of regular duel matches and lockout challenges. You can find the bot at OIDuelBot. The bot is currently available only for Telegram, but I have plans to make one for discord as well.

Rules

You can challenge other users in a OI styled duel. In the duel, you have to race against time to solve the subtasks before your opponent. If your opponent solves a particular subtask before you, they gets the point for that subtask, and you won't get any points for it even if you solve it in the future. The player with more points at the end of the duel wins the challenge.

How to use

First, you need to add the bot in a telegram group. Here are the commands you can use in the bot

/register [oj.uz username] — you have to register yourself in order to enter your duel

/challenge [telegram username] — you can challenge other users in a OI styled duel

/accept — you can accept the challenge from other users

/decline — you can decline the challenge from other users

/duration [minutes] — you can set the duration of your challenge between 10 and 180 minutes

/difficulty [number] — you can set a difficulty from 1 to 10

/withdraw — you can withdraw from your current challenge

/rules — you can see the rules of the duel

/help — shows help text

Note that you have to start all commands with a forward slash which is the convention for telegram bots.

How the bot works

When you challenge a user, you will get a random problem unsolved by both users from oj.uz. The difficulty is measured by the number of ACs, which is probably not a very good measure, but I couldn't think of anything better for now. So you may sometimes get problems with lower or higher difficulty than you expect. If you don't like the problem, you can withdraw the match with your opponent. Also, since I am hosting the bot in a free heroku server, it will be inactive for about 6 hours every day (from 3:30 AM BST onwards). So if the bot doesn't respond, it's probably inactive at that moment.

Here is the github link if you want to look into the code or host the bot yourself: Github

Future plans

  1. Make a discord version
  2. Duel on problems from specified sources (IOI, BOI etc).
  3. Duel with three or more users
  4. Add rating system

Thanks to _blaNk_ for helping me test the bot. If you find any bugs/issues, let me know.

  • Проголосовать: нравится
  • +141
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

tsmmvyorz

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

commenting for better reach

»
2 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

would there be a problem source like codeforces or atcoder? i reckon these two shall be more welcomed.

»
15 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Does this bot active now? I try using it, but it doesn't do any command, and this is the first time I've used telegram lol.