Computational Mafia

This forum is for discussion related to the game.
User avatar
Plotinus
Plotinus
Kitten Caboodle
User avatar
User avatar
Plotinus
Kitten Caboodle
Kitten Caboodle
Posts: 7611
Joined: March 13, 2015
Location: UTC+1
Contact:

Post Post #50 (ISO) » Thu Jun 13, 2019 9:06 am

Post by Plotinus »

I'd be curious to see it once you get it up and running
The failure mode of clever is asshole.

Modding checklists | Sequencer is in Game 5 | Space II is in Day 4
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #51 (ISO) » Thu Jun 13, 2019 9:12 am

Post by Psyche »

have always wanted to write a folder of computational notebooks to support players' breaking down games
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #52 (ISO) » Tue Jun 18, 2019 4:44 pm

Post by Psyche »

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
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #53 (ISO) » Tue Jun 18, 2019 4:54 pm

Post by Psyche »

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
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #54 (ISO) » Fri Jun 21, 2019 8:11 pm

Post by Psyche »

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
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Keychain
Keychain
she/her
Mafia Scum
User avatar
User avatar
Keychain
she/her
Mafia Scum
Mafia Scum
Posts: 1030
Joined: November 16, 2014
Pronoun: she/her
Location: London UK
Contact:

Post Post #55 (ISO) » Sat Jun 22, 2019 2:44 pm

Post by Keychain »

