Skip to content

Add social deduction hidden-role benchmark game#1539

Open
Arahan-kujur wants to merge 2 commits into
google-deepmind:masterfrom
Arahan-kujur:social-deduction-game
Open

Add social deduction hidden-role benchmark game#1539
Arahan-kujur wants to merge 2 commits into
google-deepmind:masterfrom
Arahan-kujur:social-deduction-game

Conversation

@Arahan-kujur

Copy link
Copy Markdown
Contributor

Summary

Adds social_deduction, a configurable hidden-role multi-agent benchmark game for studying deception, trust, voting, and coalition dynamics.
The game models a sequential imperfect-information environment with:

  • Explicit stochastic hidden-role assignment
  • Innocent and imposter teams
  • Noisy public observation signals
  • Tokenized communication actions
  • Elimination voting
  • Terminal team win/loss rewards

Design Notes

The game is registered as GameType::Utility::kGeneralSum. Although it is strategically team-vs-team, individual utilities are +1/-1 by role-team outcome, so total utility is not guaranteed to sum to zero when team sizes differ.
Default parameters keep the game small and default-loadable:

  • players=6
  • imposters=1
  • max_rounds=10
  • observation_noise=0.1

@lanctot

lanctot commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Wow, cool. This is certainly a type of game that is missing from OpenSpiel.

Can you say more about the "tokenized communication action" ?

What do you mean by "tokenized" -- is it single word from a predetermined set of words? Any link to natural language?

@lanctot

lanctot commented May 6, 2026

Copy link
Copy Markdown
Collaborator

One more question: how does the communication actions affect the number of distinct actions?

@Arahan-kujur

Copy link
Copy Markdown
Contributor Author

One more question: how does the communication actions affect the number of distinct actions?

Thanks! By “tokenized communication” I mean a small, fixed set of discrete message actions defined by the game, not free-form natural language.

In this first version, messages are things like SKIP, CLAIM_INNOCENT, ACCUSE_PLAYER_i, and DEFEND_PLAYER_i. Internally these are just integer actions with human-readable string labels. There is no NLP component, text generation, or parser in the game itself.

The goal is to make cheap talk, signaling, accusations, defense, and deception available in a controlled finite-action setting. If someone wanted to use natural language or an LLM policy, they could map external text or prompts onto these discrete message actions, but the OpenSpiel game remains symbolic and reproducible.

For the action-space question: the game uses one shared action id space, and legal actions are filtered by phase. Voting actions are 0 to num_players - 1. Communication actions are 0 for SKIP, 1 for CLAIM_INNOCENT, then one ACCUSE_PLAYER_i and one DEFEND_PLAYER_i action per player. So the communication vocabulary is the larger set, and NumDistinctActions() is effectively 2 + 2 * num_players.

During communication only the message actions are legal; during voting only valid alive-player vote targets are legal.

@Arahan-kujur

Copy link
Copy Markdown
Contributor Author

Hey.
I noticed the macOS CI failure and tracked it down. It was a legal-action consistency issue in one of the chance nodes, not a nontermination issue.

During the observation phase, ChanceOutcomes() intentionally omits zero-probability outcomes. For example, with observation_noise = 0.0, some signal outcomes are impossible, so they are not returned. However, LegalActions() was still returning the full set of possible observation signal action ids, including those zero-probability outcomes.

OpenSpiel’s basic tests check that the legal action mask agrees with the legal actions for chance nodes, so the mismatch caused social_deduction_test to fail.

I fixed this by making chance-node LegalActions() use LegalChanceOutcomes(), so the legal action set now matches the actual nonzero-probability chance outcomes. I reran the local social deduction C++ test after the change and it passes.

@lanctot

lanctot commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Seems like the CLA check is failing. Did you use a different email contact as the one you used to sign the CLA?

@Arahan-kujur

Copy link
Copy Markdown
Contributor Author

Seems like the CLA check is failing. Did you use a different email contact as the one you used to sign the CLA?

I’m using the same email address for the CLA and GitHub account, so I’m not sure why the check is failing. I’ll double-check the commit author email and try re-syncing it.

@Arahan-kujur Arahan-kujur force-pushed the social-deduction-game branch from 3a8bc5b to 80d86cf Compare May 6, 2026 18:58
@Arahan-kujur

Copy link
Copy Markdown
Contributor Author

Seems like the CLA check is failing. Did you use a different email contact as the one you used to sign the CLA?

I figured it out — the issue was on my end. I had an unintended co-author attribution in one of the commits, which was triggering the CLA check. I’ve removed it and pushed the fix.

@Arahan-kujur

Copy link
Copy Markdown
Contributor Author

Hey! Just checking in on the PR. Wanted to see if there are any updates or changes I should make on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants