• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:51
CEST 06:51
KST 13:51
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 1 - Final Week6[ASL19] Finals Recap: Standing Tall15HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0
Community News
Esports World Cup 2025 - Brackets Revealed16Weekly Cups (July 7-13): Classic continues to roll8Team TLMC #5 - Submission extension3Firefly given lifetime ban by ESIC following match-fixing investigation17$25,000 Streamerzone StarCraft Pro Series announced7
StarCraft 2
General
Esports World Cup 2025 - Brackets Revealed RSL Revival patreon money discussion thread Who will win EWC 2025? The GOAT ranking of GOAT rankings Server Blocker
Tourneys
FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) RSL: Revival, a new crowdfunded tournament series $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
How did i lose this ZvP, whats the proper response
Custom Maps
External Content
Mutation # 482 Wheel of Misfortune Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome
Brood War
General
Flash Announces (and Retracts) Hiatus From ASL BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Soulkey Muta Micro Map? [ASL19] Finals Recap: Standing Tall
Tourneys
[Megathread] Daily Proleagues CSL Xiamen International Invitational 2025 ACS Season 2 Qualifier Cosmonarchy Pro Showmatches
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread CCLP - Command & Conquer League Project The PlayStation 5
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Korean Music Discussion Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Ping To Win? Pings And Their…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 619 users

Mafia Simuator

Forum Index > TL Mafia
Post a Reply
Cyber_Cheese
Profile Blog Joined July 2010
Australia3615 Posts
Last Edited: 2012-01-01 00:41:00
September 16 2011 20:22 GMT
#1
I found a really awesome mafia simulator on the SC2 mafia forums, thought I'd share it here
Please note that it is *not* made by me.

Link to the site I found it: http://www.sc2mafia.com/forum/showthread.php/2117-Mafia-Simulator?highlight=simulator
+ Show Spoiler [The introductory paragraphs] +

~ Introduction ~
Mafia Simulator is a program based on Dark.Revenant's SC2 Map "-Mafia-" and Forum Mafia on councilofmages.com.
It features almost all roles present in those environments and their options, as well as some new stuff added by the programmers.

With this program, you can simulate almost every setup you could see in SC2Mafia, or even add players for simulating more populated environments. The AI is pretty simple, as it cannot properly emulate human brain and players interaction, however it takes into account all actions that in-game roles could do, memorize them, and use them when time is due. For example, if a sheriff finds mafia, that player will be lynched next day.

Organized teams will also try their best to accomplish their victory condition: mafia and cult will never vote against their own members, culted doctors will heal the cult leader, consigliere will find town power roles and send mafia to kill them the following night, and so on.

Set roles options as you see fit to recreate some of the most entertaining conditions for a mafia game. Then enjoy reading the log and see what happened.
Alternatively you can run a high number of simulations - multithread helps - and then check the graphs to see if it is nearly balanced or if it needs more tweaks.

A summary: It's a program that can take a list of roles which the user customises into the ones that will and won't be in the game, and simulates it over the course of X games, displaying statistical results that can be used to help balance mafia setups. If one of the games has a curious result, e.g no winner, the log can be viewed and you can check how the game went down.

Important notes are that it does not factor player skill, and there a few things about the AI that players might not choose to do, i.e a sheriff who detects mafia will immediately reveal and get attacked right afterwards.
The moment you lose confidence in yourself, is the moment the world loses it's confidence in you.
Hesmyrr
Profile Blog Joined May 2010
Canada5776 Posts
Last Edited: 2011-09-16 20:37:15
September 16 2011 20:35 GMT
#2
I'll stick with old-school pen & paper, RNG calculator thanks xD
While pretty cool don't think it will help with any game that tries to introduce novel mechanics. Interesting find though.
"If watching the MSL finals makes you a progamer, then anyone in Korea can do it." - Ha Tae Ki
kitaman27 *
Profile Blog Joined April 2009
United States9245 Posts
September 25 2011 13:32 GMT
#3
Just out of curiosity, I ran the four possible setups from SNMMVI and here is what came out. Probably can't much faith into this, but it was interesting to see how big of a swing there was between 1 medic and 1 detective.

Town % / Mafia %

36/63
1 Mafia Role Blocker, 1 Mafia Goons, 8 Town

27/73
2 Mafia Goons, 1 Medic, 7 Town.

50/50
2 Mafia Goons, 1 Detective, 7 Town.

