Computational Mafia

This forum is for discussion related to the game.
Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #0  (isolation #0)  » Tue Feb 12, 2019 11:37 am

I thought maybe it'd be good to have a unitary thread to discuss computational approaches to mafia (running/managing games, playing games, reviewing games) absent any focus on particular implementations. There's a sizable community of people who do this, but i feel that due to differences in strategy we're often get into our own islands and don't really interact much or support one another. Let's use this thread to trade notes from time to time!

We can talk about what we're up to, discuss general/recurring problems, share data, whatever.

Some Relevant Projects
Last edited by Psyche on Fri Jun 14, 2019 3:54 am, edited 2 times in total.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #1  (isolation #1)  » Tue Feb 12, 2019 12:57 pm

Here's a summary of where I think we are. Roughly put, I think the big challenge of computational mafia is how messy and difficult to automatically process game threads are. Natural language processing of player posts is one thing, but even the detection and processing of relatively standardized happenings like player votes, role flips, moderator transitions between game phases, and the like are profoundly challenging things to make a computer do! The result is that the more interesting potential projects in computational mafia require either many hours of coding, many hours of manual data labeling, or forcing players/moderators to change their behavior so that game threads going forward are more streamlined.

We've some success of these approaches, but also a lot of failure. A lot of the necessary hand-prepared data sets exist (e.g. the Game Archive threads), but other data sets often go unprepared due to the huge amounts of work or even unshared after many hours are put into their preparation. Players/Mods have standardized their behavior considerably over the years but a lot remain rightfully resistant to enacting controls on their in-game behavior for the sake of computationalism, and often undisciplined anyway if they aren't; and this method leaves many years of already existing game data abandoned anyway.

As for coding work, some key problems like vote detection/counting under relevant conditions have been solved many times over through distinct projects (including mine) around the site. The result is that in most game threads it's possible to automatically count every vote ever made. Ellibereth famously managed to enhance his Mafia play to near-ceiling levels by formalizing some aspects of his scumhunting strategy. Other tools/formal methods exist or nearly exist for generating and reviewing game setups, timing votecount posts, and other tasks essential to modding. Unfortunately, due to interface issues, secrecy, mod preferences or other challenges, utilization rates for tools like these is rare. Other websites like Mafia Universe cohesively integrate moderator automation tools into the design of their site, and the holy grail of replicating that same success on MafiaScum is a project that remains unfinished but widely anticipated. The more lofty dream of public tools supporting the actual classification of scum and town players from their posts seems at turns substantially further off and all but already here.

Going forward, absent any big changes, we're likely to see more work in fits and starts on these efforts along these lines. Big milestones we might see that might change everything? The site upgrade could happen soon and be successful. Maybe further breakthroughs in thread processing will make it a lot easier for people across the site to build scumhunting tools, this will turn out to be relatively easy, and work will shift to regulating and improving them rather than exploring if it's possible. Sure, there's a chance that instead the site will eventually die out, but that's far off and regardless Mafia is probably here to stay; it's possible that people will just take advantages of sites that implement the concept of forum mafia more cleanly and thus offer cleaner data.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #2  (isolation #2)  » Tue Feb 12, 2019 1:32 pm

there are a few ways i think we can make our work smoother, though:

Share Data
I think most people with coding projects share their code and then no one bothers to read it. I believe that there's a much bigger demand for data not captured or just cleaner than what's in the public archives. I think the user who was named Tamuz once hand-coded an archive for every Newbie game that's ever happened, catalogueing player information, game outcomes, all of that; it seems to be totally lost now. Ground truth data is absolutely necessary either to implement practically any potential computational mafia project or to evaluate if one actually works.

Generate Data
So obviously it would be nice if someone would do the tedious work of organizing the ground truth data needed for most computational mafia projects off the ground. Luckily, people volunteer surprisingly often to do this kind of stuff. My interested in computational mafia has been reinvigorated lately because I've finally found an affordable way to pay other people to do this work too in the way that's necessary for our work, something that could hopefully power much more rapid progress in this domain.

