~ Introduction ~
Mafia Simulator is a program based on Dark.Revenant's SC2 Map "-Mafia-" and Forum Mafia on councilofmages.com.
It features almost all roles present in those environments and their options, as well as some new stuff added by the programmers.
With this program, you can simulate almost every setup you could see in SC2Mafia, or even add players for simulating more populated environments. The AI is pretty simple, as it cannot properly emulate human brain and players interaction, however it takes into account all actions that in-game roles could do, memorize them, and use them when time is due. For example, if a sheriff finds mafia, that player will be lynched next day.
Organized teams will also try their best to accomplish their victory condition: mafia and cult will never vote against their own members, culted doctors will heal the cult leader, consigliere will find town power roles and send mafia to kill them the following night, and so on.
Set roles options as you see fit to recreate some of the most entertaining conditions for a mafia game. Then enjoy reading the log and see what happened.
Alternatively you can run a high number of simulations - multithread helps - and then check the graphs to see if it is nearly balanced or if it needs more tweaks.
~ Download Links ~
You can download the last version here:
Windows (v1.3.1): https://goo.gl/9138S (You need to have .NET Framework 4.0 installed)
Mac (v1.3.1): https://goo.gl/JVfxI (You need to have Mono 2.10.5 installed)
Source code (v1.3.1): https://github.com/Illidanz/MafiaSimulator (Licensed under the MIT license)
~ Instructions ~
It's pretty straightforward: you make a setup like in mafia, set the options for every role or leave them at default, set the number of iterations you want, hit Simulate and when the green bar reaches the end you can see the results under it or by clicking the Last Graph button.
If you want log games to see what happens, check the option and click the Last Games button after the simulation to open the game log in your default browser.
When you need to do a lot of simulations (1.000+) you should check the Multithreaded option so everything is faster if you are on a dual or quad core machine.
If you make a cool setup, you can share it by using the "Export Config" button and paste here the config. Then people can copy it and use the "Import Config" button to try your setup and options!
Here's an example of an exported configuration, just click "Select" then copy and paste it in the program.
~ Other Notes ~
It's not supposed to simulate real mafia games, as obviously the AI is very limited, but it can do awesome things. Just look at how witches and bus drivers mess up the whole game, or the clashes between masons and cultists!
The only role missing for the moment is the SC2-Cultist. Detective and Lookout are only partially implemented.
The Cult Leader and recruiting-masons from Forum Mafia are implemented, as I find them way more fun than the sc2 counterparts.
If this little thing amuses you too and you wish to take part in its develompent, please report me any bug you find, and feel free to send me any suggestion and/or request that comes to mind.
Many thanks to Raiden for his awesome testing and ideas!