• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:21
CEST 22:21
KST 05:21
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL50Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
The SCII GOAT: A statistical Evaluation The GOAT ranking of GOAT rankings How does the number of casters affect your enjoyment of esports? Statistics for vetoed/disliked maps Esports World Cup 2025 - Final Player Roster
Tourneys
Korean Starcraft League Week 77 Master Swan Open (Global Bronze-Master 2) RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Player “Jedi” cheat on CSL Unit and Spell Similarities Help: rep cant save Flash Announces Hiatus From ASL
Tourneys
[Megathread] Daily Proleagues [BSL20] Grand Finals - Sunday 20:00 CET Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
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 Trading/Investing Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 600 users

C9++ Setup Generator

Forum Index > TL Mafia
Post a Reply
Normal
Xatalos
Profile Joined January 2011
Finland9675 Posts
Last Edited: 2014-09-30 14:16:21
September 28 2014 22:23 GMT
#1
After releasing the MafiaTools website ( http://www.teamliquid.net/forum/mafia/465676-mafiatools ) a while ago, and making some updates to the site initially (based on feedback), I haven't really spent much time on it lately. However, today I finally got around to making a big addition the site: a C9++ setup generator. I felt that it was a large enough addition to warrant its own thread (since many players who might be interested in this tool wouldn't probably be following the original MafiaTools thread).

Basically this is a tool for automating the tedious process of creating a new C9++ setup manually. It should be of use for anyone who considers hosting games, actually more so than my earlier tool for automated balance testing ( http://www.teamliquid.net/forum/mafia/436988-automatic-balance-tester ). I think even the most experienced hosts would benefit from automating this process - unlike with the automated balance tester.

Here's a direct link to the new tool: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html (link updated)

Here's a link to the source code used to generate new setups: http://pastebin.com/xePzkUhQ (link updated)

Here are the rules I based this tool on: http://wiki.mafiascum.net/index.php?title=C9++

Bug reports and other suggestions are very welcome. It seems to be working correctly, but there could always be something that I managed to miss.

Also huge thanks to the players who gave valuable feedback in the original MafiaTools thread! There are still a couple of suggestions that haven't been implemented, but I'll probably get around to them at some point.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
yamato77
Profile Blog Joined October 2010
11589 Posts
September 28 2014 22:45 GMT
#2
We ran a bunch of C9++ a while ago and ended up hating them.
Writer@WriterYamato
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
September 29 2014 00:24 GMT
#3
I don't care I will use this for stuff elsewhere.

Gracias xata
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 05:44 GMT
#4
On September 29 2014 07:45 yamato77 wrote:
We ran a bunch of C9++ a while ago and ended up hating them.


I'm not quite sure what you mean exactly? In any case, it might not be a perfect setup, but I think it's pretty good and certainly has its uses..
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 05:45 GMT
#5
On September 29 2014 09:24 Alakaslam wrote:
I don't care I will use this for stuff elsewhere.

Gracias xata


No problem
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
yamato77
Profile Blog Joined October 2010
11589 Posts
September 29 2014 16:13 GMT
#6
Bugs ran C9++ games and people ended up gaming the setup more than they played actual mafia.

I'm sure it's fine if you modify it so that mass claim doesn't fuck mafia
Writer@WriterYamato
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 18:24 GMT
#7
On September 30 2014 01:13 yamato77 wrote:
Bugs ran C9++ games and people ended up gaming the setup more than they played actual mafia.

I'm sure it's fine if you modify it so that mass claim doesn't fuck mafia


Oh OK

I guess that problem can be solved by claiming that it's a "modified C9++ setup" with some minor modification like you said. That would prevent setup speculation pretty effectively.

Well, my tool doesn't really allow for modification currently.... I guess something like that could be added to it?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 22:01 GMT
#8
Phew... The website was offline for a while, sorry about that. I ran into a problem that prevented the website from functioning properly. I finally got it fixed, though, so everything should be fine now.

More importantly, I created a new JavaScript-based version of the same tool here: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html

Source JavaScript here: http://pastebin.com/TcqYGBVe

It should work exactly the same as the Java-based version, but the advantage is that you don't need to reload the page to generate a new setup. I also left the original Java-based tool on the website, but this should be the superior tool among those two.

By the way, if there are any wishes for modifying the parameters of generating new C9++ setups with the tool, please share those here. As yamato77 mentioned, it might be useful to be able to modify the setup rules so that setup speculation becomes less of an issue during games.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Foolishness *
Profile Blog Joined May 2009
United States3044 Posts
September 30 2014 00:56 GMT
#9
Blazinghand should know all the modifications to make c9 a worthwhile setup to play.

Though by that point it's not even c9 anymore...

Cloud 9.
geript: "Foolishness's cases are persuasive and reasonable but leave you feeling dirty afterwards. Kinda like a whore." ---- Manager of the TL Mafia forum, come play!
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
September 30 2014 02:28 GMT
#10
Cool. Yeah, the problem is that it's going to be harder to make "modified setups" without having to change the source code every time.

Makes me want to go back and finish (ehm....."start") that setup generator+runner I wanted. I swear that when I finish uni I'll (maybe) get to it!


The more you study and learn, the more stuff you want to do and in more awesome different ways. Like creating a forum-based epicmafia kind of system, where you can play games in the web site itself, or via a web service you can have personalized bots do the automated setup-things while the game is played in each individual forum. But yeah....takes time.
Wish I could have a pause button to pause time and do this kind of stuff, then unpause and keep going with my life.


Hmm...thinking about it I would want to have more time to play mafia again (ehmm...I think it's been like 9 months since the last time I played here)....or fixing the mafia spreadsheet thing Google fucked up >_>

Anyways, cool tool. I think these kind of "quick and dirty tools" will be of great help so far, since they are easy to use, maintain, and just create a new one if one so desires.


Also, you know the cool thing about the javascript thing: You don't even need to "host" it anywhere.

Try this:

1) Paste the code below in Notepad, and save it as "c9Generator.html":
+ Show Spoiler +



<!DOCTYPE html>
<html>
<head>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/bootstrap-select.css" rel="stylesheet">
<title>MafiaTools C9++ Setup Generator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="container">
<h1>C9++ Setup Generator</h1>
<p> <a href="index.jsp"><button type="button" class="btn btn-xs btn-default">Go Back</button></a>
<button type="button" onclick="generateroles();" class="btn btn-xs btn-default">Generate New C9++ Setup</button>
</p>
<form name="rolesform">
<ul id="roles">
</ul>
</form>
</div>
<script>
function generateroles() {
var rolestohtml = "";
var roles = [];
var numbers = [];
var characters = [];

for (var index = 0; index < 7; ++index) {
numbers.push(Math.floor(Math.random() * (99)) + 1);
}

numbers.forEach(function(number) {
if (number <= 50) {
characters.push('T');
} else if (number >= 51 && number <= 65) {
characters.push('C');
} else if (number >= 66 && number <= 75) {
characters.push('D');
} else if (number >= 76 && number <= 85) {
characters.push('V');
} else if (number >= 86 && number <= 95) {
characters.push('M');
} else if (number >= 96) {
characters.push('B');
}
});

var tCount = 0;
var cCount = 0;
var dCount = 0;
var vCount = 0;
var mCount = 0;
var bCount = 0;

characters.forEach(function(character) {
if (character === 'T') {
tCount++;
} else if (character === 'C') {
cCount++;
} else if (character === 'D') {
dCount++;
} else if (character === 'V') {
vCount++;
} else if (character === 'M') {
mCount++;
}
else if (character === 'B') {
bCount++;
}
});

if (cCount === 1) {
roles.push("1-Shot Cop");
} else if (cCount === 2) {
roles.push("Cop");
} else if (cCount === 3) {
roles.push("Cop");
roles.push("1-Shot Cop");
} else if (cCount === 4) {
roles.push("Cop");
roles.push("Cop");
} else if (cCount === 5) {
roles.push("Cop");
roles.push("Cop");
roles.push("1-Shot Cop");
} else if (cCount === 6) {
roles.push("Cop");
roles.push("Cop");
roles.push("Cop");
}

if (dCount === 1) {
roles.push("Doctor");
} else if (dCount === 2) {
roles.push("Doctor");
roles.push("1-Shot Doctor");
} else if (dCount === 3) {
roles.push("Doctor");
roles.push("Doctor");
} else if (dCount === 4) {
roles.push("Doctor");
roles.push("Doctor");
roles.push("1-Shot Doctor");
} else if (dCount === 5) {
roles.push("Doctor");
roles.push("Doctor");
roles.push("Doctor");
}

if (vCount === 1) {
roles.push("1-Shot Vigilante");
} else if (vCount === 2) {
roles.push("Vigilante");
} else if (vCount === 3) {
roles.push("Vigilante");
roles.push("1-Shot Vigilante");
} else if (vCount === 4) {
roles.push("Vigilante");
roles.push("Vigilante");
} else if (vCount === 5) {
roles.push("Vigilante");
roles.push("Vigilante");
roles.push("1-Shot Vigilante");
}

if (mCount === 1) {
roles.push("Innocent Child");
} else if (mCount === 2) {
roles.push("Mason");
roles.push("Mason");
} else if (mCount === 3) {
roles.push("Mason");
roles.push("Mason");
roles.push("Innocent Child");
} else if (mCount === 4) {
roles.push("Mason");
roles.push("Mason");
roles.push("Mason");
} else if (mCount === 5) {
roles.push("Mason (Mason group 1)");
roles.push("Mason (Mason group 1)");
roles.push("Mason (Mason group 2)");
roles.push("Mason (Mason group 2)");
}

if (bCount === 1) {
roles.push("Roleblocker");
} else if (bCount === 2) {
roles.push("Roleblocker");
roles.push("1-Shot Roleblocker");
} else if (bCount === 3) {
roles.push("Roleblocker");
roles.push("Roleblocker");
} else if (bCount === 4) {
roles.push("Roleblocker");
roles.push("Roleblocker");
roles.push("1-Shot Roleblocker");
}
if (tCount === 0) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
} else if (tCount === 1) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
} else if (tCount === 2) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
} else if (tCount === 3) {
roles.push("Mafia Goon");
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Serial Killer");
} else if (tCount === 4) {
roles.push("Mafia Goon");
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
} else if (tCount === 5) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
} else if (tCount === 6) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
} else if (tCount === 7) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
}