But bigger than that, I think a lot of people (including me) have missed the kind of data that their own computer programs could generate for other people to use if they just made a few tweaks and formatted the output. For example, I mentioned earlier that it's now possible to count every vote in most game threads. People not interested in figuring out how to use my votecounter might find a data set including all of these votecounts really useful, either for their own projects or just for in-game meta-analyses. Similarly, my votecounter includes a tool for matching nicknames and abbreviations to particular players in a game - a dictionary of players and their common nicknames/abbreviations might be similarly broadly useful. I suspect a lot of people doing computational mafia have in their codebases affordances like that but haven't made the effort to extract as much value from them as possible by generating, organizing, and sharing it.

Talk Through Common Challenges and Solutions
No one enjoys looking at other people's code, so the old practice of sharing github repositories seems insufficient for supporting each other through our shared challenges. In general in our big "here's my project" threads I think we should spend more time talking about the problems we faced and how we solved them alongside what our projects achieve. And more specifically, hopefully we can talk about computational mafia as a broad effort here!

And idk, drop more of your lives and just spend more time on this. I'm pretty sure the big reason nothing happens on this project is because the work required to work importance ratio is a bit high. That's...understandable.
Last edited by Psyche on Tue Feb 12, 2019 1:46 pm, edited 1 time in total.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #3  (isolation #3)  » Tue Feb 12, 2019 1:35 pm

Going forward I'm personally focusing on finally organizing a comprehensive data set of all the non-post content information that exists across the game threads on MS that are useful as data. Once that happens, MS becomes much more fun as a playground of behavioral data. Like I said before, I'm pulling from my hobby budget to make the work someone else's problem. Hopefully it's all done in a month. It's so fun to be young and have money.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #5  (isolation #4)  » Tue Feb 12, 2019 1:56 pm

at some point i realized that all i really cared about was building the API

speaking of which, look how easy to use and thoroughly documented my Donbot is! https://github.com/MafiaScum-Unofficial ... ter/donbot
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #6  (isolation #5)  » Wed Feb 13, 2019 3:41 pm

think another way i might help is by writing some kind of review or map of all the progress made so far bc clearly im not aware of it all

Will populate a pile of links and notes here in this post for the time being.

The Mafiascum Dataset
Bicephalous Bob cleans/prepares a dataset of 700 games/10000 documents is freely available for academic use and achieves a good automated role classification model, too. Great leap forward for the effort.

The Newbie 2d3 stats thread
Data could serve work to predict game outcomes, formalize setup balance/generation, etc. Human performance statistics are useful for evaluating computational model performance; Similarly: viewtopic.php?f=5&t=39739

