• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:31
CET 22:31
KST 06:31
  • 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
[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9
Community News
2025 RSL Offline Finals Dates + Ticket Sales!9BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION1Crank Gathers Season 2: SC II Pro Teams9Merivale 8 Open - LAN - Stellar Fest3Chinese SC2 server to reopen; live all-star event in Hangzhou23
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" The New Patch Killed Mech! Could we add "Avoid Matchup" Feature for rankgame Chinese SC2 server to reopen; live all-star event in Hangzhou Weekly Cups (Oct 13-19): Clem Goes for Four
Tourneys
Crank Gathers Season 2: SC II Pro Teams 2025 RSL Offline Finals Dates + Ticket Sales! Merivale 8 Open - LAN - Stellar Fest $5,000+ WardiTV 2025 Championship $3,500 WardiTV Korean Royale S4
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BSL Team A vs Koreans - Sat-Sun 16:00 CET [ASL20] Finals Preview: Arrival BW General Discussion BSL Season 21
Tourneys
[ASL20] Grand Finals The Casual Games of the Week Thread BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION ASL final tickets help
Strategy
How to stay on top of macro? PvZ map balance Soma's 9 hatch build from ASL Game 2 Current Meta
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Path of Exile Nintendo Switch Thread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread The Chess Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! Anime Discussion Thread [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
LMAO (controversial!!)
Peanutsc
The Benefits Of Limited Comm…
TrAiDoS
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1449 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 3h 29m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SpeCial 165
Railgan 66
StarCraft: Brood War
Britney 13694
Bonyth 102
NaDa 7
Dota 2
monkeys_forever374
capcasts150
Counter-Strike
Foxcn165
Super Smash Bros
C9.Mang0471
PPMD28
Heroes of the Storm
Liquid`Hasu474
Other Games
Grubby2904
fl0m1054
FrodaN1034
ceh9413
shahzam411
Skadoodle220
ArmadaUGS91
ViBE85
Moletrap5
Models1
Maynarde0
Organizations
StarCraft 2
angryscii 42
Other Games
BasetradeTV22
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Hupsaiya 60
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21442
League of Legends
• Doublelift2790
Other Games
• imaqtpie1181
• Scarra688
• Shiphtur184
Upcoming Events
BSL 21
3h 29m
Replay Cast
12h 29m
BASILISK vs Shopify Rebellion
Team Liquid vs Team Falcon
OSC
14h 29m
CrankTV Team League
15h 29m
Shopify Rebellion vs Team Liquid
BASILISK vs Team Falcon
Replay Cast
1d 1h
The PondCast
1d 11h
CrankTV Team League
1d 15h
Replay Cast
2 days
WardiTV Invitational
2 days
MaNa vs Gerald
Rogue vs GuMiho
ByuN vs Spirit
herO vs Solar
CrankTV Team League
2 days
[ Show More ]
Replay Cast
3 days
BSL Team A[vengers]
3 days
Dewalt vs Shine
UltrA vs ZeLoT
BSL 21
3 days
Sparkling Tuna Cup
4 days
BSL Team A[vengers]
4 days
Cross vs Motive
Sziky vs HiyA
BSL 21
4 days
Wardi Open
5 days
Monday Night Weeklies
5 days
Liquipedia Results

Completed

ASL Season 20
WardiTV TLMC #15
Eternal Conflict S1

Ongoing

BSL 21 Points
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
CranK Gathers Season 2: SC II Pro Teams
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 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

Upcoming

SC4ALL: Brood War
YSL S2
BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
META Madness #9
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 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.