while (roles.length < 13) {
roles.push("Vanilla Townie");
}

roles.forEach(function(role) {
rolestohtml += "<li>" + role + "</li>";
});
document.getElementById("roles").innerHTML = rolestohtml;
}
</script>
</body>
</html>



2) Double-click this file you created
3) Enjoy your own C9 generator app, that can run even when offline, etc.

If you keep creating javascript tools, you don't even need a server. Just put up the HTML files so people can download them and use them on their own (though hosting them might be more convenient for some people).
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 06:45 GMT
#11
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 07:37 GMT
#12
Yeah, that's definitely one effective way of using the tool. If you wanted to, you could even take the script and include it on your own website (I don't mind, although mentioning the source would be nice).

Well, I think the optimal solution is still for myself to host the script for now - because there are many scenarios where that would be for the best (for example: when using your phone or using the tool at work). But it certainly can't hurt to create an offline version of it as well like you mentioned.

I understand very well the feeling of lacking time Well, this tool was pretty quick to create, but anything larger would certainly put a heavy strain on my studies. Although I guess it could be doable to spread the usage of time over a larger period of time... What you talked about seemed pretty interesting and I'd definitely like to see at least some kind of a prototype of it if you can spare any time between your university work? Do you mean it'd be like a more comprehensive version of this tool - one that you could generate setups using any rules with? Seems pretty difficult to account for so many variables... But I guess it could be doable. And automating the process of votecounts etc. could certainly be helpful.

And yeah, like I said earlier, suggestions on modifying the rules of C9++ are still very welcome
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 08:00 GMT
#13
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 08:02:21
September 30 2014 08:02 GMT
#14
On September 30 2014 17:00 Xatalos wrote:
Show nested quote +
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?


The simple way is that if you would have an SK, 50% of the time that SK is instead a VT. If you would normally have no SK, 50% of the time, turn one VT into an SK. Whether or not you have an SK is therefore independent of the number of blue roles.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 08:24 GMT
#15
On September 30 2014 17:02 Blazinghand wrote:
Show nested quote +
On September 30 2014 17:00 Xatalos wrote:
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?


The simple way is that if you would have an SK, 50% of the time that SK is instead a VT. If you would normally have no SK, 50% of the time, turn one VT into an SK. Whether or not you have an SK is therefore independent of the number of blue roles.


Okay. I'll probably add the option of not having a SK tonight.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 14:14 GMT
#16
Now there's a checkbox labeled as "No Serial Killers". Checking that means simply that if you would normally get a Serial Killer, you now get a Vanilla Townie instead. Perhaps a bit unnecessary, since you could just do the change manually, but why not

New source JavaScript here: http://pastebin.com/xePzkUhQ

Link to the JavaScript version: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html

Any other suggestions for modifying the basic setup?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
September 30 2014 21:43 GMT
#17
On September 30 2014 16:37 Xatalos wrote:
Yeah, that's definitely one effective way of using the tool. If you wanted to, you could even take the script and include it on your own website (I don't mind, although mentioning the source would be nice).

Well, I think the optimal solution is still for myself to host the script for now - because there are many scenarios where that would be for the best (for example: when using your phone or using the tool at work). But it certainly can't hurt to create an offline version of it as well like you mentioned.

I understand very well the feeling of lacking time Well, this tool was pretty quick to create, but anything larger would certainly put a heavy strain on my studies. Although I guess it could be doable to spread the usage of time over a larger period of time... What you talked about seemed pretty interesting and I'd definitely like to see at least some kind of a prototype of it if you can spare any time between your university work? Do you mean it'd be like a more comprehensive version of this tool - one that you could generate setups using any rules with? Seems pretty difficult to account for so many variables... But I guess it could be doable. And automating the process of votecounts etc. could certainly be helpful.

And yeah, like I said earlier, suggestions on modifying the rules of C9++ are still very welcome


Basically I had the idea of trying to make the "hosting" of games take place in a server. Basically, think of anything a host does:

-Create setups
-Run games (setup the signup thread, count signups, close signups, start the game sending the role PMs to every player, etc)
-Create day/night posts
-Receive night actions
-Resolve night actions (who scum shoots, who medic saves, who cop checks)
-Give back results of night actions to the respective players
-Periodically post votecounts
-Once day ends, count the votes and lynch the correct player
-Manage QTs, roles, information about the game, etc.

