This game uses the OpenAI API to generate word pairs for the game.
The model used is gpt-4o-mini, which is a lightweight low cost version ($0.15 input, $0.075 output per 1M tokens).
For an N player game, N-1 players (civilians) are given the same secret word, and one randomly selected player (the imposter) is given a different (but similar) secret word.
ex) For a 4 player game, 3 players will be given "kitchen" and 1 player will be given "restaurant".
No one knows whether they are an imposter or a civilian.
The goal of the imposter is to blend in and not get caught, while the goal of the civilians is to identify and eliminate the imposter.
git clone https://github.com/chaseungjoon/imposter
cd imposterpip install -r requirements.txtecho "OPENAI_API_KEY=your_api_key" > .envpython main.py- Enter the names of all players
- The device is passed around so each player privately sees their secret word
- Players take turns each saying one word related to their secret word and try to figure out who the imposter is
- After a few (2~3) rounds of discussion, the players vote on who they think the imposter is.
- The player with the most votes is revealed and terminated.
If the imposter is terminated, the imposter has a chance to guess the civilian secret word.
-
If the imposter guesses the civilian word correctly, the imposter wins and recieve 5 points.
-
If the imposter fails to guess the word, the civilians win and recieve 7 points.
The imposter wins and recieve 10 points, and the civilians who voted for the imposter recieve 7 points.
- The game can continue for multiple rounds, with players accumulating points based on their performance in each round.
Pre configured scoring system for civilians and imposter
Customizable number of players and rounds
Word pair (different from pre-used words in log.csv) generation using OpenAI API