• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 18:02
CET 00:02
KST 08:02
  • 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 Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3ComeBackTV's documentary on Byun's Career !10Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2
StarCraft 2
General
Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies ComeBackTV's documentary on Byun's Career ! Micro Lags When Playing SC2? When will we find out if there are more tournament Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win
Tourneys
$100 Prize Pool - Winter Warp Gate Masters Showdow $5,000+ WardiTV 2025 Championship Sparkling Tuna Cup - Weekly Open Tournament Winter Warp Gate Amateur Showdown #1 RSL Offline Finals Info - Dec 13 and 14!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 505 Rise From Ashes Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement
Brood War
General
BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Anyone remember me from 2000s Bnet EAST server? soO on: FanTaSy's Potential Return to StarCraft Klaucher discontinued / in-game color settings
Tourneys
[Megathread] Daily Proleagues [BSL21] LB QuarterFinals - Sunday 21:00 CET Small VOD Thread 2.0 [BSL21] WB SEMIFINALS - Saturday 21:00 CET
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Current Meta Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Beyond All Reason Path of Exile General RTS Discussion Thread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread The Games Industry And ATVI Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced Where to ask questions and add stream?
Blogs
The (Hidden) Drug Problem in…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1212 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 12h 58m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft424
JuggernautJason108
elazer 100
StarCraft: Brood War
EffOrt 110
Artosis 69
910 51
Dota 2
febbydoto16
League of Legends
C9.Mang0154
Super Smash Bros
hungrybox497
Other Games
Grubby3718
tarik_tv2077
FrodaN1944
B2W.Neo670
shahzam326
mouzStarbuck212
RotterdaM211
Liquid`Hasu158
Maynarde101
XaKoH 95
Mew2King56
ViBE24
Organizations
Other Games
BasetradeTV60
StarCraft 2
angryscii 38
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• RyuSc2 58
• Reevou 16
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• sooper7s
• Migwel
StarCraft: Brood War
• mYiSmile125
• Michael_bg 5
• XenOsky 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21984
Other Games
• imaqtpie1871
• Shiphtur466
Upcoming Events
WardiTV Invitational
12h 58m
Gerald vs YoungYakov
Spirit vs MaNa
SHIN vs Percival
Creator vs Scarlett
Replay Cast
1d 9h
WardiTV Invitational
1d 12h
ByuN vs Solar
Clem vs Classic
Cure vs herO
Reynor vs MaxPax
Replay Cast
3 days
Sparkling Tuna Cup
4 days
Krystianer vs TBD
TriGGeR vs SKillous
Percival vs TBD
ByuN vs Nicoract
Replay Cast
5 days
Wardi Open
5 days
Liquipedia Results

Completed

Proleague 2025-12-22
WardiTV 2025
META Madness #9

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
BSL Season 21
Slon Tour Season 2
CSL Season 19: Qualifier 2
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
OSC Championship Season 13
Nations Cup 2026
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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.