All of these can be automated. I wanted to do something like that, and maybe even make it come with a TL bot (like some that are floating around here), where you just PM the night action or stuff to the bot and the bot does everything automatically (but obviously having a server behind all of it).
Basically, forum mafia games have a certain "structure"; over here, over at OMGUS, and everywhere. You have games, you have setups, you have hosts, you have a balance team, you have a game queue, you have normal/themed/etc games, etc. The structure is the same, the rules are the same (if only slightly changing), thus it makes sense to have a centralized automated tool to handle it.

Also, in typical "let's see all the shit we can put in this", I wanted it to be able to even add customized setups and roles, specially themed ones (like making it possible for Greymist to host one of his crazy setups in it), and a lot of other shit.


Anyways, you can see this was pretty huge. At the moment it didn't feel that huge, but while I was just starting the "brainstorm" process, I encountered some big problems. Specially: Night Action resolution. The core of it would be, at the very least, getting night actions and resolving them. But this seemed way too hard.

But that was like 2 years ago. I knew so little stuff about computing compared to what I do now (for example I wanted to do all of it in java...). I even realize some stuff I wanted to do which seemed too tedious, could be done way more easily, or the developing process itself could be done way more faster.

I'm still definitely interested in doing something like this. At the very least, I want to do something like this to get more experience with certain technologies and development practices I don't use at work nor at uni. But the more I stay at uni, the more things I learn and the more things I start to realize I could use for this project instead of old ones, so I'm not in a hurry to do this or anything (since the more I wait, the better equipped I am to handle this thing the way I want to).
So I'd like to do something like this, at the very least as a personal project of mine. I'd like it even more if there was an actual desire and need for it from the community. if I go through the trouble of making something like this, I'd like it to be used ). But those are concerns that come after prototyping and the like


Here's the link to the old thread.
Link: http://www.teamliquid.net/forum/mafia/383168-mafia-system-updates-and-suggestions

+ Show Spoiler +

PS: I was crazy
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
September 30 2014 22:15 GMT
#18
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 22:16 GMT
#19
Oh yeah, you were talking about that - I thought you were talking about something a bit different (something more about the setup generation rather than the game running process). I think we discussed that specific system before... in the balance tester thread? But yeah, I guess it's good to wait in its own way instead of rushing to create a weak project. If you do start working on that project, I could probably also help in whatever capacity I'd be capable of.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 22:17 GMT
#20
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 22:20 GMT
#21
On October 01 2014 07:17 Xatalos wrote:
Show nested quote +
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
Last Edited: 2014-09-30 22:36:23
September 30 2014 22:24 GMT
#22
On October 01 2014 07:20 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.


What about this one?

+ Show Spoiler +
1-Shot Cop
Doctor
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Or this one? lol


+ Show Spoiler +
Innocent Child
Doctor
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 22:37:04
September 30 2014 22:34 GMT
#23
On October 01 2014 07:24 batsnacks wrote:
Show nested quote +
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.


What about this one?

+ Show Spoiler +
1-Shot Cop
Doctor
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie




Looks reasonably fine, a bit harder for scum, but probably how it should be. The GF means that the 1-shot cop has (assuming he checks N1) only a 1 in 12 chance of getting a red check. If he gets a green check, he can't really trust it.

The Doctor would be a problem but isn't a huge one with no multi-shot cops. Scum will do worse in this than in the one with the single innocent child, but not that much worse. Assuming random lynches in this kind of setup, you have about a 33% chance for town to win, and assuming the cop checks a VT or GF, things are reasonably balanced. Each night there's a small chance that the doctor makes the correct save, and while the 1-shot cop is alive and claimed it will be an interesting game between the Doctor and the mafia about whether or not to shoot him.

Basically, the 1-shot cop is just as likely (1 in 12) to give an incorrect green check as he is to give a correct red check, with his 1 shot.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
Last Edited: 2014-09-30 22:38:02
September 30 2014 22:36 GMT
#24
I edited go look.

Or this one? lol


+ Show Spoiler +
Innocent Child
Doctor
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 22:39:11
September 30 2014 22:38 GMT
#25
On October 01 2014 07:36 batsnacks wrote:
I edited go look.


The one with Innocent Child is not significantly different than the one with the 1-shot cop. Scum will do the same thing, which is try to shoot for the Doctor, or maybe WIFOM and shoot for the cop. In fact, town is worse off in this scenario cause they don't even get the 1 in 12 chance for a red check. The 1-shot cop is basically a better Innocent Child.

E: unless you anticipate scum fakeclaiming with their 2 scum against 11 town, but let's be serious here, that's not happening. in a massclaim scenario town will be aware it is a 2-scum scumteam, even if they don't know much else.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
September 30 2014 22:44 GMT
#26
On October 01 2014 07:38 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:36 batsnacks wrote:
I edited go look.


The one with Innocent Child is not significantly different than the one with the 1-shot cop. Scum will do the same thing, which is try to shoot for the Doctor, or maybe WIFOM and shoot for the cop. In fact, town is worse off in this scenario cause they don't even get the 1 in 12 chance for a red check. The 1-shot cop is basically a better Innocent Child.

E: unless you anticipate scum fakeclaiming with their 2 scum against 11 town, but let's be serious here, that's not happening. in a massclaim scenario town will be aware it is a 2-scum scumteam, even if they don't know much else.


I'd give you a 3:1 odds on town losing any of those setups, any time.
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 22:47 GMT
#27
On October 01 2014 07:44 batsnacks wrote:
Show nested quote +
On October 01 2014 07:38 Blazinghand wrote:
On October 01 2014 07:36 batsnacks wrote:
I edited go look.


The one with Innocent Child is not significantly different than the one with the 1-shot cop. Scum will do the same thing, which is try to shoot for the Doctor, or maybe WIFOM and shoot for the cop. In fact, town is worse off in this scenario cause they don't even get the 1 in 12 chance for a red check. The 1-shot cop is basically a better Innocent Child.

E: unless you anticipate scum fakeclaiming with their 2 scum against 11 town, but let's be serious here, that's not happening. in a massclaim scenario town will be aware it is a 2-scum scumteam, even if they don't know much else.


I'd give you a 3:1 odds on town losing any of those setups, any time.

Asuming that town RNGs the lynches and doesn't claim, town will win those setups 33% of the time. Adding in claims only helps town. I don't see how you could fall below RNG levels of lynching.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
HiroPro
Profile Joined March 2012
United States2624 Posts
September 30 2014 22:48 GMT
#28
On October 01 2014 07:20 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 22:50:31
September 30 2014 22:49 GMT
#29
On October 01 2014 07:48 HiroPro wrote:
Show nested quote +
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.


I'm pretty sure Batsnacks is saying that town has no chance. I'm trying to argue that town has a chance. You are agreeing with me. Thanks.

Edit: the 33% is a _floor_ of how well town can do btw, town typically beats RNG outside of D1. Batsnacks thinks town has a less than 25% chance of winning any of these setups. That is the context for my discussion.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
September 30 2014 22:50 GMT
#30
On October 01 2014 07:49 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:48 HiroPro wrote:
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.


I'm pretty sure Batsnacks is saying that town has no chance. I'm trying to argue that town has a chance. You are agreeing with me. Thanks.


3:1 odds means I pay you 3x what you invest if town loses.
HiroPro
Profile Joined March 2012
United States2624 Posts
September 30 2014 22:50 GMT
#31
On October 01 2014 07:49 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:48 HiroPro wrote:
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.


