Implement a history-based matching algorythm

The bot will attempt to keep producing groups with entirely unique matches based on the full history of matches until it can't. It'll then step forward and ignore a week of history and try again, ignoring more history until no history is left
This commit is contained in:
Marc Di Luzio 2024-08-10 15:12:14 +01:00
parent ed2375386b
commit 874a24dd1d
8 changed files with 388 additions and 104 deletions

View file

@ -91,7 +91,7 @@ async def match(interaction: discord.Interaction, group_min: int = None, matchee
# Create our groups!
matchees = list(
m for m in interaction.channel.members if matchee in m.roles)
groups = matching.members_to_groups(matchees, group_min)
groups = matching.members_to_groups(matchees, History, group_min)
# Post about all the groups with a button to send to the channel
msg = '\n'.join(matching.group_to_message(g) for g in groups)