Inspiration

I wanted to make use of the Gemini and ElevenLabs API, and I thought what better use than to run a social intrigue game? I also wanted to incorporate the FreeWili hardware, as I find the form factor very convenient.

What it does

In its current state, the code runs largely on the laptop. It plays some pre-fected, some dynamically generated voicelines from the ElevenLabs api, which are sent on-the-fly through the usb to be played on the free wili's speakers. (The text of the voicelines are generated using the Gemini api, with fallbacks to switch the backend to help with free tier usage limits.)

How we built it

The app was entirely vibe coded. I made use of Google AI Studio to find/generate a copy of the Mafia rules that were succinct (with some slight passing code back to it for some debugging attempts), then used Google Antigravity and Gemini CLI to create the application, as well as OpenAI's Codex CLI.

Challenges we ran into

This overlaps with accomplishments we're proud of, but getting the voice from ElevenLabs to play properly was a bit of a challenge (it initially didn't work at all, then played at an incredibly slow pitch, then after some iterative refinement managed to play properly- it seemed to be an issue related to the quality of the audio vs what the usb connection could realistically handle.)

Accomplishments that we're proud of

See above.

What we learned

The state of the AI scene is far more advanced than most might think. I was only semi-seriously considering participating in this hackathon, "vibe coding" this app actually worked for me to be able to do that. This also helped expose some of the vulnerability of relying on "vibe coding" - while it worked, I often ran into regressions that I had to instruct the ai to repair by comparing with older git commits.

What's next for AI Social Intrigue Game on Free Wili

If I have the time, or in the future, I'm hoping to make the flow of the game a little more robust and maybe have the free wili use the wifi chip to directly make the requests and stream the audio, as well as maybe throw in a few more fun things that aren't directly related to the social intrigue game to try and push the hardware a bit further. (For instance, the idea to use the camera attachment I grabbed as effectively an additional "ram stick" was suggested by the agent when I was trying to probe it for ideas on doing this. So stayed tuned if that works.) I'm currently just having a mode where one person can play as the mafia for my MVP shipping of this. I also want to make it a bit "prettier" overall, right now the game is using simple text display as the ui.

Video: https://drive.google.com/file/d/1uETtGyL4rU0uLE_kP7Yl5ymWH_lPw9Aw/view?usp=sharing

Built With

  • claude
  • elevenlabs-api
  • freewili
  • gemini
  • gemini-api
  • gemini-cli
  • google-ai-studio
  • google-antigravity
  • openai-codex
  • python
Share this project:

Updates

posted an update

I had some time while we were waiting to more fully test the game (as I only barely got the game completed in time, and had tested it more fully using only AI before) and it turns out there are a few bugs I didn't notice later on in the game. (Talking with the fellow mafia member only allows for one response, the voice glitched during the day discussion and started playing slow again.) I don't think it would take too much to fix it and the core logic is working (the mafia member replied to what was transcribed, etc.) but I thought it was worth noting for the sake of transparency.

Log in or sign up for Devpost to join the conversation.