I'm pretty sure Batsnacks is saying that town has no chance. I'm trying to argue that town has a chance. You are agreeing with me. Thanks.

Edit: the 33% is a _floor_ of how well town can do btw, town typically beats RNG outside of D1. Batsnacks thinks town has a less than 25% chance of winning any of these setups. That is the context for my discussion.

You don't understand betting odds do you?
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 22:52 GMT
#32
On October 01 2014 07:50 batsnacks wrote:
Show nested quote +
On October 01 2014 07:49 Blazinghand wrote:
On October 01 2014 07:48 HiroPro wrote:
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.


I'm pretty sure Batsnacks is saying that town has no chance. I'm trying to argue that town has a chance. You are agreeing with me. Thanks.


3:1 odds means I pay you 3x what you invest if town loses.


Right, which means If we play 12 games and bet $10 on each game, and town RNGs every lynch, here's what happens:

4 games, town wins, which means I earn $120
8 games, town loses, which means you earn $80

as you can see, given that town has at least a 33% chance of winning, you would lose money if you took this bet.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
Last Edited: 2014-09-30 22:56:06
September 30 2014 22:54 GMT
#33
On October 01 2014 07:52 Blazinghand wrote:
Show nested quote +
On October 01 2014 07:50 batsnacks wrote:
On October 01 2014 07:49 Blazinghand wrote:
On October 01 2014 07:48 HiroPro wrote:
On October 01 2014 07:20 Blazinghand wrote:
On October 01 2014 07:17 Xatalos wrote:
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++


There's like literally nothing wrong with that setup either. 11:2 Mountainous has an expected town winrate of about 1/3, and this setup is pretty close to that (with random lynches). Given that town won't be lynching purely randomly, and during D1 they'll have an innocent child to help out, this strikes me as reasonably balanced.

This isn't even funny, honestly. You can't treat the chance of lynching mafia as being random on anything except day 1. Nobody runs 11-2 on TL because of how overwhelmingly town favored it is

Mafia has to get 5 mislynches to win 11-2 lol and they can only lose a single player. If you seriously believe that's balanced, you need to remove yourself from the balance team right now.


I'm pretty sure Batsnacks is saying that town has no chance. I'm trying to argue that town has a chance. You are agreeing with me. Thanks.


3:1 odds means I pay you 3x what you invest if town loses.


Right, which means If we play 12 games and bet $10 on each game, and town RNGs every lynch, here's what happens:

4 games, town wins, which means I earn $120
8 games, town loses, which means you earn $80

as you can see, given that town has at least a 33% chance of winning, you would lose money if you took this bet.


If town wins, I win. I am betting on town losing.

Eh maybe I'm not being clear

I pay you... if town loses.
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 22:55:32
September 30 2014 22:55 GMT
#34
OK wait can we talk like normal people instead of total weirdos? Instead of quoting random setups and saying "what about this one", batsnacks, why don't you directly state your opinion on c9++? Because now I'm reading these posts about betting and I have no idea what's going on.

Like here I'll ask you: do you think it's too town-favored or too scum-favored?
When you stare into the iCCup, the iCCup stares back.
TL+ Member
HiroPro
Profile Joined March 2012
United States2624 Posts
Last Edited: 2014-09-30 22:57:38
September 30 2014 22:56 GMT
#35
Like just forget this lol. I'm only going to end up calling BH names if I continue this.
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 22:57 GMT
#36
I really don't care what I'd hypothetically be paid if I took a bet, I just want to know your position on the issue so we can, like, discuss it, since clearly I don't understand betting.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
Last Edited: 2014-09-30 23:03:28
September 30 2014 22:57 GMT
#37
On October 01 2014 07:55 Blazinghand wrote:
OK wait can we talk like normal people instead of total weirdos? Instead of quoting random setups and saying "what about this one", batsnacks, why don't you directly state your opinion on c9++? Because now I'm reading these posts about betting and I have no idea what's going on.

Like here I'll ask you: do you think it's too town-favored or too scum-favored?


I have zero opinion on c9++ setups. Programming is a hobby/career of mine though, so it's fun messing with people's programs and seeing what I can break.

EDIT: I think the setups I posted are imbalanced though
HiroPro
Profile Joined March 2012
United States2624 Posts
September 30 2014 23:06 GMT
#38
I'm just going to copy what I wrote a while back, but please don't run this setup on TL.

On December 30 2013 14:06 HiroPro wrote:
The problem with c9++ is that it's boring and not balanced. It has numerous issues: an inability of mafia to properly deal with medic+cop/vig combinations, a number of setups that only contain 2 mafia and are unbalanced no matter what the roles, huge amounts of confirmed townies with vig/innocent child/mason running around and leaving mafia with no options at all on kills and no way to effectively kill all of them, mafia roles (godfather) that are completely worthless against non-cop roles but still get inserted and somehow considered more useful than a goon even when town has no cop. A lot of hosts who run a "variant" are lazy and just replace a few roles without actually considering what impact that has on balance. The only variant that I've seen that I would consider even somewhat acceptable is the one that bugs used to run.

batsnacks
Profile Blog Joined April 2014
United States4466 Posts
September 30 2014 23:11 GMT
#39
I'm no expert but that post seems pretty reasonable.
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 23:12 GMT
#40
I think probably it's best to stick with 3 mafia for a 13 player game, +1 possible SK
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 23:55 GMT
#41
Haha, looks like the thread just exploded...

I agree that a 2-player Mafia team is a bit underpowered here on TL vs 11 townies. Would it be good to add a checkbox to the tool with an option like "No less than 3 Mafia roles"? Basically if that option was checked, there would just be a Goon added instead of a Vanilla townie if there were only 2 Mafia roles. Although again, it wouldn't be too difficult to do that without any automation...

What's the variant that "bugs used to run"? I'd be interested to implement useful modifications from that variant as checkbox options on the tool. I don't see the harm in including more options since clearly there are many who aren't too pleased with the basic C9++ rules.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 23:56 GMT
#42
Now off to sleep though
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
HiroPro
Profile Joined March 2012
United States2624 Posts
Last Edited: 2014-10-01 00:24:40
October 01 2014 00:21 GMT
#43
On October 01 2014 08:55 Xatalos wrote:
What's the variant that "bugs used to run"? I'd be interested to implement useful modifications from that variant as checkbox options on the tool. I don't see the harm in including more options since clearly there are many who aren't too pleased with the basic C9++ rules.

It can't really just be tacked on like that as an option. There are some role substitutions: medics are replaced by jailkeepers and innocent children are replaced by self-aware millers. There are also no 3-mafia setups and a framer is possible for mafia. But a lot of the odds for the roles and the role combinations are also different. The whole "flip 7 coins and determine roles from that" isn't present in his setup.

You'll have to ask him for it; he never released it publicly. Or marvellosity may have it also. I think he ran that setup once.

This is what players would see for his setup:+ Show Spoiler +

On June 02 2012 06:23 wherebugsgo wrote:
Setup Information


Overview:

The setup is a semi-open setup for 13 players; that is, all the possible roles are given but the number of each is not known. Not all of the roles will necessarily be present. Some of the roles may have limits on the number of times they may be used. This will be specified in the role PM. The game is inherently balanced for both sides depending on the types and numbers of roles that appear. The mafia win when they outnumber the town or they reach a scenario when this becomes inevitable. Town wins by eliminating all mafia members. Mafia kill power is always 1.

