Dominion Strategy Forum

Miscellaneous => Forum Games => Mafia Game Threads => Topic started by: silverspawn on November 11, 2014, 07:25:14 am

Title: some probabilities
Post by: silverspawn on November 11, 2014, 07:25:14 am
so I wrote this simulation for probabilities in mafia earlier today, and I thought it was kinda interesting. The syntax is, X/Y: Z% means, in a game with X town, Y scum, no powers, and random lynch targets, town has a Z% chance to win. Town will no-lynch whenever the total amount of players is even, and lynch randomly whenever it's not. Scum will always nightkill a town.

I doubt that these are really useful for anything though, because normal games have so many other factors. it's mostly a thought experiment.

2/1: 33.3%

3/1: 33.3%
3/2: 13.3%

4/1: 46.6%
4/2: 13.3%
4/3: 5.71%

5/1: 46.6%
5/2: 22.8%
5/3: 5.70%
5/4: 2.54%

6/1: 54.2%
6/2: 22.8%
6/3: 11.4%
6/4: 2.54%
6/5: 1.15%

7/1: 54.2%
7/2: 29.8%
7/3: 11.4%
7/4: 5.77%
7/5: 1.15%
7/6: 0.53%

8/1: 59.3%
8/2: 29.8%
8/3: 16.4%
8/4: 5.77%
8/5: 2.93%
8/6: 0.53%
8/7: 0.24%

9/1: 59.3%
9/2: 35.2%
9/3: 16.4%
9/4: 9.06%
9/5: 2.93%
9/6: 1.49%
9/7: 0.24%
9/8: 0.11%

10/1: 63.0%
10/2: 35.2%
10/3: 20.7%
10/4: 9.05%
10/5: 4.98%
10/6: 1.49%
10/7: 0.76%
10/8: 0.11%
10/9: 0.05%

I found that most of the numbers were lower than I expected.
Title: Re: some probabilities
Post by: pacovf on November 11, 2014, 07:55:39 am
In your analysis, you are forgetting that scum will never vote for scum, so the odds should be lower than that.

Ex: you say that 2/1 means 33% chance for scum to get lynched. But the odds that both town agree to lynch scum are more like 50%*50% = 25%...

A better simulation is, town votes randomly, scum votes randomly among town. Whoever gets the most votes gets lynched, with ties getting town lynched.
Title: Re: some probabilities
Post by: faust on November 11, 2014, 08:00:47 am
In your analysis, you are forgetting that scum will never vote for scum, so the odds should be lower than that.

Ex: you say that 2/1 means 33% chance for scum to get lynched. But the odds that both town agree to lynch scum are more like 50%*50% = 25%...

A better simulation is, town votes randomly, scum votes randomly among town. Whoever gets the most votes gets lynched, with ties getting town lynched.

That not accurate as well, because if you assume scum won't vote for scum (not true), you'd also have to assume that town will always lynch off-wagon once they lynched scum... which makes things complicated and is a worse model than what's presented here.
Title: Re: some probabilities
Post by: pacovf on November 11, 2014, 08:06:25 am
In your analysis, you are forgetting that scum will never vote for scum, so the odds should be lower than that.

Ex: you say that 2/1 means 33% chance for scum to get lynched. But the odds that both town agree to lynch scum are more like 50%*50% = 25%...

A better simulation is, town votes randomly, scum votes randomly among town. Whoever gets the most votes gets lynched, with ties getting town lynched.

That not accurate as well, because if you assume scum won't vote for scum (not true), you'd also have to assume that town will always lynch off-wagon once they lynched scum... which makes things complicated and is a worse model than what's presented here.

Well, I thought the top-level assumption was that town voted randomly, not that the lynch itself was random. I guess there are arguments for both approaches.
Title: Re: some probabilities
Post by: pacovf on November 11, 2014, 08:09:05 am
In any case, if this list has been created recursively, even if scum votes randomly, they won't vote randomly at 2/1, so the fact that the 2/1 odds are lower should propagate throught the whole list.
Title: Re: some probabilities
Post by: silverspawn on November 11, 2014, 08:21:27 am
No, the idea was that lynches are random, not votes. I mean, let's say that town decides that random is the best thing they can do in a current situation (for example, if a scum dies early and you expect the remaining scum to mindgame you in some way).  You can now settle on some kind of randomizing system that works without an IC, and everyone who doesn't follow it gets policy lynched. Of course you're almost never do this, but you always could decide to do it. So, at any situation, you should always have at least as much win% as the stats say (bearing some scum PR's). That was the idea, anyway.

