lichess-bot-devs / lichess-bot

A bridge between Lichess bots and chess engines
GNU Affero General Public License v3.0
745 stars 440 forks source link

Make matchmaking time delay shorter #840

Closed FatFritz2 closed 10 months ago

FatFritz2 commented 1 year ago

Hi Can I suggest you guys to make the matchmaking_time_delay in config.yml to 0.1 minute (10 seconds) to make the bot challenge more opponent P/S: can you make matchmaking better by searching from the highest elo to lower elo opponents

TheYoBots commented 1 year ago

0.1 min = 6 sec I think the minimum way set to 1 min to prevent bots from hitting rate limits which was reported multiple times in this repository.

FatFritz2 commented 1 year ago

Sorry, I mean reducing it to arround 0,16 min to 0,25 min (10 seconds to around 25 seconds) To be honest Torom's Botli also support the matchmaking delay option down to 10 seconds In fact i suggest you use seconds not minutes for the matchmaking_time option here

MarkZH commented 1 year ago

Lichess limits API users to 400 challenges a day (this could be raised or lowered in the future). That's an average of one every 3.6 minutes. Since faster games are more popular, lowering the delay between matchmaking challenges will only cause rate-limiting 429 errors to happen more quickly. This would cause lichess-bot users to spend up to half of every day unable to challenge opponents while waiting for the daily challenge limit to expire. We won't be making this change.

We will consider the matchmaking change.

AttackingOrDefending commented 1 year ago

Also, if we were to change the delay from minutes to seconds, we would have a problem with backwards compatibility.

The problem with the matchmaking change would be that the bot would play the same bot often, which can lead to more declined challenges (because of max_recent_bot_challenges). I think the new selection parameter would have to take 5 values: random, highest, lowest, weighted_highest and weighted_lowest. weighted_highest and weighted_lowest would work like weighted_random in opening books. This way the bot will prefer higher rated opponents but will have a higher variance in opponents. The downside to weighted_highest is that we would have to come up with a function to give a weight to each bot.

FatFritz2 commented 1 year ago

Hey, in the !eval command, I dont see where is hash info located And how can I enable hash infos ? Or if you havent got that feature ? Thanks

AttackingOrDefending commented 1 year ago

To show the hash, change line 363 in engine_wrapper.py from stats = ["Source", "Evaluation", "Winrate", "Depth", "Nodes", "Speed", "Pv"] to stats = ["Source", "Evaluation", "Winrate", "Depth", "Nodes", "Speed", "Hash", "Pv"].

FatFritz2 commented 1 year ago

I've already replaced your code there but it seems not showing: Evaluation: 3.6, Winrate: 100.0%, Depth: 34, Nodes: 22.8M, Speed: 2.0Mnps, Pv: ...

AttackingOrDefending commented 1 year ago

Sorry. It is Hashfull and not Hash. stats = ["Source", "Evaluation", "Winrate", "Depth", "Nodes", "Speed", "Hashfull", "Pv"] should work.