Won't have time to update tester for a little while anyways..
Automatic Balance Tester - Page 3
Forum Index > TL Mafia |
Xatalos
Finland9673 Posts
Won't have time to update tester for a little while anyways.. | ||
gonzaw
Uruguay4911 Posts
Maybe more ideally, when someone is "modkilled" for inactivity, what actually happens is that the game is re-balanced (somehow) as if that player didn't join the game in the first place. Eg if there are 12 townies and 3 scum, and a townie is "modkilled" for inactivity, then you rebalance the game as if there were only 11 townies and 3 scum all along. The game doesn't "lose" balance (i.e if a townie got modkilled, town doens't lose advantage, if scum was modkilled, scum doesn't lose advantage). How? Beats me, that's why it's idealized ![]() | ||
Xatalos
Finland9673 Posts
On December 14 2013 02:38 gonzaw wrote: Ideally there shouldn't be modkills. Maybe more ideally, when someone is "modkilled" for inactivity, what actually happens is that the game is re-balanced (somehow) as if that player didn't join the game in the first place. Eg if there are 12 townies and 3 scum, and a townie is "modkilled" for inactivity, then you rebalance the game as if there were only 11 townies and 3 scum all along. The game doesn't "lose" balance (i.e if a townie got modkilled, town doens't lose advantage, if scum was modkilled, scum doesn't lose advantage). How? Beats me, that's why it's idealized ![]() Haha ![]() I still think modkills are somewhat equally harmful for all factions (though maybe hosts are a bit more lenient for scum before modkilling). | ||
Xatalos
Finland9673 Posts
| ||
Xatalos
Finland9673 Posts
- All balance values have been changed to decimal values - The base balance value for Mafia is now -4.25 (previously -4) - The balance value for Veteran is now +1.5 (previously +2) - The balance value for Serial Killer is now -3.5 (previously -3) - Mafia Mason is now valued at the base balance value for Mafia (-4.25) unless at least one town Mason exists - Victory odds calculations have been adjusted - Specifically both Serial Killer and Survivor have had their victory odds increased moderately I had also planned to include scroll panes and a new style to view the role list (amount X rolename instead of all rolenames in a row), but ran into some technical difficulties, and then decided to delay those changes. They aren't *that* crucial in the big picture, after all. I'll probably include them later on to improve the UI a bit. Here's a link to download the version #4 of the program: https://www.dropbox.com/s/zb7oxzsz177h4f7/Mafia_Balance_Tester.jar All feedback is appreciated! | ||
wherebugsgo
Japan10647 Posts
If you wanna collab on something let me know. I'm thinking of including past games and other types of data as well. | ||
Xatalos
Finland9673 Posts
On December 30 2013 14:06 wherebugsgo wrote: Cool, I was looking toward making something like this myself. I just got time this break so I'm going to try to make something independently (partly cause I hate java) and I'll see what I get. If you wanna collab on something let me know. I'm thinking of including past games and other types of data as well. That sounds interesting. The approved setups here on TL Mafia have already gone through a manual balancing process, so they should be a good starting point for automatic balancing. Are you thinking of basing the whole balancing process on past games data or just showing them as some kind of a reference for the user? kitaman's TL Mafia Database would probably be helpful for both purposes. Which language are you planning to use? How similar is it to my current balance tester? I could share the code I have currently on this one if you want. Actually the logic of this program is pretty simple, and the hardest part has been to get the GUI working properly (it still isn't working completely properly ![]() Depending on how similar our aims are, it might make sense to maintain two separate programs. If they're very similar, though, it might not make much sense. Currently my main goal is just to make the program easy to use and fairly reliable. I thought of using iGrok's balancing method for a bit, but ultimately I didn't know how to automate it. The +/- method is very simple, but its accuracy suffers in larger / more complicated setups. The best option would probably be to calculate every possible scenario each day/night for the whole game, but that gets very complicated very fast. How were you thinking of calculating the balance? | ||
Aquanim
Australia2849 Posts
On December 30 2013 23:29 Xatalos wrote: ... Actually the logic of this program is pretty simple, and the hardest part has been to get the GUI working properly... That always seems to be the way it works out. ![]() | ||
wherebugsgo
Japan10647 Posts
On December 30 2013 23:29 Xatalos wrote: That sounds interesting. The approved setups here on TL Mafia have already gone through a manual balancing process, so they should be a good starting point for automatic balancing. Are you thinking of basing the whole balancing process on past games data or just showing them as some kind of a reference for the user? kitaman's TL Mafia Database would probably be helpful for both purposes. Which language are you planning to use? How similar is it to my current balance tester? I could share the code I have currently on this one if you want. Actually the logic of this program is pretty simple, and the hardest part has been to get the GUI working properly (it still isn't working completely properly ![]() Depending on how similar our aims are, it might make sense to maintain two separate programs. If they're very similar, though, it might not make much sense. Currently my main goal is just to make the program easy to use and fairly reliable. I thought of using iGrok's balancing method for a bit, but ultimately I didn't know how to automate it. The +/- method is very simple, but its accuracy suffers in larger / more complicated setups. The best option would probably be to calculate every possible scenario each day/night for the whole game, but that gets very complicated very fast. How were you thinking of calculating the balance? Probably at least partially based on past setups, though the sample size is incredibly small. More likely what I'll be doing is encouraging the people on the balance team to run the setup randomizer I create lots of times. I'll probably put in some sort of rudimentary learning algorithm that will assign a balance rating, i.e. + for town, - for mafia similar to what you have. Based on what the tester inputs as his opinion the program will change its future predictions for the setups it creates/sees. It'd hopefully become more effective as more games are added. I'll likely also include multiple options for balance calculation. I'm thinking the main ones would be: 1. Testers' inputted scores 2. Role balance based on game winrate when included 3. Balance based upon +/- scores given to different roles (manually, not through past games) So there'd probably be a bunch of checkboxes or input boxes for each of the calculations, and the program would just keep track of a variety of different values to calculate scores to maintain versatility. In other words, if I wanted to see what the program thought without including past games, there'd be an option to turn off #2. If I wanted to manually tune the score based on what I thought certain roles are worth, I could change scores on the fly for #3. e: unfortunately I don't have a proper coding platform atm, I fucking hate Windows. So this'll probably be on the backburner for a bit. also I'll probably write it in either Python or C++. | ||
Xatalos
Finland9673 Posts
On January 01 2014 07:37 wherebugsgo wrote: Probably at least partially based on past setups, though the sample size is incredibly small. More likely what I'll be doing is encouraging the people on the balance team to run the setup randomizer I create lots of times. I'll probably put in some sort of rudimentary learning algorithm that will assign a balance rating, i.e. + for town, - for mafia similar to what you have. Based on what the tester inputs as his opinion the program will change its future predictions for the setups it creates/sees. It'd hopefully become more effective as more games are added. I'll likely also include multiple options for balance calculation. I'm thinking the main ones would be: 1. Testers' inputted scores 2. Role balance based on game winrate when included 3. Balance based upon +/- scores given to different roles (manually, not through past games) So there'd probably be a bunch of checkboxes or input boxes for each of the calculations, and the program would just keep track of a variety of different values to calculate scores to maintain versatility. In other words, if I wanted to see what the program thought without including past games, there'd be an option to turn off #2. If I wanted to manually tune the score based on what I thought certain roles are worth, I could change scores on the fly for #3. e: unfortunately I don't have a proper coding platform atm, I fucking hate Windows. So this'll probably be on the backburner for a bit. also I'll probably write it in either Python or C++. Okay, that #3 option seems pretty similar to how my program works currently... But options #1 and #2 are quite different. Although I've naturally tried to have some level of "tester input" through this feedback thread ![]() I'll PM you the source logic of my program so that you can see if there's something useful for your aims. You said that you dislike Java, but even so, it shouldn't be that hard to understand how it works (it's pretty simple overall). Be sure to also check out the actual program here: https://www.dropbox.com/s/zb7oxzsz177h4f7/Mafia_Balance_Tester.jar I'd definitely value feedback from a developer (as well as Mafia player) perspective. | ||
gonzaw
Uruguay4911 Posts
Also, how about making this open source? Msybe open a github proyect so people can cooperate | ||
Xatalos
Finland9673 Posts
On January 01 2014 10:29 gonzaw wrote: I think this would probably work better as web app. You could use a free cloud hosting system perhaps? Also, how about making this open source? Msybe open a github proyect so people can cooperate Yeah, I think a web app would be more convenient. It's just that I have basically no experience with web apps so far... It's definitely a possibility for the future, though. I've also been thinking of making the program open source. It's not like I'm planning to make money off of it or to maintain it forever. However, I think there's still some work to be done before I'm ready to actually "launch" the program ![]() | ||
Xatalos
Finland9673 Posts
- Added scroll bars to the main balance tester window (now it’s possible to use the program with a very small computer screen or with a very large 40+ player setup on a relatively small computer screen) - Changed the balance value of Veteran back to +2 (from +1.5) (on second thoughts, it felt like Veteran was undervalued at +1.5) - Increased the victory odds of SK and Survivor a bit more (I think the previous victory odds were still a bit too weak for both roles) Here's the download link: https://www.dropbox.com/s/zb7oxzsz177h4f7/Mafia_Balance_Tester.jar It seems like the balance values are in a decent spot right now, but it would be helpful to have new perspectives on the matter (it's hard to both determine the values and to test them objectively). Otherwise there's some small user interface stuff that could use improving, but the program is mostly "ready" at this point. Maybe I'll implement some bigger changes if I get good ideas, though. WBG talked about some interesting stuff, but I'm not quite sure if I want to make this program much larger / more complicated... The original goal was to make it easy to use and to have static values, after all. We'll see. | ||
Xatalos
Finland9673 Posts
Active development of the program is kind of paused at the moment, but I've implemented almost all of the suggestions so far, so it's a good time to add your own ideas now for the next version ![]() | ||
gonzaw
Uruguay4911 Posts
On January 01 2014 17:10 Xatalos wrote: Yeah, I think a web app would be more convenient. It's just that I have basically no experience with web apps so far... It's definitely a possibility for the future, though. Well....ok ![]() With a web app, you'd have less "control" over the GUI (like you'd do with a desktop app), but you have more powerful frameworks to choose from to help you. E.g databases, hosting services, bla bla bla. Well, if you choose specific frameworks (which you have to research), and you know lots of javascript, or html5, etc, you can have a pretty bitching GUI. However that's harder than just creating an app with Swing. Although I think JavaFX may be better perhaps; I never really liked Swing. Also you already have it hosted, nobody needs to install JRE or download the app or anything. Because it's hosted in a single place, you can have users, and statistics, and shit like that I've also been thinking of making the program open source. It's not like I'm planning to make money off of it or to maintain it forever. However, I think there's still some work to be done before I'm ready to actually "launch" the program ![]() Yeah, it's kind of a "tough" thing to do. If you are the project leader, you'll have to do lots of stuff, and basically learn a whole new industry setting and procedures, etc. For instance here's a guide: http://producingoss.com/en/index.html It does take a while to learn, and then get enough experience and practice and collaboration and shit (not that I ever did any open source project though lol). If you do go open source though, you can gather the power from anybody ever that's relatively interested in tools to play mafia, instead of just doing it yourself. That has the potential of creating a super awesome tool, and hell maybe even advancing the "game theory" behind mafia (regarding balancing in this specific case for instance). I'd volunteer and stuff.....but I'm lazy ![]() Also, as for suggestions, I would suggest: -Include a database of the games it's being used on. Whenever the user chooses to balance a game, you can ask for the name of the game and that kind of stuff, and save it for later (for example, to later check how that previous game was balanced once it's over). -Migrate kita's database of games into this new database of yours. That way we can see how every single game from TL is balanced....and well that's nice. It's not hard work as long as you create a compatible infrastructure and create a script to migrate kita's database | ||
Xatalos
Finland9673 Posts
On January 10 2014 10:54 gonzaw wrote: Well....ok ![]() With a web app, you'd have less "control" over the GUI (like you'd do with a desktop app), but you have more powerful frameworks to choose from to help you. E.g databases, hosting services, bla bla bla. Well, if you choose specific frameworks (which you have to research), and you know lots of javascript, or html5, etc, you can have a pretty bitching GUI. However that's harder than just creating an app with Swing. Although I think JavaFX may be better perhaps; I never really liked Swing. Also you already have it hosted, nobody needs to install JRE or download the app or anything. Because it's hosted in a single place, you can have users, and statistics, and shit like that Yeah, it's kind of a "tough" thing to do. If you are the project leader, you'll have to do lots of stuff, and basically learn a whole new industry setting and procedures, etc. For instance here's a guide: http://producingoss.com/en/index.html It does take a while to learn, and then get enough experience and practice and collaboration and shit (not that I ever did any open source project though lol). If you do go open source though, you can gather the power from anybody ever that's relatively interested in tools to play mafia, instead of just doing it yourself. That has the potential of creating a super awesome tool, and hell maybe even advancing the "game theory" behind mafia (regarding balancing in this specific case for instance). I'd volunteer and stuff.....but I'm lazy ![]() Also, as for suggestions, I would suggest: -Include a database of the games it's being used on. Whenever the user chooses to balance a game, you can ask for the name of the game and that kind of stuff, and save it for later (for example, to later check how that previous game was balanced once it's over). -Migrate kita's database of games into this new database of yours. That way we can see how every single game from TL is balanced....and well that's nice. It's not hard work as long as you create a compatible infrastructure and create a script to migrate kita's database That sounds kind of like WBG's plan for a balance tester (using past games for comparison and balancing). You can check earlier in this thread. I'm not sure when he'll begin working on that system, but I think it might be better if he focused on that and I focused on this simpler, static approach. (Also I don't know anything about databases yet, but I'll be studying mostly database stuff in the following months, so maybe I'll include some of that stuff too ![]() I haven't yet given any real thought to open source, but thanks for the link. I'll save it for future reference. It also depends on if there are actually other people willing to work on the program... The logic in it is relatively simple, and most of the work so far has resulted from creating the GUI. I'll have to consider the option more. Regarding the web option: yeah, what you say is true. If I had had experience with web development, I would have almost certainly started the project as a web site. I'll see what I can do once I improve my skills ![]() A lot of uncertain answers in this post, sorry, but what you talked about was very large-scale stuff. It's certainly useful to consider such matters, but mostly I'm looking for more concrete and smaller suggestions at the moment. Thanks in any case! | ||
kitaman27
![]()
United States9244 Posts
For example, 2 Goons/7 VT would end D3 at the earliest for a mafia win or D2 at the earliest for a town win. 2 Goons/6 VT 1 Vig would end D2 at the earliest for a mafia win or N1 at the earliest for a town win. If you're looking for a feature to add at any point, it would probably be fairly simple to come up with a formula for this for mini games. | ||
Xatalos
Finland9673 Posts
On January 11 2014 04:38 kitaman27 wrote: I know this is kinda outside the realm of what you have currently, but something that I find really helpful is knowing the cycle the game would end in worst case scenario for each faction. For example, 2 Goons/7 VT would end D3 at the earliest for a mafia win or D2 at the earliest for a town win. 2 Goons/6 VT 1 Vig would end D2 at the earliest for a mafia win or N1 at the earliest for a town win. If you're looking for a feature to add at any point, it would probably be fairly simple to come up with a formula for this for mini games. Actually yeah, that's a good idea, and not that hard to calculate either. Basically the worst case for town is if every Mafia NK kills a townie and every lynch is a mislynch. The worst case for Mafia is if every lynch hits Mafia and no NK kills a townie (Doctor/Veteran etc.). On the other hand, roles like Serial Killer complicate matters a bit. I'm not sure if there's even much use in calculating an ideal scenario for neutral roles? Maybe just town/Mafia? | ||
kitaman27
![]()
United States9244 Posts
| ||
gonzaw
Uruguay4911 Posts
For example, you can balance a game, knowing that in the worst case scenario for town, town loses on D3 after 2 misslynches and 2 NK going through. Then you have the worst case scenario for scum, where town lynches scum 3 days in a row, the medic saves shots 2 nights in a row, cop gets checks 2 nights in a row, etc. But what about the stuff in between? You can't balance JUST using worst case scenarios, because those will NEVER happen, they are just a rough guide on what "could" happen. I think it's more important to balance according to what WILL indeed happen. Maybe the best way to model that, is just count all possible scenarios, assign a probability to them, or maybe some other factor (like a Balance Number perhaps?), and then determine the overall balance of the game, knowing the probability of each of these scenarios. Most likely there would be heuristics to determine these probabilities/factors, or some other theory that can help. For instance, yes, the worst case scenario for scum is if the Town Vig shoots scum on N1, the medic saves 2 townies on N1 and N2, and town lynches scum on D1, D2 and D3. Good, but that will surely NOT happen at all. What will most likely happen, is town misslynches on D1, town vig shoots a townie on N1, town lynches scum on D2, medic saves townie on N2, bla bla bla. THAT is the "normal" flow of the game you should be balancing. If town has it so easy, that in that scenario they win almost all the time, then the game is balanced wrong, even if there exists a "worst case scenario" for town that seems it can fuck them up pretty badly. The point is that it's more probable that the "normal" flow of the game happens than that worst case scenario. Different roles have different balancing factors as well, that's not just a +1 or -1. A town vig can shoot a townie or a scum, he has the power to greatly favor scum or town. That has a lot of variance, so when a vig is inserted in a game, it should introduce variance on the chances each faction can win, and thus balance. Idem when you have a cop and a framer or GF for instance. It introduces variance, since the cop may check the GF. That greatly changes the game, since the GF could be considered almost confirmed town. Or maybe town is good and catch him nevertheless. That's even more variance (how town can react to it). I think something like that might work better: introduce the average chance each faction has to win the game, and the variance of it, and balance (somehow) according to that). Seems to me there can be better ways to handle balance, to be as accurate as possible. | ||
| ||