In any case, if this list has been created recursively, even if scum votes randomly, they won't vote randomly at 2/1, so the fact that the 2/1 odds are lower should propagate throught the whole list.
I'm not sure I follow. You never lynch randomly, but why is 2/1 any less random than the rest?

It wasn't created recursively though, I just ran through 10 million "games" for each setup, and divided the number of town wins*% by 100k
Title: Re: some probabilities
Post by: pacovf on November 11, 2014, 08:26:33 am
Oh, my assumption was that the votes were 100% random (which results in a random lynch), not that the players had set up a system where the lynch itself is random.

In the first case, the argument for scum to vote randomly is that it is not traceable. However, that argument doesn't apply when down to 2/1, because the last scum can quickhammer without repercussions. Hence the result is less "random".

Of course, this doesn't work if a random-lynch system has been set up.
Title: Re: some probabilities
Post by: qmech on November 11, 2014, 03:55:57 pm
In an n player game with no special roles, the number of mafia should grow like sqrt(n) to give each side an equal chance of winning.
Title: Re: some probabilities
Post by: liopoil on November 11, 2014, 04:27:39 pm
In your analysis, you are forgetting that scum will never vote for scum, so the odds should be lower than that.

Ex: you say that 2/1 means 33% chance for scum to get lynched. But the odds that both town agree to lynch scum are more like 50%*50% = 25%...

A better simulation is, town votes randomly, scum votes randomly among town. Whoever gets the most votes gets lynched, with ties getting town lynched.
Yes, and town can scum hunt from that. For instance, in a 3 player lylo, scum should never vote first 2/3 of the time, and town should lynch the person the first person votes for 2/3 of the time, yielding the 1/3 win rate. I can show that this is the Nash equilibrium if someone is curious. I conjecture that optimal voting strategies will yield the same results as random lynch.

In an n player game with no special roles, the number of mafia should grow like sqrt(n) to give each side an equal chance of winning.
yes. Our games, especially the ones with more players, have too many scum
Title: Re: some probabilities
Post by: silverspawn on November 11, 2014, 04:31:33 pm
I'm just now realizing that I can remove and edit other people's posts here. huh.

yes. Our games, especially the ones with more players, have too many scum

I assume this is a general opinion and unrelated to these stats? because in our games, we have reads.
Title: Re: some probabilities
Post by: sudgy on November 11, 2014, 04:42:44 pm
I seem to remember hearing that scum are better than randomness suggests, but I may be wrong about that.
Title: Re: some probabilities
Post by: liopoil on November 11, 2014, 04:48:58 pm
I'm just now realizing that I can remove and edit other people's posts here. huh.

yes. Our games, especially the ones with more players, have too many scum

I assume this is a general opinion and unrelated to these stats? because in our games, we have reads.
It's my opinion (that I've had for a while - I saw similar stats on the mafiascum wiki), but it is sort of related to these stats. These stats say that at pure random scum has a significant advantage. Look at:

7/2: 29.8%
10/3: 20.7%

Wow! These are some of the most common scum/town ratios. We have PRs and reads, but I don't believe that they can make up for such a large disadvantage.

I seem to remember hearing that scum are better than randomness suggests, but I may be wrong about that.
If this is the case, then it is even more unbalanced.
Title: Re: some probabilities
Post by: Voltaire on November 11, 2014, 05:46:07 pm
I'm just now realizing that I can remove and edit other people's posts here. huh.

yes. Our games, especially the ones with more players, have too many scum

I assume this is a general opinion and unrelated to these stats? because in our games, we have reads.
It's my opinion (that I've had for a while - I saw similar stats on the mafiascum wiki), but it is sort of related to these stats. These stats say that at pure random scum has a significant advantage. Look at:

7/2: 29.8%
10/3: 20.7%

Wow! These are some of the most common scum/town ratios. We have PRs and reads, but I don't believe that they can make up for such a large disadvantage.

I think they absolutely can - just look at the actual win % from games, which (I believe, last time I checked) are nowhere near this.
Title: Re: some probabilities
Post by: liopoil on November 11, 2014, 05:53:01 pm
I'm just now realizing that I can remove and edit other people's posts here. huh.

yes. Our games, especially the ones with more players, have too many scum

I assume this is a general opinion and unrelated to these stats? because in our games, we have reads.
It's my opinion (that I've had for a while - I saw similar stats on the mafiascum wiki), but it is sort of related to these stats. These stats say that at pure random scum has a significant advantage. Look at:

7/2: 29.8%
10/3: 20.7%

Wow! These are some of the most common scum/town ratios. We have PRs and reads, but I don't believe that they can make up for such a large disadvantage.