Town Roles

Vanilla Town
+ Show Spoiler [possible role PM] +
You are a simpleton villager. Your job is to rid the town of all mafia. You're also seriously badass.


Miller
+ Show Spoiler [possible role PM] +
You are a miller. For whatever odd reason, you're the town scapegoat and so appear guilty to all investigative checks. You have one vote and win with town, by killing all the mafia.


Mason
+ Show Spoiler [possible role PM] +
You are a member of this society:




along with (playername here). You are both members of the town. You may communicate with each other privately by any means you wish; a QT has been provided for you at (linkhere). You win with town when all mafia members have been put under the ground.


Cop
+ Show Spoiler [possible role PM] +
You're a stud. As such, you may check one person (once/every night) and will receive back either guilty or innocent.. You may vote once per day and win when town has eliminated all the criminal mafia.


Jailkeeper
+ Show Spoiler [possible role PM] +
You're infatuated with locking people up and throwing away the key. As a crazed cellkeeper, you have the power to lock someone away and then molest them. You may choose one person to jail (one night/every night) and you will protect them from 1 KP. Neither you nor your target will be informed of successful blocks. You may vote once per day and your goal is to rid the town of the scum Italian mafia who stole your motorcycle.


Roleblocker
+ Show Spoiler [possible role PM] +
You're the hottest girl in town. Everyone wants some of you, and they'll drop everything to get it. Thus, (once at/every) night you will be able to tie up someone and have your way with them, preventing them from doing anything or going anywhere until the crack of dawn. Though you're naughty, you win when all the mafia have been killed. Your target will wake up the next morning not knowing what happened, but at the very least will be aware that he got nothing worthwhile accomplished. Besides contracting STDs, perhaps.


Vigilante
+ Show Spoiler [possible role PM] +
You are the most conservative member of town, and as such you really enjoy exercising your 2nd Amendment rights to shoot criminals in the face. You have a gun with X bullets and you may shoot if you so wish at night. You are never refunded a bullet under any circumstances. You win when all the mafia have ceased to breathe.


Mafia Roles

Goon
+ Show Spoiler [possible role PM] +
You are just a hitman for the mafia and your name is distinctly Italian. Enough talk, just go out there and start killing things. Your family can kill one person per night by choosing one of you to carry out the deed. You win when your family outnumbers the town. You may talk to each other at any time in private by any means you wish; for your convenience, a QT has been provided at (link)


Roleblocker
+ Show Spoiler [possible role PM] +
You break bones for a living. Either that or you just smooth talk people. Whatever you feel like, really. As such, once per night you may choose one person to roleblock. That person will be informed that he or she was roleblocked. You may also carry out kills for the mafia. You may communicate privately with your friend(s) (name(s) here) in any manner you wish; a QT has been provided at (link here) for your convenience.


Godfather
+ Show Spoiler [possible role PM] +
Over the years, you've gone by a number of different names. Al Capone, Dick Cheney, Julius Caesar, Elmo, and Martha Stewart all come to mind. Now, however, you want to just retire. In order to do so, though, you must first kill everyone who is not part of your family, because you are highly allergic to non-related people. They make you sick. At your disposal is your uncanny ability to appear as anything you wish. As such you can choose to appear "innocent" to all investigations, if you so wish. By night one you must decide whether you want to mask yourself to investigations. You may also communicate privately with your family member(s) name(s) here in any manner you wish. A QT has been provided at (link here) for your convenience.


Framer
+ Show Spoiler [possible role PM] +
blahblahblah standard scum fluff here you win when you outnumber town your teammates are here and you have a QT here, you may target one person per night, causing them to display the opposite alignment to any cops who choose to investigate them for that night only. You may not target yourself.


Third Party Roles

Serial Killer

+ Show Spoiler [possible role PM] +
You crazy. And probably illiterate. You like feet.

Since it doesn't matter what I tell you, just kill everything. You win if you live and no one else does.

You can choose to appear innocent to all checks or have the ability to survive one KP once. You can kill one person every night, but you don't have to.


Notes


If two roleblockers target each other, they are both informed.

Masons who are roleblocked will not be prevented from communicating with their partner(s).

Masons are confirmed town to each other.

One person on the mafia team may carry out the kill each night. The mafia can choose not to kill. The mafia can kill each other. If the mafia member chosen to kill on a particular night is roleblocked, no kill will occur.

Millers are self-aware.

There are no hit notifications in this game.

All roleblocks will result in the target being notified.

If a serial killer is present he/she will be able to choose between investigation immunity and one shot bulletproof when the roles go out and before day 1 starts. If no choice is sent in then I will flip a coin and choose for the player.


gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 01 2014 02:37 GMT
#44
If C9++ is not enough, we need to create the C10++ standard then
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 01 2014 10:03 GMT
#45
Hmm... It might be difficult to implement it as an algorithm if it's supposed to be kept secret...

I guess it depends on how it works if it could be implemented as an option for the current algorithm or if a completely new one should be created.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 01 2014 10:05 GMT
#46
On October 01 2014 11:37 gonzaw wrote:
If C9++ is not enough, we need to create the C10++ standard then


I think there was a thread for an "improved version of C9++" at some point? Did nothing come out of it?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 02 2014 02:49 GMT
#47
It would certainly be useful to have something similar to C9++. Have a system where you just pluck some parameters (maybe even random ones, like in C9++), and you get a perfectly balanced and fun setup in return. Saves you the trouble of designing a mafia game and balancing it in the first place (if you just want a quick game).

It might be possible to do something similar. I think it may be better to just change the parameters. Instead of doing the whole "T", "C" shit, let the host have some more control. For instance, let the host decide on whether there will be a SK or not (or let it be random if he wants to).

The inference rules from C9++ aren't that good. The choice of there being a cop or not is independent of there being a GF, which is wrong, for instance. For example, with CCCCTTT there are 2 cops and no GF, nor framer, nor unaware miller. Yeah, good luck with that.

Also, it's too deterministic. I guess the "playing the numbers" game comes from this. Based on roles that flip, you just start counting the Cs and Ts and shit to 100% determine what possible roles could be left or not. It has to be non-deterministic.


Maybe it can be modelled as a Markov chain or something like that, where the probabilities of each transition are determined by the parameters the host gives to it. Then the chain is "processed", and depending on which path it takes, what roles and shit there will be in the setup.


Small example:
States:
S0, S1, S2, S3, S4, S5

Transitions:
S0 -> S1: 20% - Output = "Cop role"
S0 -> S2: 15% - Output = "Medic"
S0 -> S3: 65% - Output = "No role"

S1 -> S2: 30% - Output = "No role"
S1 -> S3: 70% - Output = "Godfather"

S2 -> S3: 80% - Output = "Roleblocker"
S2 -> S3: 20% - Output = "Framer"

S3 -> S4: 100% - Output = "Vanilla Townie"
S4 -> S5: 100% - Output = "Vanilla Townie"
S4 -> S3: 100% - Output = "Mafia Goon"


So here, what does the host do? The host starts at S0, and, using the probabilities given in the transitions, decides to which state to go. How can he do this? Well, like normal C9++, he can choose a random number between 1 and 100.
Let's follow this example:

