🔗 Project Link :D
For a quick command reference, see commands.md.
python3 -m venv mitv
source mitv/bin/activatepip install -r requirements.txtCreate a .env file by copying .env.example, then fill in your real OpenAI API key.
cp .env.example .envYou can use .env.example as the reference format.
Use the client-server flow for the actual voice game:
python3 -m uvicorn server:app --port 8000 --host 0.0.0.0Local development client for Mac/Windows testing
python3 pi_client.py Raspberry Pi deployment client
python3 pi_clinet_real.py
- FastAPI backend for the game.
- Handles setup, player registration, role reveal flow, turn progression, voting, result generation, TTS prompt generation, and STT processing.
pi_client.pyandpi_client_real.pyboth communicate with this server over HTTP.
- Local development client for Mac/Windows testing.
- Hardware behavior is mocked with terminal prints, so no Raspberry Pi, LEDs, or LCD are required.
- Works as the front-end controller that polls
server.py, records audio, and sends player actions to the backend.
- Raspberry Pi deployment client.
- Same server communication flow as
pi_client.py, but with real hardware control for serial LED commands and LCD output.
- Standalone terminal-only version of the game.
- This file does not act as a bridge between
pi_client.py,pi_client_real.py, andserver.py. - It runs its own local game flow without the FastAPI client-server architecture.
We viewed the prompting as an iterative optimization process. We did not fine tune our model weight but we iterated through different versions of prompts based on what was inputted from the player. At one point, AI players would give the liars too much information regarding the secret word to easily figure out, which affected the overall objective of the game. Thus, we continued to revise and test new prompts with real-time game testing and utilized our best judgement to choose the better performing version of the prompts. Therefore, we developed a human-in-the-loop prompt refinement cycle: rather than update the model parameter we updated the behavior through observation of the failures (cases), identification of the preferable responses, and continuous revisions to the instruction. We are not claiming there is a formal benchmark; however, the later versions of prompts provided a more balanced clue and allowed for more playable rounds than previous versions.