In post 42, Plotinus wrote:After the next newbie game starts (I'm next in line), I'll know if I've fixed my race condition, if I have then I'll push my change.

setup a game (requires: selenium) : MafiaMod
also requires these files: files

It's all set up for my own defaults so you would need to:
  • Edit the files in files/public/ to format the OP how you'd like
  • Search for the word "hubris" and remove it if you dont want to add my girlfriend to your deadthread. (This step will be easier in the next version, you'll be able to do --spectators = "person1 person2 person3")
  • If you're not modding a newbie game, put your role PMs in the files/roles directory and add the roles names to the setups dictionary.
  • Also change this to be whatever subforum you'll be putting the game in

    Code: Select all

        if whichThread == 'public':
            url = 'https://forum.mafiascum.net/posting.php?mode=post&f=11'
If you want to increase the size of the deadline smoothly throughout the dayphase, calculate the times that you should do it at: mafiaDeadlines

When should I prod somebody next, given that time passes slower on the weekends and they might be v/la: MafiaProd

Give me a list of countdown timers to post in the mod PT of when everybody should be prodded next, if the nightphase doesn't reset countdown timers, time passes more slowly on weekends, and some people are V/LA: NightProd (has a bug that i haven't figured out yet), requires BeautifulSoup
:eek: this is
awesome
You're under no obligation to be the same person you were 5 minutes ago.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #56 (ISO) » Mon Jul 01, 2019 1:00 am

Post by Psyche »

I failed!

did some other work though I swear
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Flubbernugget
Flubbernugget
Survivor
User avatar
User avatar
Flubbernugget
Survivor
Survivor
Posts: 11751
Joined: June 26, 2014

Post Post #57 (ISO) » Mon Jul 01, 2019 6:36 pm

Post by Flubbernugget »

just do a git reset --hard and you'll probably get it right on the second attempt in half the time
User avatar
Claus
Claus
Mafia Scum
User avatar
User avatar
Claus
Mafia Scum
Mafia Scum
Posts: 1734
Joined: June 1, 2007
Location: Tsukuba
Contact:

Post Post #58 (ISO) » Sun Jul 07, 2019 4:28 pm

Post by Claus »

Hey Everyone,

The AIWolf Research group will host a competition of Mafia/Werewolf playing bots using Natural Language in October this year.

The idea of this competition is to create AI-mafia bots that can be fun to play with/play against. We held this competition in the past
4 years in Japanese, and this year it is the first time we are holding the competition in English. So we're looking for some people who
could help us judge the submitted bots.

So would anyone be interested in helping us? The task would be to read some 5-player games (and maybe a few 15-player games,
depending on the number of participants), and give your subjective opinion on the different bots (did it play well, did it look human-like,
did it look fun, etc). The setup is relatively simple: Cop, Doctor, Godfather, etc.

No knowledge of AI is necessary. This would take place in the later half of September. Last year we had about 10 submissions.

I hope this picks your interest! Feel free to PM me for details!
http://www.youtube.com/watch?v=XVVmAG0RXmo
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #59 (ISO) » Sun Sep 29, 2019 1:05 am

Post by Psyche »

managed to trick my PI into funding my interest in complinguistics so I think I'm gonna return to this world again, though I'm even more focused than before on research over making tools for people
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Claus
Claus
Mafia Scum
User avatar
User avatar
Claus
Mafia Scum
Mafia Scum
Posts: 1734
Joined: June 1, 2007
Location: Tsukuba
Contact:

Post Post #60 (ISO) » Sun Sep 29, 2019 2:04 am

Post by Claus »

That's cool. There will be a workshop in Tokyo this month on comp linguistics with a session on AI Werewolf. Only four papers though (and not really great ones TBF).
http://www.youtube.com/watch?v=XVVmAG0RXmo
User avatar
Plotinus
Plotinus
Kitten Caboodle
User avatar
User avatar
Plotinus
Kitten Caboodle
Kitten Caboodle
Posts: 7611
Joined: March 13, 2015
Location: UTC+1
Contact:

Post Post #61 (ISO) » Sun Sep 29, 2019 4:17 am

Post by Plotinus »

I updated mafiaMod to account for the new newbie setup a while ago and have laid some groundwork for supporting other setups
The failure mode of clever is asshole.

Modding checklists | Sequencer is in Game 5 | Space II is in Day 4
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #62 (ISO) » Thu Dec 05, 2019 9:04 pm

Post by Psyche »

hey guys
anyone do anything new w/o telling me?
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #63 (ISO) » Sat Dec 07, 2019 12:38 pm

Post by Psyche »

30 days of code for 30 days in a row on my project 30 days let's go 30 days
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Plotinus
Plotinus
Kitten Caboodle
User avatar
User avatar
Plotinus
Kitten Caboodle
Kitten Caboodle
Posts: 7611
Joined: March 13, 2015
Location: UTC+1
Contact:

Post Post #64 (ISO) » Sun Dec 08, 2019 7:25 am

Post by Plotinus »

In post 61, Plotinus wrote:I updated mafiaMod to account for the new newbie setup a while ago and have laid some groundwork for supporting other setups
I fixed some bugs in mafiaMod and now it is currently bug free and can set up a game entirely in 7 minutes: all opening posts in the public thread, mafia PT, dead PT, and mod PT, all role PMs sent.
The failure mode of clever is asshole.

Modding checklists | Sequencer is in Game 5 | Space II is in Day 4
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #65 (ISO) » Mon Dec 16, 2019 3:16 pm

Post by Psyche »

donbot is slow - maybe not too slow since the average mafia thread is not very long compared to the alternative, but something to worry about; at very least i might want to add a progress tracker to curb impatience when threads with like 10,000 posts are being processed
also it explodes if a thread you're processing has one of your foe's accounts' posts in it, but i think that shouldn't be a problem in the mafia subforum. Might add some warning into the code or documentation somewhere...

i think that since i'm leaning toward specializing in data analysis over, like, moderation automation, i'll probably switch to a faster scraping scheme

it does feel quite easy to use! i think i need to bring the documentation closer to the homepage of the repo though
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Flubbernugget
Flubbernugget
Survivor
User avatar
User avatar
Flubbernugget
Survivor
Survivor
Posts: 11751
Joined: June 26, 2014

Post Post #66 (ISO) » Mon Dec 16, 2019 3:50 pm

Post by Flubbernugget »

Loading bar will probably give you more mileage than optimizations. There's also probably a library out there to do most of the work for you
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #67 (ISO) » Mon Dec 16, 2019 3:50 pm

Post by Psyche »

yah tqdm very sexy
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #68 (ISO) » Tue Dec 17, 2019 4:43 pm

Post by Psyche »

A really concrete overarching goal of mine for a long time now is to build a foundation of preprocessed data and analysis code to ask if there are any reliable patterns in voting behavior that are useful as scum or town tells. The idea is that differences of win condition and knowledge probably drive distinct voting patterns between factions. I've called this effort "the Great Vote Count Analysis".

In theory, the tools and preprocessed data necessary to perform initial analyses of this sort already exist. We have a votecounter that than scan threads for and identify even really messy votes, games archives that track the roles and alliances and deaths of every player, and a hand-coded excel workbook identifying the post numbers of transitions between Day and Night phases across a huge number of games.

It's possible that we'll need even more than that - for example, proponents of VCA often insist that the motives/justifications and context surrounding votes are just as or more important for finding scum in votecounts as the votes themselves. But the basic core foundation of it all is already there and just needs to be tied together.

My hope is that once I tie it together, other people will be interested enough to try out analysis approaches themselves, but I know that's dumb.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
skitter30
skitter30
she/her
Last Laugh
User avatar
User avatar
skitter30
she/her
Last Laugh
Last Laugh
Posts: 36564
Joined: March 26, 2017
Pronoun: she/her
Location: Est

Post Post #69 (ISO) » Tue Dec 17, 2019 6:00 pm

Post by skitter30 »

i'd use something like that, i think
in the back of my mind i've been kinda wanting to work on developing something that would enable me to analyze votes in that way, but realizing the sheer amount of work i'd need to put in to get a dataset i could work with kinda makes me not want to start
In post 68, Psyche wrote:and a hand-coded excel workbook identifying the post numbers of transitions between Day and Night phases across a huge number of games.
where's this kept?
Show
Hiatus once more.

'skitter is fucking terrifying' ~ town-bork about scum-me

'Skitter [was] terrifying to play against ngl' ~ scum-bork about town-me

'Going into lylo against scum!skit unprepared is like having someone force feed you dull razor blades. It's painful, and once it starts, you're pretty much dead' ~ NMSA

'Skitter you're a spirit animal's spirit animal' ~ slaxx
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #70 (ISO) » Tue Dec 17, 2019 6:03 pm

Post by Psyche »

In post 21, Psyche wrote: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.
i still haven't cleaned it
i paid some filipino lady to make this, was such a great scheme
Last edited by Psyche on Tue Dec 17, 2019 6:05 pm, edited 1 time in total.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
skitter30
skitter30
she/her
Last Laugh
User avatar
User avatar
skitter30
she/her
Last Laugh
Last Laugh
Posts: 36564
Joined: March 26, 2017
Pronoun: she/her
Location: Est

Post Post #71 (ISO) » Tue Dec 17, 2019 6:04 pm

Post by skitter30 »

tyty, should have checked earlier in the thread
Show
Hiatus once more.

'skitter is fucking terrifying' ~ town-bork about scum-me

'Skitter [was] terrifying to play against ngl' ~ scum-bork about town-me

'Going into lylo against scum!skit unprepared is like having someone force feed you dull razor blades. It's painful, and once it starts, you're pretty much dead' ~ NMSA

'Skitter you're a spirit animal's spirit animal' ~ slaxx
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #72 (ISO) » Tue Dec 17, 2019 6:08 pm

Post by Psyche »

So I'm steadily working to tie this data with the votecounter (i'll pre-extract all relevant votes) and game archives maybe also a Big Giant Scrape of all the relevant threads for good measure. The result will probably be more than a gig of data, but with that we should really be able to get this show on the road.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
skitter30
skitter30
she/her
Last Laugh
User avatar
User avatar
skitter30
she/her
Last Laugh
Last Laugh
Posts: 36564
Joined: March 26, 2017
Pronoun: she/her
Location: Est