-Host starts at S0
-Host chooses random number between 1 and 100, he gets 13.
-13 < 20, so host goes to state S1. Because of this, his setup will get a Cop
-He chooses another number, he gets 66
-66 > 30, so he goes to S3, and his setup will get a Godfather
-Now he can't do much but keep going between S3, S4 and S5 until he fills all his VTs and Goons.

What did the host get in this scenario? Imagine he wanted 8 players. In this case he got 4 VTs, 1 Cop, 1 GF and 2 Goons.

What if he had chosen different numbers? He would have gotten a different setup. Let's try again:

-Start at s0
-Choose 28, it's between 20 and 35 (it's the 15% zone), so he goes to S2, and his setup gets a Medic
-Choose 13, it's less than 30, so he goes to S2. Nothing happens
-Choose 44, it's less than 80, so he goes to S3, and his setup gets a RBer
-Keep going from S3, S4 and S5

So what's the setup now? If he wanted 8 players, the setup will be 1 Medic, 4 VTs, 2 Goons and 1 RBer.

Now, imagine this markov chain is known to the players. Will they be able to game the setup? Maybe (in this case at least, since it's too simple). But it's not deterministic, so they can't know for sure.
Imagine a Medic flips. Players have no way of knowing whether there is a RBer, or if there is a framer. From S2 to S3, there is a 80% chance of getting a RBer, but a 20% of getting a Framer. Since the host chooses the number randomly, he could have gotten any of those.
So imagine there is a Cop and a Medic and a Framer. Scum can effectively fakeclaim they were RBed, making everybody think the transition between S2 to S3 was determined by the 80% (RBer), specially since it's so likely. Since they have a Framer, and town now believe there is no framer, they can frame someone, and if the cop gets a red check, town will lynch that person 100%. If this is done in LYLO, you can see how fun it gets.


Of course, I'm a shitty balancer and made this simple Setup Markov Chain in 2 minutes. Surely the balance gods of TL Mafia can come up with better ones
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 02 2014 07:40 GMT
#48
Hmm.. Interesting. Although I'd feel a bit hesitant to replace C9++ with something that has no play testing at all
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
EatThePath
Profile Blog Joined September 2009
United States3943 Posts
October 02 2014 08:15 GMT
#49
Correct me if I'm wrong, gonzaw, but a markov chain can be solved and/or simply monte carlo'd for its final and intermediate states. Which means the process has (to most people) been obfuscated a lot but not ultimately hidden from the players if they know what algorithm you've used to generate the roles, and so can still be gamed.

It seems to me that the only way to mitigate gaming is to use the in depth analysis of the players' options in different scenarios (as a few of you have demonstrated so far in the thread) to try and pinpoint degenerate cases and avoid them. Meanwhile, make any information the players can gain as inactionable as possible, i.e. use a setup process where the odds (from the point of view of the various players once the game starts) are as close to evenly distributed as possible so there is no "most likely" choice. I think most of the time this would also mean evenly distributing the setup probabilities, but not necessarily.

I don't even play mafia here, but interesting thread! ^^
Comprehensive strategic intention: DNE
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
Last Edited: 2014-10-02 15:31:21
October 02 2014 12:57 GMT
#50
On October 02 2014 17:15 EatThePath wrote:
Correct me if I'm wrong, gonzaw, but a markov chain can be solved and/or simply monte carlo'd for its final and intermediate states. Which means the process has (to most people) been obfuscated a lot but not ultimately hidden from the players if they know what algorithm you've used to generate the roles, and so can still be gamed.

It seems to me that the only way to mitigate gaming is to use the in depth analysis of the players' options in different scenarios (as a few of you have demonstrated so far in the thread) to try and pinpoint degenerate cases and avoid them. Meanwhile, make any information the players can gain as inactionable as possible, i.e. use a setup process where the odds (from the point of view of the various players once the game starts) are as close to evenly distributed as possible so there is no "most likely" choice. I think most of the time this would also mean evenly distributing the setup probabilities, but not necessarily.

I don't even play mafia here, but interesting thread! ^^


The host can choose the transition matrix if he wants to. I said the host has to choose parameters, well that can be some of them.

For instance, if he REALLY wants a Cop in his setup, he can just increase the probability of the "S0 -> S1" transition, so there is a higher chance there is a cop. Transition probability would be hidden from players, they would ONLY be able to know what the "possible" path the setup could have taken, based on the flipped roles. But if you make a good enough chain, that can be obfuscated, yes

EDIT: The states and transitions of the markov chain can be determined by the host as well..
Just create a methodology for the host to follow, that guarantees to create "balanced" setup markov chains. Then the host follows the process from above. Players just wont be able to play the game, and if, somehow, they try to, they'll only end up with a convoluted mess of probabilities and shit, that, if designed correctly, will not be of any use to them.


Like, for example, use the current C9++ thing. The host chooses the number of lettesr. like "CCMTTTT". From this, you create an algorithm that constructs a markov chain based on this (with similar stuff, If the "C" comes up a lot, you create more transitions and states that create Cop roles, or change their probabilities, etc). The host can input parameters of his own as well (probabilities of transitions for example).

If your SOLE concern is players "gaming" the system, then it can be solved. The bigger problem is trying to come up with a methodology that 100% creates balanced games. This is more tough.
EatThePath
Profile Blog Joined September 2009
United States3943 Posts
October 02 2014 15:41 GMT
#51
If your SOLE concern is players "gaming" the system, then it can be solved. The bigger problem is trying to come up with a methodology that 100% creates balanced games. This is more tough.


Well, but, the two are related...
Comprehensive strategic intention: DNE
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 02 2014 17:18 GMT
#52
On October 03 2014 00:41 EatThePath wrote:
Show nested quote +
If your SOLE concern is players "gaming" the system, then it can be solved. The bigger problem is trying to come up with a methodology that 100% creates balanced games. This is more tough.


Well, but, the two are related...


If the town can successfully game the system, then the games can be unbalanced (though if the game was VERY unbalanced towards scum, I guess it would even out). But if players can't game the system, it can still be unbalanced (10 VTs 5 Cops 78 Medics and 1 Goon).
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 02 2014 19:50 GMT
#53
I don't think town's setup speculation is even a HUGE factor in town's favor, at least if there aren't a lot of blue roles. Not saying that it isn't a problem... But it isn't really comparable to traditional issues like scum requiring too many mislynches compared to their team's player count.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 00:01 GMT
#54
On October 03 2014 04:50 Xatalos wrote:
I don't think town's setup speculation is even a HUGE factor in town's favor, at least if there aren't a lot of blue roles. Not saying that it isn't a problem... But it isn't really comparable to traditional issues like scum requiring too many mislynches compared to their team's player count.


I think you could create the chains so that information is embedded in the states. Each transition from one state to the other has the possibility of adding a new role (or several ones, though you could normalize that into a sequence of states). So, you can go from a "pro-town" state to a "pro-scum" state, just by, for instance, adding another Roleblocker.

If you, somehow, embed more info into each state (like "how many misslynches does scum need to win?"), then you could create balanced chains more easily.

I'm also thinking about probabilities here, and determining "balance" of a state depending on the previous path.
For instance, imagine you have X town and Y scum, and you are in state Sj. If you go from Sj to state Sk, and that transition adds a new Cop to the setup, it makes it more town-favoured, right?
Well, it does, if for instance all Y scum are Goons. But if all Y scum are Godfathers and there are 10 millers in the X town, then it's incredibly scum-favoured.
So whether state Sk is pro-town or pro-scum depends on the path you took to Sk. It also involves probabilities. Adding a Cop to a setup with a Godfather, could be pro-town or pro-scum, but it has some probability of being each. If the cop checks the GF, the game starts turning favorable towards scum (all town + cop think he's town), but if he checks townies or Goons, then it is more favorable towards town. So maybe you could say adding a Cop in state Sk, gives a 85% pro-town probability, and a 15% pro-scum one. Again, based on previous roles, and the specific mechanics you want to add.

Hmm.

This can turn out to be a very interesting problem.

So far, I think there would be these steps:

1)Figuring out the core mechanics to introduce (which roles to choose from, how they interact with each other, etc)
2)Figure out a way to "construct" these setup chains
3)Figure out a methodology to determine which state is "pro-town" and which one "pro-scum" (based on probabilities)
4)Make it so that a valid Setup Chain is one where the final state has 50% pro-town and 50% pro-scum probabilities (i.e once you end your "creating the setup" path, you end up in a completely balanced game).
5)Make it possible for the host to introduce variance in this setup (Optional)

