osuka's votecounter + modtools

This forum is for discussion related to the game.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #9 (isolation #0) » Tue Jul 04, 2023 2:54 pm

Post by Psyche »

i have a pretty solid username matcher that i basically finetuned through brute force. is even in python! will share when i have the time
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #11 (isolation #1) » Fri Jul 07, 2023 5:18 am

Post by Psyche »

Yeah, it's always been something that has come down to user preference. For my use case, it was important to be really flexible since game moderators have generally been really flexible in their votecounting.

https://github.com/Computational-Mafia/ ... Counter.py

Here's the code (very messy). I will need to remind myself of how it works, but it's like 20 if statements in a sequence that I was able to validate as reliably predicting the final flip for each day phase across ~2-300 games (who was limmed, and at what post number).

Much of it is just different applications of edit distance or educated guesses about how people will abbreviate usernames. A particularly involved trick I used is was to apply a spellchecker library to generate all possible segmentations of usernames into valid English words (in my english_divides function). This information makes it easier to predict certain kinds of abbreviations/misspellings people will use when more obvious cues like spaces/capitalizations aren't available.

A little refactoring should make it fit into your library. When I get the time...
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #15 (isolation #2) » Mon Jul 10, 2023 7:37 pm

Post by Psyche »

speaking of which, something that might be useful for adoption might be a webapp that people can play with to try it out. i once had something like that running in a google colab notebook
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #26 (isolation #3) » Thu Aug 31, 2023 3:09 am

Post by Psyche »

I've been trying to be careful not to invest in side projects too much again, but it'd be nice to close out my pre-existing work around all this. Should maybe sideline the question of improving the tool further and focus on maximizing accessibility for normal folk. I think we want to avoid a situation where people download things.

If we're committed to not having a persisting backend, a cleaned up colab notebook that anyone with a google account can execute seems like a usable substitute that can be spun up really quickly. At minimum it might give us ideas for what to do going forward. I'll have something before the weekend is over...
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #27 (isolation #4) » Thu Aug 31, 2023 3:27 am

Post by Psyche »

hmm CLI is maybe not ideal for a colab notebook. we want to call functions directly. i think we can simplify setup for this and CLI use case with only a few extra files in the repo.
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #30 (isolation #5) » Thu Aug 31, 2023 5:32 am

Post by Psyche »

Yeah a lot of options. I'm kind of skeptical of fully browser-based solutions like browser extensions because I expect they'd all manage the whole "votes are distributed across pages" thing really awkwardly. I'd love to know if I'm wrong!

On the other hand, the biggest downside of colab notebooks will probably be the fact that the entire execution environment has to be set up at each new use, slowing down performance. Also, UX won't quite be seamless, even if we can technically reduce interaction to filling a textbox or two and pressing "run".

This leaves me preferring a backend solution where we find a really cheap way to host a server that monitors various threads and provides an API for retrieving vote counts. From there, any arbitrary frontend UX becomes doable -- chrome extensions, web pages, etc. And these frontends would in turn be compatible with any votecounter implementation that provides the same API.
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #35 (isolation #6) » Thu Aug 31, 2023 4:25 pm

Post by Psyche »

okay cool. have always wanted to get good at making extensions
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #40 (isolation #7) » Fri Sep 01, 2023 1:19 am

Post by Psyche »

In post 36, JacksonVirgo wrote:
In post 35, Psyche wrote: okay cool. have always wanted to get good at making extensions
I'm working on fleshing out what I wrote just because I'm hooked on the idea now. If you wanted to help work on that one instead, lemme know. But if you do make your own, I'd be interested to see how you'd do it.
Nahh I don't have the time to go my own way on this. I do suspect that this should maybe be a different thread since the codebase will probably be mostly distinct.
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #44 (isolation #8) » Fri Sep 01, 2023 1:28 pm

Post by Psyche »

as for this project, i think adding a simple setup.py or the link would make possible to reduce most setup to a single pip install statement. i should have a pull request ready for that soon
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #49 (isolation #9) » Sun Sep 03, 2023 1:57 am

Post by Psyche »

Made the pull request.

Also, here's a google colab notebook that demos the tool using my forked repo. The displayed form doesn't actually work (i.e., configure CLI args). Instead running the cell currently does the equivalent of executing `votecounter micro1078.yaml --template osuka.jinja`.

With further changes, the notebook can provide an encapsulated interface for tabulating vote counts without anyone having to install any files. Even now, anyone could make their own copy of the notebook and update the internal `game_definition` variable or other code to demo the votecounter for their own use case.

https://colab.research.google.com/drive ... sp=sharing
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #50 (isolation #10) » Sun Sep 03, 2023 2:09 am

Post by Psyche »

i suggest a page-topper as the next "modtool"
people traditionally like their votecounts near the top of a thread
my library donbot has an implementation of a bot that can interact with the site using posts and the like. not sure if it still works.
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #57 (isolation #11) » Mon Sep 04, 2023 1:53 am

Post by Psyche »

a pagetopper has been hosted in this subforum before, made no problems
in the end, mods seem perfectly able to discourage and act against spam
we probably don't automate account creation though
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #60 (isolation #12) » Mon Sep 04, 2023 12:04 pm

Post by Psyche »

i dont mod a lot. but i feel like ive seen tons of moderator scummies handed based in part on consistent votecount posts. people seem to value it a lot. but i don't feel strongly
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #65 (isolation #13) » Tue Sep 05, 2023 6:14 am

Post by Psyche »

yeah but like...i've had a pagetopper out for years now. even a full-on multi-threaded site scraper. there's been no apocalypse.
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #69 (isolation #14) » Tue Sep 05, 2023 4:46 pm

Post by Psyche »

A side issue with client-side approaches to votecounting if "client-side" means that the votecount is generated automatically for each mafiascum user to view is that it sidesteps moderator validation in a way that we probably don't want.
So given prioritization of moderator validation, the browser extension or other implementation should probably be mod-focused -- make them easy to prepare/post, rather than easy for players to quickly peek at.
i honestly hate that. even in the best case scenario it's a worse experience than what mafia universe achieves.
but i don't see a clean way to address the issue while players still make votes by typing usernames into posts -- imo a good moderator counts typo votes
You can't step in the same river twice.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10874
Joined: April 28, 2011
Pronoun: he/they

Post Post #71 (isolation #15) » Tue Sep 05, 2023 6:12 pm

Post by Psyche »

sure. still a bit dissatisfied with that sort of UX
You can't step in the same river twice.

Return to “Mafia Discussion”