Allow approved AI players to join games #1996
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The intention of this PR is not for it to be merged immediately. Instead it shall serve as a platform to discuss if approved AI players should be allowed on https://secrethitler.io/ and how one could make this happen in practice.
Background
During my PhD, I've been studying deceptive AI in social deduction games for a year now and have developed an LLM based Secret-Hitler AI that seems to be reaching human level of play. Now I plan to evaluate that AI against actual human secret-hitler players and I think that secrethitler.io would be the most natural place to do this. I've already brought this up with some moderators and coz and they suggested that I create a PR for open discussion.
I've already written an interface between my AI and the cozuya/secret-hitler interface and am currently working on a private test deployment on which my AIs play. So I think there is not too much work left to make it possible for my AI to join games on secrethitler.io. Primarily I would need a Cloudflare bypass so that my AI can connect to secrethitler.io headless. Otherwise it would make sense to give the players the option to decide if they want to allow AI to join their games and that is what this PR is for.
I am also happy to share videos of my bots playing privately with moderators so you may be able to get a better image of what is to come. In the future, I may also be able to give access to my private test deployment with bots privately to moderators.
Changes
This PR adds an Opt-Out indicator during game creation that indicates if AI players should be allowed to join. The idea is that approved AI operators could be granted a Cloudflare bypass and use the allowBots indicator on each game to decide which games their AI should join.
Screenshots
Tested Locally
Tests
Changelog
Changelog Entry (delete this section if this PR does not need a changelog entry)
Check one, delete the other:
Check one, delete the other:
Changelog Headline: Add slider to allow AI players join games
Changelog Details: While creating a game you may now switch "Allow Bots to join the game" on or off.