I think they absolutely can - just look at the actual win % from games, which (I believe, last time I checked) are nowhere near this.
Small sample size. Also, scum plays badly pretty often, and they are all varying degrees of balanced. Anyway, doesn't scum have something like a 60-40 win rate?

(Town has won all 3 of the games I've modded, and I think I have unintentionally trended towards town having a slight advantage in my games).
Title: Re: some probabilities
Post by: silverspawn on November 11, 2014, 06:02:34 pm
This is so case to case though. From the finished games I played, I thought Zelda was town favored, GoT was town favored, James Bond was town favored, and, ehm, I think that's it. No idea about the blitz game. These are the actual setups though (after randomizing - we have no terminology here, they are both called "setup", right?)

not that three games say much. but also, shouldn't town and scum both have less than 50% winrate because of SK's?
Title: Re: some probabilities
Post by: Seprix on December 15, 2014, 05:25:17 pm
What programming language did you use? I probably could write a simple probability program given an entire day, but honestly I'm not code savvy.
Title: Re: some probabilities
Post by: silverspawn on December 15, 2014, 05:34:26 pm
I use java. But really, this was a super small program. here is the entire source code:

public class Probabilities {
   public static void main(String[] args) {
      for (int t=2; t<=10; t++) {
         for (int s=1; s<t; s++) {
            long townWins = 0;

            for (int i=0; i<1000000; i++) {
               int town = t;
               int scum = s;

               while (town > scum && scum > 0) {
                  if ((town+scum)%2 == 0) {
                     town--;
                     continue;
                  }
                  int lynch = (int) (Math.random()*(town+scum) + 1);
                  if (lynch <= town) {
                     town--;
                  } else {
                     scum--;
                  }


                  if (scum > 0) {
                     town--;
                  }
               }


               if (scum == 0) {
                  townWins++;
               }
            }

            System.out.println(t + "/" + s + ": " + (""+((double) townWins)/10000D).substring(0,4) + "%");
         }
         System.out.print("\n");
      }
   }
}
Title: Re: some probabilities
Post by: Seprix on December 15, 2014, 06:59:23 pm
sorry for editing your post, it was a missclick. I'm not used to being able to do that. It's weird.

Ah, so Java. Pretty much the main stuff I've learned.
Title: Re: some probabilities
Post by: silverspawn on December 15, 2014, 07:13:14 pm
Ah, this power.
Title: Re: some probabilities
Post by: pacovf on December 15, 2014, 07:18:00 pm
(http://th05.deviantart.net/fs71/PRE/f/2012/296/0/6/check_mate_by_austiniousi-d5is7vv.png)
Title: Re: some probabilities
Post by: silverspawn on December 15, 2014, 07:31:38 pm
much better
Title: Re: some probabilities
Post by: Seprix on December 15, 2014, 07:47:40 pm
You've been spending a lot of time on this thread. I noticed that awkward photo with the ghosts. Yes. I saw that. I know what you did, you monster.

A monster who can write better code than me T^T
Title: Re: some probabilities
Post by: silverspawn on December 15, 2014, 08:18:56 pm
You've been spending a lot of time on this thread. I noticed that awkward photo with the ghosts. Yes. I saw that. I know what you did, you monster.

A monster who can write better code than me T^T
aw, thanks :)

and that photo wasn't even me. It was pacofv. Who is of course me, but it wasn't from this account.
Title: Re: some probabilities
Post by: pacovf on December 15, 2014, 08:21:18 pm
See? Now I am posting from this account.
Title: Re: some probabilities
Post by: Seprix on December 15, 2014, 09:12:35 pm
You have two accounts? Oh my. I see.
Title: Re: some probabilities
Post by: pacovf on December 15, 2014, 09:16:54 pm
It's easier to increase my respect / post ratio this way.
Title: Re: some probabilities
Post by: silverspawn on December 15, 2014, 09:24:23 pm
It's easier to increase my respect / post ratio this way.
consider this post upvoted
Title: Re: some probabilities
Post by: SwitchedFromStarcraft on December 16, 2014, 09:37:49 am
It's easier to increase my respect / post ratio this way.
I can see how that would work, but why bother when we are all Wandering Winder?
Title: Re: some probabilities
Post by: pacovf on December 16, 2014, 11:44:12 am
It's easier to increase my respect / post ratio this way.
I can see how that would work, but why bother when we are all Wandering Winder?

If all members had respect/post ~= number of members, newcomers would notice something's amiss.
Title: Re: some probabilities
Post by: faust on December 16, 2014, 05:47:21 pm
There are no newcomers. There is only WanderingWinder.