lichess-bot-devs / lichess-bot

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

Allow the bot to prioritize playing against humans or bots #979

Closed AttackingOrDefending closed 2 weeks ago

AttackingOrDefending commented 2 weeks ago

Type of pull request:

Description:

Allow the bot to prioritize playing against humans or bots. For example, if someone changes preference to human and has sort_by set to best, then the bot will prefer to play with a human even if they are rated lower than a bot. The order of opponents will be:

HUMAN A (2100)
HUMAN B (1800)
HUMAN C (1500)
BOT A (3000)
BOT B (2500)

Related Issues:

None

Checklist:

Screenshots/logs (if applicable):

MarkZH commented 2 weeks ago

One more thing. Since there are a finite set of options for this new configuration, there should be a test in validate_config() that checks that the value, if it is present, is from that set.