By (2), the host could be able to create his own Setup Chain if he wanted to. If he wanted he could just create the setup himself, but in this way:
-There is a known methodology he can follow, so he has to spend less effort
-When he ends up with a working Setup Chain, he knows it is balanced no matter how he uses it to create his setup. Thus he spends less effort trying to balance it himself (which may fail)

But there could also be default Setup Chains, like C9++ is a default "Setup Template". You could have "Normal Mini" setup chains, "Normal Big" ones, "Themed Mini" ones, etc, etc.

......yeah I'm getting too far ahead of myself. But if someone is bored and has a PhD in this kind of stuff, go ahead! :D


P.S It'd actually be funny to study for a PhD based on mafia.
Guy 1: "Hey, so you have a PhD? In what'"
Guy 2: "I have a PhD in mafia"
Guy 1: "NO WAY. SO COOL!!!"
Guy 2:
EatThePath
Profile Blog Joined September 2009
United States3943 Posts
Last Edited: 2014-10-03 02:59:47
October 03 2014 02:58 GMT
#55
I wanna be the guy 2, those shades yo

+ Show Spoiler +

Markov chains are a cool method but I think you'd want to do some basic enumeration of possible setups and get a sense of what sort of distributions are balanced / imbalanced, which can be very nontrivial to discover. The only other option I see is some kind of monte carlo simulation for a given distribution, but idk how that would even work because random decisions aren't that great in mafia, or pertinent to balance amongst experienced players.

What I was saying earlier though is that even a very tangled chain can have expectation values assigned to its various final states. On the one hand it seems like a good "organic" way of handling the task of reaching a "balanced" distribution by incremental changes to the roles, but then again there's probably a quite limited set of balanced distributions given N players and S set of roles and why not just RNG choose from those. Even though chains are way more fun and "construct" the game as it runs.
Comprehensive strategic intention: DNE
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 04:32 GMT
#56
On October 03 2014 11:58 EatThePath wrote:
I wanna be the guy 2, those shades yo

Markov chains are a cool method but I think you'd want to do some basic enumeration of possible setups and get a sense of what sort of distributions are balanced / imbalanced, which can be very nontrivial to discover. The only other option I see is some kind of monte carlo simulation for a given distribution, but idk how that would even work because random decisions aren't that great in mafia, or pertinent to balance amongst experienced players.

What I was saying earlier though is that even a very tangled chain can have expectation values assigned to its various final states. On the one hand it seems like a good "organic" way of handling the task of reaching a "balanced" distribution by incremental changes to the roles, but then again there's probably a quite limited set of balanced distributions given N players and S set of roles and why not just RNG choose from those. Even though chains are way more fun and "construct" the game as it runs.


Hmm. I don't remember that much from markov chains. But do you mean stationary distributions? Don't those need the chain to be irreducible and recurrent?
It is possible to make the chain not irreducible/recurrent, by making the final state unique and with a 100% chance of not going anywhere for instance (if the chain is defined AFTER setting the number of players the game will have). Otherwise it might indeed be too hard to set the chain up properly


My main reasoning is that, I think it may be "easier" to "construct" balanced setups, rather than just have the whole setup fall on your lap and you instantly have to find if it's balanced or not.

For instance, it's easier to think about how balanced or unbalanced the setup will be by introducing or removing a role, or a pair of roles. I imagine hosts balance it like this as well, like "If I include a Serial Killer with the roles I have, will this be balanced?" and the like.
Though getting the input of actual balancers may be a good idea

I guess you could treat this problem as an optimization problem too (optimize so the "balance" factor is maximum), with your possible output being the markov chain, and indirectly the possible roles in the setup. You could maybe use dynamic programming here or something too.....somehow.

...but then again there's probably a quite limited set of balanced distributions given N players and S set of roles and why not just RNG choose from those


RNG usually means using a uniform distribution. E.g use "random.org". That will SURELY give you way more unbalanced setups than balanced ones.
The point is to create a "new RNG" that ONLY gives you balanced setups. That's basically the point of the markov chain over here. Instead of the host throwing a dice to see which random role he includes in the game (which has a chance of making it unbalanced), the host throws a dice to determine the path he takes in the markov chain. The way the chain is constructed should make the setup be balanced, no matter what the "RNG" says.

But yeah, maybe it's not even possible. But I think it could be a cool focal point of investigation.

Even though chains are way more fun and "construct" the game as it runs.


Yeah, creating setups should be fun and easy! :D
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 04:45 GMT
#57
It might be interesting to design an automatic methodology to balance games too.

Right now, from what I gather, balancing games is just intuition and best/worst case scenario analysis. For instance, you balance the game by finding out how many misslynches scum needs to win. But that is a specific scenario, where there are no night kills, no cop checks, etc, and just lynches. Also the scenario specifically deals in the "worst" case scenario for town in which they misslynch in a row.

I am not exactly sure how cops, vigs, medics, etc influence balancing decisions. Also how the whole "game flow" influences it. Like, for instance, in terms of balancing, is there a difference between "D1 misslynch, D2 scum lynch, D3 misslynch", "D1 scum lynch, D2 misslynch, D3 misslynch" and "D1 misslynch, D2 misslynch, D3 scum lynch"?

I think there could be metrics to determine this kind of stuff, based on real games. It could be something like AI. Create the "setup chain", and then run some games based on it. Then take statistics from these games, analyze them, and then change the markov chain appropriately (by changing transition odds for instance).
This makes the methodology adapt to the game and the forum. For example, if towns start to get too stupid that they misslynch all the time, cops never check the correct players, vigs always misfire, then the probabilities in the chains get changes accordingly so that newer setups get a different distribution of roles to accomodate those facts.
Small example: Imagine that adding a vig to a setup, according to a current Setup Chain, makes it so that it increases town's chances of winning 5%. Now, if EVERY vig in games using this setup misfire, the process would gather these statistics and decrease that chances of winning down to 2%. This incluences the "RNG" and makes it so that town can get more firepower along with vigs for instance (it can increase the chances of the setup containing a Vig AND a medic, for example).

The "learning" algorithm should take other stuff about the game into account as well. Like whether town won or not, and what other roles did too.