55/45
1 Mafia Role Blocker, 1 Mafia Goons, 6 Town, 1 Medic, 1 Detective



I'm better than dirt. Well, most kinds of dirt. I mean not that fancy store bought dirt. That stuffs loaded with nutrients. I... I can't compete with that stuff.
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
September 25 2011 15:48 GMT
#4
That actually makes no sense whatsoever.

Second setup can't possibly be worse for town than the first setup. There's no way having a medic is worse for town because the only blockable night kills are mafia kills, therefore setup 2 should have a higher win % for town than setup 1
Radfield
Profile Joined September 2009
Canada2720 Posts
September 25 2011 17:31 GMT
#5
Yep, makes no sense.

Assuming the medic saves no one, then the setup is the exact same as 8VT. If the medic makes a save then it's pretty much GG.
GMarshal
Profile Blog Joined March 2010
United States22154 Posts
Last Edited: 2011-09-25 17:44:13
September 25 2011 17:43 GMT
#6
I guess an all medic vs regular scum setup would be scum favored then :-P
Moderator
Radfield
Profile Joined September 2009
Canada2720 Posts
September 25 2011 18:16 GMT
#7
On September 26 2011 02:43 GMarshal wrote:
I guess an all medic vs regular scum setup would be scum favored then :-P



It would be fun to run a game like that. High scum KP, lotsa medics. SO MUCH WIFOM!
Kurumi
Profile Blog Joined April 2010
Poland6130 Posts
September 25 2011 19:04 GMT
#8
On September 26 2011 03:16 Radfield wrote:
Show nested quote +
On September 26 2011 02:43 GMarshal wrote:
I guess an all medic vs regular scum setup would be scum favored then :-P



It would be fun to run a game like that. High scum KP, lotsa medics. SO MUCH WIFOM!

And my next mafia setup got figured out...
I work alone. // Visit TL Mafia subforum!
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
September 25 2011 19:38 GMT
#9
all town setup lol
Radfield
Profile Joined September 2009
Canada2720 Posts
September 25 2011 20:00 GMT
#10
On September 26 2011 04:04 Kurumi wrote:
Show nested quote +
On September 26 2011 03:16 Radfield wrote:
On September 26 2011 02:43 GMarshal wrote:
I guess an all medic vs regular scum setup would be scum favored then :-P



It would be fun to run a game like that. High scum KP, lotsa medics. SO MUCH WIFOM!

And my next mafia setup got figured out...



You can even mix in doctor sanities for extra fun! Sane, Paranoid(jailer), Naive, Weak..... CPR!?

Toss in some mafia roleblockers and poof!.... a set-up.
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
September 25 2011 20:01 GMT
#11
LOL

that would be freaking hilarious
GMarshal
Profile Blog Joined March 2010
United States22154 Posts
September 25 2011 20:21 GMT
#12
On September 26 2011 05:00 Radfield wrote:
Show nested quote +
On September 26 2011 04:04 Kurumi wrote:
On September 26 2011 03:16 Radfield wrote:
On September 26 2011 02:43 GMarshal wrote:
I guess an all medic vs regular scum setup would be scum favored then :-P



It would be fun to run a game like that. High scum KP, lotsa medics. SO MUCH WIFOM!

And my next mafia setup got figured out...



You can even mix in doctor sanities for extra fun! Sane, Paranoid(jailer), Naive, Weak..... CPR!?

Toss in some mafia roleblockers and poof!.... a set-up.

Dont forget to add a serial killer and a bunch of town/scum vigilantes.
Moderator
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
September 25 2011 20:23 GMT
#13
no just doctors GMarsh gawd
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
September 25 2011 20:23 GMT
#14
I'd call it med school mafia
Radfield
Profile Joined September 2009
Canada2720 Posts
September 25 2011 22:24 GMT
#15
GMan always recking stuff geez
GreYMisT
Profile Blog Joined October 2010
United States6736 Posts
September 25 2011 23:47 GMT
#16
ready?
30 people
25 medics
4 mafia busdrivers
1 arsonist

Ready set go
"life of lively to live to life of full life thx to shield battery" / Join TL Mafia! http://www.teamliquid.net/forum/index.php?show_part=31
Cyber_Cheese
Profile Blog Joined July 2010
Australia3615 Posts
Last Edited: 2011-09-29 06:14:40
September 29 2011 05:59 GMT
#17
On September 26 2011 00:48 wherebugsgo wrote:
That actually makes no sense whatsoever.