Post Post #73 (ISO) » Tue Dec 17, 2019 6:10 pm

Post by skitter30 »

that would be ... incredibly awesome
Show
Hiatus once more.

'skitter is fucking terrifying' ~ town-bork about scum-me

'Skitter [was] terrifying to play against ngl' ~ scum-bork about town-me

'Going into lylo against scum!skit unprepared is like having someone force feed you dull razor blades. It's painful, and once it starts, you're pretty much dead' ~ NMSA

'Skitter you're a spirit animal's spirit animal' ~ slaxx
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10058
Joined: April 28, 2011
Pronoun: he/they

Post Post #74 (ISO) » Tue Dec 17, 2019 6:45 pm

Post by Psyche »

oh good that's motivating to read
i'll talk up my progress here then

gameplan:
We got to make sure 3 things are in shape and either correct issues or filter out threads where there are issues (e.g. missing/borked posts, weird disruptions like modflaking, bizarre setups or mechanics that might disrupt analysis such as weird voting dynamics or post restrictions) :

- the phase transition spreadsheet above
- the game archives detailed the names, roles, and fates of every player (as well as identifying mods!)
- the votecounter

Think one way to sort of automate detection of issues in these data sources is to build a program that only works if these data sources are solid and will scream at you when it fails. I'll write a program that tries to use these data/tools to report who got lynched each Day and finally who won the game. The votecounter will start at each transition point as identified in the spreadsheet and track votes until it finds a lynch. It'll rely on the game archives to figure out whose votes count on a given Day as well as to check its work. If any one of the three above things is catastrophically wrong, the program should fail and I'll get the chance to either abandon the thread or fix the issue.

This wouldn't catch all errors (eg roles could still be wrong, and the correct lynch could be found by the votecounter even if it misses some votes or starts from the wrong post), but hopefully identifying/resolving the errors it does catch will solve or identify most of the errors that pass silently.

So the next checkpoint is getting this test program running. After that it's working through all the errors. Finally, it's reporting the data set.
But of course after that is the data analysis.

Let's see if I can get it done as a winter break project.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
Locked

Return to “Mafia Discussion”