This repository provides a complete Python implementation for simulating Mafia games with language model AI agents, training the Mafia role to deceive via reinforcement learning, and visualizing training progress.
How It Works
You find this fun project where smart computer players learn to play the classic game of Mafia, full of deception and detective work, just like family game nights.
Download the simple files to your computer and prepare everything with easy steps so games can start right away.
Kick off a game and see the AI villagers, doctor, detective, troll, and mafia chat, accuse, vote, and scheme through days and nights.
Witness the mafia blending in, echoing the group, deflecting blame, and secretly eliminating threats to outsmart everyone.
Choose a role like mafia or detective and chat live against the AI players, feeling the tension of every discussion and vote.
Let it practice many games automatically to teach the mafia better tricks for winning without getting caught.
Review game logs and charts showing improved win rates, then use the sneaky tactics in your real-life Mafia games with friends.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.