This may be optional too. I'm not sure how hosts see this kind of "meta" when they balance games, i.e if it influences their choice of setup at all or not (e.g if town stomps scum's ass every single game, do they give scum more roles or advantages?).

If it's supposed to be neutral, then you can still use the AI stuff, but it would have less of an impact.
HiroPro
Profile Joined March 2012
United States2624 Posts
Last Edited: 2014-10-03 05:34:51
October 03 2014 05:34 GMT
#58
Honestly gonzaw, it takes very little effort/time to come up with balanced setups for normal minis.

The only automated thing that I'd really like to see is something to accurately count votes (in the normal thread, not a separate voting thread)
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 05:47 GMT
#59
On October 03 2014 14:34 HiroPro wrote:
Honestly gonzaw, it takes very little effort/time to come up with balanced setups for normal minis.

The only automated thing that I'd really like to see is something to accurately count votes (in the normal thread, not a separate voting thread)


Why does C9++ exist then?
HiroPro
Profile Joined March 2012
United States2624 Posts
Last Edited: 2014-10-03 05:59:01
October 03 2014 05:58 GMT
#60
On October 03 2014 14:47 gonzaw wrote:
Show nested quote +
On October 03 2014 14:34 HiroPro wrote:
Honestly gonzaw, it takes very little effort/time to come up with balanced setups for normal minis.

The only automated thing that I'd really like to see is something to accurately count votes (in the normal thread, not a separate voting thread)


Why does C9++ exist then?

I'm not that familiar with mafiascum, but I believe that they have a section of their site that allows only open setups (or stuff like c9++ which isn't exactly open but has all the possible combinations known).
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 03 2014 08:31 GMT
#61
Well, I made the automatic balance tester tool for Mafia setups earlier, although it's not entirely precise... And it's not indeed all that hard to manually balance normal setups.

Hm. A votecount bot could certainly be useful... Perhaps I'll look into it at some point
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 03 2014 09:43 GMT
#62
Oh yeah, here's the balance tester if you want to take a look: http://www.teamliquid.net/forum/mafia/436988-automatic-balance-tester
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 03 2014 09:45 GMT
#63
Question: I've never created a forum bot before. What would be the best technology to use for that? JavaScript? Are bots even allowed here on TL? Is TL generally bot-friendly in the way that the forum is structured? At least there are those banbots, so I guess it's certainly doable...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 12:23 GMT
#64
On October 03 2014 17:31 Xatalos wrote:
Well, I made the automatic balance tester tool for Mafia setups earlier, although it's not entirely precise... And it's not indeed all that hard to manually balance normal setups.


Well, this is also supposed to scale. Yeah, I suppose it's easy to balance a game with only Goons, Cops and GFs. But the more roles you add, the more players you add, the difficulty of balancing an arbitrary setup increases exponentially (for instance, if you want a "normal" that has trackers, watchers, framers, 1-shot-cops, self-aware millers and bus drivers).

Apparently there's been some complaints recently about some imbalance in games. This means the current methodology of balancing games isn't perfect, so it could be worth it to investigate some alternatives.

On October 03 2014 18:45 Xatalos wrote:
Question: I've never created a forum bot before. What would be the best technology to use for that? JavaScript? Are bots even allowed here on TL? Is TL generally bot-friendly in the way that the forum is structured? At least there are those banbots, so I guess it's certainly doable...


The forum (and all forums in general) doesn't have a "developer-friendly" API for you to manage your user, see posts, forums, etc, as far as I can tell. So this has to be grunt work. I don't like "bots" for that reason, they are basically HTML scrappers, and those are unmaintainable basically (you have to verify the bot again every single time the site updates, even changing a single "id" tag can fuck up your bot).
For me that's tedious. You'd have to handle HTTP headers and cookies and shit on your own I'd pressume, and I hate programming at that low-level lol.

Javascript already has some nice DOM-manipulation libraries (JQuery being a prime example). I guess other languages could have similar libraries, I dunno. There may also be some "bot-development libraries" too.
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 03 2014 13:36 GMT
#65
Perhaps I'll just leave this task for later then
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
Last Edited: 2014-10-03 19:11:13
October 03 2014 16:26 GMT
#66
Nah, you can try. It's not that difficult to be honest, just tedious (IMO), since I don't really love web scrapping nor javascript.

In fact, I made a votecount BBCode for OMGUS, where you just post [votecount] and it gives you the votecount from the current thread. Since it's BBCode it couldn't use JQuery (I think) so it's fugly as fuck. But I could give it to you once I get home and you can "tidy" it up if you wanted to (basically port all the ugly "for(int i=0;i<document.getElementById("id").children();i++)" shit to nice Jquery "$.find("#id")" stuff)
Xatalos
Profile Joined January 2011
Finland9675 Posts
October 03 2014 18:38 GMT
#67
I don't think it would hurt to take a look
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
October 03 2014 19:13 GMT
#68
The worst thing I think is when the site changes and changes the HTML (because of a bug fix or something) and your bot/bbcode no longer works. I guess you could contact the site admins to tell them about the bot, so they can give you a heads up if the developers make any changes incompatible with your bot.
If that's done, then yeah this stuff can work.

Also again, by using javascript, you can just save it as an "votecounte.html" file so people can use it on their own (and not have a bot post in the thread every 10 seconds). Can't do that with python/lua/php/etc.
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 10 2015 13:32 GMT
#69
For some reason it looks like I can't edit my OP in this thread, but here's the new address for this tool (trying out Surge): http://c9generator.surge.sh
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Normal
Please log in or register to reply.
Live Events Refresh
FEL
16:00
Polish Championship: Qualifier
RotterdaM950
IndyStarCraft 267
CranKy Ducklings105
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 950
IndyStarCraft 267
Hui .136
ProTech51
Nina 22
JuggernautJason10
StarCraft: Brood War
Calm 3456
Larva 546
Horang2 541
Dewaltoss 108
ZZZero.O 74
NaDa 9
Shine 7
LuMiX 4
Dota 2
capcasts86
League of Legends
Grubby3806
JimRising 499
Counter-Strike
fl0m1877
pashabiceps828
Stewie2K705
Foxcn346
Heroes of the Storm
Liquid`Hasu427
Other Games
summit1g4858
tarik_tv1765
FrodaN1465
Beastyqt553
Pyrionflax107
ViBE68
ZombieGrub64
Sick36
Nathanias8
PPMD2
Organizations
Other Games
BasetradeTV32
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• LUISG 11
• davetesta4
• intothetv
• sooper7s
• Migwel
• LaughNgamezSOOP
• AfreecaTV YouTube
• IndyKCrew
• Kozan
StarCraft: Brood War
• 80smullet 18
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2895
• WagamamaTV610
League of Legends
• Doublelift3756
• Jankos2533
Other Games
• imaqtpie823
• Scarra765
• Shiphtur275
Upcoming Events
Korean StarCraft League
6h 39m
CranKy Ducklings
13h 39m
RSL Revival
13h 39m
ByuN vs Cham
herO vs Reynor
FEL
19h 39m
RSL Revival
1d 13h
Clem vs Classic
SHIN vs Cure
FEL
1d 15h
BSL: ProLeague
1d 21h
Dewalt vs Bonyth
Replay Cast
3 days
Sparkling Tuna Cup
3 days
The PondCast
4 days
[ Show More ]
Replay Cast
5 days
RSL Revival
5 days
Replay Cast
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
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
FISSURE Playground #1
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.