Second setup can't possibly be worse for town than the first setup. There's no way having a medic is worse for town because the only blockable night kills are mafia kills, therefore setup 2 should have a higher win % for town than setup 1


To a small degree I think I can explain it.
How many games did he simulate?
Over 10k games I got:

+ Show Spoiler [Initial Results] +
1 Mafia Role Blocker, 1 Mafia Goons, 8 Town
Results for 10000 iterations after 5.87 seconds:
Pure: 6553 town wins, 3447 mafia wins.

2 Mafia Goons, 1 Medic, 7 Town.
Results for 10000 iterations after 5.18 seconds:
Pure: 6234 town wins, 3766 mafia wins.

2 Mafia Goons, 1 Detective, 7 Town.
Results for 10000 iterations after 5.20 seconds:
Pure: 7806 town wins, 2194 mafia wins.

1 Mafia Role Blocker, 1 Mafia Goons, 6 Town, 1 Medic, 1 Detective
Results for 10000 iterations after 4.94 seconds:
Pure: 7360 town wins, 2640 mafia wins.

The Docs must be broken though because
2 Mafia Goons, 8 Medics
Results for 10000 iterations after 5.65 seconds:
Pure: 3812 town wins, 6188 mafia wins.

I actually really want to see a game full of medics now :D
EDIT: LOLWAIT, under citizen settings, turn wins ties with mafia off.

+ Show Spoiler [New Results] +
1 Mafia Role Blocker, 1 Mafia Goons, 8 Town
Results for 10000 iterations after 5.30 seconds:
Pure: 2184 town wins, 7816 mafia wins.

2 Mafia Goons, 1 Medic, 7 Town.
Results for 10000 iterations after 3.97 seconds:
Pure: 2548 town wins, 7452 mafia wins.

2 Mafia Goons, 1 Detective, 7 Town.
Results for 10000 iterations after 3.99 seconds:
Pure: 3604 town wins, 6396 mafia wins.

1 Mafia Role Blocker, 1 Mafia Goons, 6 Town, 1 Medic, 1 Detective
Results for 10000 iterations after 4.11 seconds:
Pure: 3890 town wins, 6110 mafia wins.

Edit 2: And I just realised they all look imbalanced because there is supposed to be 10 town, not 10 total.
The moment you lose confidence in yourself, is the moment the world loses it's confidence in you.
Cyber_Cheese
Profile Blog Joined July 2010
Australia3615 Posts
September 29 2011 06:11 GMT
#18
On September 26 2011 08:47 GreYMisT wrote:
ready?
30 people
25 medics
4 mafia busdrivers
1 arsonist

Ready set go


If only it were compatible with mafia bus drivers.
The moment you lose confidence in yourself, is the moment the world loses it's confidence in you.
Please log in or register to reply.
Live Events Refresh
Next event in 5h 9m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 332
StarCraft: Brood War
Sea 12303
PianO 83
ajuk12(nOOB) 20
LuMiX 1
Britney 0
Dota 2
monkeys_forever907
League of Legends
JimRising 731
Counter-Strike
Stewie2K1103
Other Games
summit1g13141
shahzam1241
WinterStarcraft388
C9.Mang0269
ViBE221
ROOTCatZ34
Trikslyr32
Organizations
Other Games
gamesdonequick4109
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH202
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki15
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1299
• Stunt551
Upcoming Events
CranKy Ducklings
5h 9m
Epic.LAN
7h 9m
CSO Contender
12h 9m
Sparkling Tuna Cup
1d 5h
Online Event
1d 11h
Esports World Cup
3 days
ByuN vs Astrea
Lambo vs HeRoMaRinE
Clem vs TBD
Solar vs Zoun
SHIN vs Reynor
Maru vs TriGGeR
herO vs Lancer
Cure vs ShoWTimE
Esports World Cup
4 days
Esports World Cup
5 days
Esports World Cup
6 days
Liquipedia Results

Completed

CSL Xiamen Invitational: ShowMatche
RSL Revival: Season 1
Murky Cup #2

Ongoing

BSL 2v2 Season 3
Copa Latinoamericana 4
Jiahua Invitational
BSL20 Non-Korean Championship
CSL Xiamen Invitational
2025 ACS Season 2
Championship of Russia 2025
Underdog Cup #2
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
BSL Season 21
RSL Revival: Season 2
SEL Season 2 Championship
uThermal 2v2 Main Event
FEL Cracov 2025
Esports World Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.