MathBlade's Vote Scrubber
Automated vote detection, even in cases of misspelled/nicknamed players (meaning it's a username matcher, too). Interesting links to other stuff.

etc
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #10  (isolation #6)  » Fri Feb 15, 2019 5:16 pm

Could you be exact about what you’d like for the API to do?
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #13  (isolation #7)  » Mon Feb 25, 2019 11:57 am

shouldn't be too hard implement something at least really close

anyway, now have labels for phase number for every mini normal post in bob's data set (plus any newer games that have finished) and will soon have the same for both normals and opens
once it's fully cleaned up i'll share it with everyone!

this'll enable phase-by-phase analysis of game threads that before was impossible without considerable manual work or tiny data sets
and also more detailed game archives to help people doing metas get where they're trying to get faster
with definite day transition post numbers coupled with a good vote detecter, we'll be able to generate wagon data through every one of these hundreds of games
Last edited by Psyche on Mon Feb 25, 2019 12:36 pm, edited 1 time in total.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #15  (isolation #8)  » Mon Feb 25, 2019 12:42 pm

i mean at the end of the day if that's your goal then maybe you should join the site redesign effort and just build your votecounter into the system
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #19  (isolation #9)  » Wed Feb 27, 2019 4:10 pm

whatever happens there’ll always be other sites
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #21  (isolation #10)  » Sun Mar 03, 2019 8:07 pm

https://docs.google.com/spreadsheets/d/ ... sp=sharing

Hi guys. The above spreadsheet is unfinished and will need to be cleaned a lot once done, but it will include the post number of every phase transition in all the games covered in Bob's data set, plus any newly completed games in the relevant subforums since. This kind of data should permit or facilitate a broad array of computational efforts tied to mafia and MS. I'll let you know when it's fully "done", but I'm too excited not to share it now. More later.
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #23  (isolation #11)  » Sun Mar 03, 2019 10:20 pm

any other kinds of data collection too hard to have a computer do well short of actively reading games? haven't quite figured out what if anything i'll have my coder do after she finishes this thing
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #25  (isolation #12)  » Mon Mar 04, 2019 5:38 pm

oh i remember somehow loading 200 post pages long ago but forgot how i did that

why'd you put the scraper in js, btw?
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #29  (isolation #13)  » Wed Apr 17, 2019 1:12 am

https://github.com/iodide-project/pyodide

this is really interesting to me as someone who struggled bridging my python-based comp mafia efforts to the web without maintaining a server
i have no idea how it works but it’s totally on my to-do list to explore it
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #31  (isolation #14)  » Wed Apr 17, 2019 3:19 am

neato
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #32  (isolation #15)  » Wed Apr 17, 2019 3:45 am

meh pyodide is far from usable atm i gotta stop listening when people tell me to care about things
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #34  (isolation #16)  » Thu May 30, 2019 3:09 pm

im gonna clean up that day transition dataset soon and start crunching numbers
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #36  (isolation #17)  » Fri Jun 07, 2019 7:45 pm

mix of code mix of tedium outsourced to a nice 20-something mother who lives in the phillipines for $3 an hour
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #37  (isolation #18)  » Fri Jun 07, 2019 7:47 pm

i know the pay isn't great but the phillipines are actually a pretty nice place a lot of people choose to live there for free
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #51  (isolation #19)  » Thu Jun 13, 2019 3:12 pm

have always wanted to write a folder of computational notebooks to support players' breaking down games
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #52  (isolation #20)  » Tue Jun 18, 2019 10:44 pm

my supp feedback thread in the speakeasy depends in part on the donbot api we developed last year or so; really eases the challenge of reminding myself every project how to automatically interact w/ the site
really hopeful i can leverage the engagement w/ the codebase the thread required into work on interests in this thread
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #53  (isolation #21)  » Tue Jun 18, 2019 10:54 pm

i'll start small
i'll review the donbot codebase for any bugs/gaps and fix them, all the way through the votecounter - maybe reorganize the whole project
from there i'll start actually making stuff (automated game moderation?) or asking basic research questions, depending on my whim

but in the end i might have better things to do (i definitely do...)
still, i'd really like to get back into a hobby that counts as a creative outlet
as long as i don't take things too seriously it shouldn't be too hard to stay energized
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #54  (isolation #22)  » Sat Jun 22, 2019 2:11 am

alright

i'm gonna try to finish to a complete (well, minimum viable product) votecounting bot by the end of the month
given a playerlist and a posting template and a starting post number and assuming no special voting mechanics/roles, it will automatically top every page with an up-to-date votecount and a final votecount plus other optional events when it believes a lynch has been reached
this functionality will be devolved in an API too, enabling people to use the votecounter or pagetopper for other purposes, including research on voting patterns

practically all the relevant code exists, but iirc some debugging is necessary

i don't think anything else about modding a game really needs automation besides perhaps initial handling of role pms
reliably posting votecounts, though? that's incredibly tedious but whether it's done or not has a massive impact on player experience
finishing a bot for that will open me up to modding more games w/o looking like a jackass
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #56  (isolation #23)  » Mon Jul 01, 2019 7:00 am

I failed!

did some other work though I swear
"Listen well - to be human is to be an eternal wanderer. It's up to you to discover the new vistas of life. No one else will clear the way!"


[ + ]

Return to Mafia Discussion