1. #11221
    For anyone interested i created a mafia game simulator to try and reproduce hundreds of games for a given setup using smart player choices (not just random picking) to gauge win rates/balance for the setup. Started out small and grew into a much larger project than anticipated because i kept tweaking the AI and logic. Started it early this past game and finished it a while ago but didn't want to disrupt anything and figured i'd post it when i died -- turned out to be endgame. So here it is. YES its an exe and NO i'm not haxorzing your computer -- if you dont trust me dont click the link. Also ironic that danner created a whole web-based script handler for his night actions for this game -- making me jealous.

    It either runs X number of simulations giving team win percentages or outputs all the actions/log of an example game. There's an advanced mode to tweak behavior of players/teams if you dont like my base AI or want to better sim real life player chances. Supports a fair number of roles but certainly far from everything seen 'round these parts. Enjoy or ignore as desired.

    Download MafiaSimulator.exe

    Screenshot:
    Spoiler: 




    Methodology:
    Spoiler: 

    This simulation runs in two different modes: Base mode and Smart Player mode. Base mode still contains a rudimentary AI / logic but if no known targets exist then picks targets randomly. Smart mode attempts to simulate probabilities and common actions for roles to better emulate the events of a true game. It can also be used to tweak expected behavior for specific groups or scenarios. It will always fall back on Base mode if all smart actions fail. Each description below is of Base mode (BM) followed by what Smart mode (SM) modifiers affect if enabled.

    Lynch: (BM) If there are known mafia will choose one randomly "known-scum" to lynch unless their team is half or greater of all alive players. Otherwise will choose randomly one non-"known-town" player not part of any scum team half or greater of all alive players. (SM) If choosing randomly has a %Maf chance of picking a guaranteed scum, otherwise choice is done completely randomly from all eligible targets.

    Faction Kills: (BM) Each faction chooses a random non-teammate to kill by a random goon if any exist, followed by random power role if any exist, followed by a godfather. Slight preference given to "known-town" targets. (SM) If choosing randomly has a %TPR chance of picking a guaranteed town non-VT, otherwise choice is done completely randomly from all eligible targets.

    Doctor: (BM) Randomly picks a non-"known-scum" player (including self) to protect. Cannot pick the same target back-to-back nights. (SM) If choosing randomly has a %Self chance of choosing themselves (if eligible), otherwise has a %TPR chance of choosing an eligible non-VT town, otherwise choice is done completely randomly from all eligible targets. Chances based on single "roll" so if %Self + %TPR > 100 then guaranteed one or the other (as eligible).

    Vigilante: (BM) Randomly picks non-"known-town" player (excluding self) to kill. (SM) If choosing randomly has a %Maf chance of picking a guaranteed scum, otherwise choice is done completely randomly from all eligible targets. If skip N1 kill option is checked no kill will be submitted on first night.

    Cop: (BM) Randomly picks non-"known" (any faction) player (excluding self) to investigate. Investigated player is set to "known" state unless investigative immune. (SM) If choosing randomly has a %Maf chance of picking a guaranteed scum, otherwise choice is done completely randomly from all eligible targets.

    Jailor: (BM) Randomly picks any player (excluding self) to both roleblock and protect. Cannot pick the same target back-to-back nights. (SM) If choosing randomly has a %Maf/TPR chance of picking a guaranteed scum or non-VT, otherwise choice is done completely randomly from all eligible targets.

    Tracker/Watcher: (BM) Randomly picks any player (excluding self) to watch. If one and only one person visits target, visitor becomes "known". (SM) If choosing randomly has a %Maf/TPR chance of picking a guaranteed scum or non-VT, otherwise choice is done completely randomly from all eligible targets.

    Jack of all Trades: (BM) Randomly picks between Doctor, Cop, Jailor, or Watcher to emulate. Follows their rules. Cannot pick the same action back-to-back nights. (SM) Follows same modifiers as emulated role. If can kill is checked also may choose Vigilante, unless night 1 with skip N1 kill checked.

    Godfather/Immune: (BM) Only does kill if last remaining. Loses immunity upon attempting kill.

    Roleblocker: (BM) Randomly picks any non-teammate player to roleblock. Overridden by strongarm. Cannot block same target back-to-back nights. (SM) If choosing randomly has a %TPR chance of picking a guaranteed non-VT town, otherwise choice is done completely randomly from all eligible targets.

    Mafia Doctor: (BM) Randomly picks teammate player (including self) to protect. Cannot pick same target back-to-back nights. (SM) If prefers self/GF option is checked will attempt to protect self first, then GF next, otherwise random teammate.

    Serial Killer: Randomly picks any non-teammate player to kill. If more than one SK they are considered to be individual opposed teams unless shared kill option is checked (become same team, one player will do all kills until dead). If strongarm option is checked the kill will ignore protections and roleblocks. Vests are an individual pool of one-time protections from night kills. Collars are an individual pool of one-time protections from lynches. A lynch that fails due to a collar will set the SK to "known-scum".

    Order of Night Actions: Priority actions fire before kills and protects which fire before investigations, and watches are independent. Strongarm kills and roleblocks happen first, with the former ignoring the latter. Then each kill attempt that hits a protect is neutralized eliminating the protect -- therefore multiple kills on same target need to exceed number of protects on said target. Investigates return results on alive targets to alive action takers. Watchers must see exactly one visitor and be alive to gain results.

    Winner Conditions: If all scum are eliminated and town remain, town wins. If all town are eliminated or outnumbered and only one scum faction remains, that faction wins. If all players are dead it is a tie.
    Last edited by Razamith; 2015-08-10 at 12:11 AM.

  2. #11222
    smart player mode? looks like no one on here should be ticking that ))
    게임 은 어렵~~

  3. #11223
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    That's cool Raza and I'm sure it was fun to make but I think it won't be too useful unless you add the ability to make a custom role somehow. Since most games nowadays have roles outside the norm and those roles being too unbalanced can be what throws off balance most of the time. Games with more basic set ups are usually fairly balanced.

  4. #11224
    Ya its not meant to be exact, nor to run/simulate a super customized game, but just to estimate the balance of a game setup. I can fit most the previous games setups into it and interesting results. Something like this last one is way too customized and uneven mafia teams, but most others can be approximated.

  5. #11225
    As always, consider me as signed up in advance for the next game. I should be around though the games have been filling up very fast lately so I'm paranoid I'll miss out if I happen to not check the site for a day or two.

    I enjoy playing with you all very much!

  6. #11226
    What happened to your game Omer, apparently the signup thread was fake but I thought you were actually going to do a game soon

  7. #11227
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    I don't know he's not on the list or the afk list so looks like if he was on it he's removed himself. Next one is the dead but he's afk so its strikered.

  8. #11228
    Field Marshal Krayzy's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    Idaho, PotatoLandUSA
    Posts
    56
    I think I'll play in this next game. This will be my first game played this year.

  9. #11229
    Scarab Lord Crackleslap's Avatar
    10+ Year Old Account
    Join Date
    Jun 2010
    Location
    Brisbane, Australia
    Posts
    4,113
    Strikered!!! sign up thread please! RIP.

  10. #11230
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Updated the OP so that should be all correct now. I moved Thedead over to the afk mod list.

    As for the game after strikered, anyone seen firebert around recently or will/can reti run that on his own or is that another skipped game? Lora should make sure yours is ready just in case that one can't run anyway since yours is after that.

  11. #11231
    Bloodsail Admiral Omertocracy's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    Yes.
    Posts
    1,032
    Quote Originally Posted by Lysah View Post
    What happened to your game Omer, apparently the signup thread was fake but I thought you were actually going to do a game soon
    I haven't been on the list since double-cult. Mostly because the game I have designed requires 15 or fewer players.

  12. #11232
    Scarab Lord Crackleslap's Avatar
    10+ Year Old Account
    Join Date
    Jun 2010
    Location
    Brisbane, Australia
    Posts
    4,113
    Quote Originally Posted by Anakso View Post
    Updated the OP so that should be all correct now. I moved Thedead over to the afk mod list.

    As for the game after strikered, anyone seen firebert around recently or will/can reti run that on his own or is that another skipped game? Lora should make sure yours is ready just in case that one can't run anyway since yours is after that.
    I can co-mod for Ret if he wants it and Firebert doesn't show. :P

  13. #11233
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    I think I said this when you last mentioned it but you could run that game Omerto you'd just need to either create another ~15man game to run in tandem with the first one so half the players don't have to miss mafia for a month. A better alternative would to be find another mod like a co-mod but rather than helping you with your game they create their own 15 man game to run with yours. I'd recommend throwing worg a PM, he's still around so not totally MIA and still had a game on the list so may still be interested in modding and I know he enjoys running small form games as he's done it in the past. If not him just see if anyone else wants to mod a 15 man game.

    I'd also recommend having the 2nd game be able to scale up a bit since yours is capped at 15, then yours could go with 15 and the other with say 16 if we get 31 players total.

  14. #11234
    well i was waiting for TD to show should i just go ahead and do mine?

  15. #11235
    I am Murloc! Anakso's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Perth, Australia
    Posts
    5,020
    Quote Originally Posted by Crackleslap View Post
    I can co-mod for Ret if he wants it and Firebert doesn't show. :P
    Yea not sure how that'd work though since it's fireberts game and Ret is his co-mod I remember Firebert saying he wanted that theme for his next game ages ago and was curious as to what it actually is. Still curious so I hope it runs!

    But it does say it's ready so I assume ret knows all the information and last I checked firebert is still answering PMs so I guess ret could check with firebert via PM to see if he can run it (if ret even wants to)

    - - - Updated - - -

    Quote Originally Posted by Strikered View Post
    well i was waiting for TD to show should i just go ahead and do mine?
    Yes, TD has been afk long enough that I don't think it's reasonable for us to have to wait for him. If he'd posted say 2 days ago then we could maybe wait a few days but wasn't his last post here like a month or more ago?

  16. #11236
    fair enough sign ups will go up soon then

  17. #11237
    Scarab Lord Crackleslap's Avatar
    10+ Year Old Account
    Join Date
    Jun 2010
    Location
    Brisbane, Australia
    Posts
    4,113
    Quote Originally Posted by Strikered View Post
    fair enough sign ups will go up soon then
    Awesome.

    /rediculouslyannoying10characterthing

  18. #11238
    Field Marshal Krayzy's Avatar
    10+ Year Old Account
    Join Date
    May 2011
    Location
    Idaho, PotatoLandUSA
    Posts
    56
    I'd like to run another game, but I fear I'll be dead before we go through this list.

    Who can I bribe or give sexual favors to so that I can take the place of an afk mod? ������

  19. #11239
    Bloodsail Admiral Omertocracy's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    Yes.
    Posts
    1,032
    Quote Originally Posted by Anakso View Post
    I'd also recommend having the 2nd game be able to scale up a bit since yours is capped at 15, then yours could go with 15 and the other with say 16 if we get 31 players total.
    I have another idea that can serve 20ish I could run simultaneously, but I will have to dust it off, and it is complete and utter role madness.

  20. #11240

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •